harness.platform.Project
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const test = new harness.platform.Project("test", {
identifier: "testproject",
name: "Test Project",
orgId: "org_id",
color: "#0063F7",
});
import pulumi
import pulumi_harness as harness
test = harness.platform.Project("test",
identifier="testproject",
name="Test Project",
org_id="org_id",
color="#0063F7")
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.NewProject(ctx, "test", &platform.ProjectArgs{
Identifier: pulumi.String("testproject"),
Name: pulumi.String("Test Project"),
OrgId: pulumi.String("org_id"),
Color: pulumi.String("#0063F7"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var test = new Harness.Platform.Project("test", new()
{
Identifier = "testproject",
Name = "Test Project",
OrgId = "org_id",
Color = "#0063F7",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Project;
import com.pulumi.harness.platform.ProjectArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Project("test", ProjectArgs.builder()
.identifier("testproject")
.name("Test Project")
.orgId("org_id")
.color("#0063F7")
.build());
}
}
resources:
test:
type: harness:platform:Project
properties:
identifier: testproject
name: Test Project
orgId: org_id
color: '#0063F7'
Create Project Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);
@overload
def Project(resource_name: str,
args: ProjectArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Project(resource_name: str,
opts: Optional[ResourceOptions] = None,
identifier: Optional[str] = None,
org_id: Optional[str] = None,
color: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)
public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)
public Project(String name, ProjectArgs args)
public Project(String name, ProjectArgs args, CustomResourceOptions options)
type: harness:platform:Project
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectResource = new Harness.Platform.Project("projectResource", new()
{
Identifier = "string",
OrgId = "string",
Color = "string",
Description = "string",
Name = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewProject(ctx, "projectResource", &platform.ProjectArgs{
Identifier: pulumi.String("string"),
OrgId: pulumi.String("string"),
Color: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var projectResource = new Project("projectResource", ProjectArgs.builder()
.identifier("string")
.orgId("string")
.color("string")
.description("string")
.name("string")
.tags("string")
.build());
project_resource = harness.platform.Project("projectResource",
identifier="string",
org_id="string",
color="string",
description="string",
name="string",
tags=["string"])
const projectResource = new harness.platform.Project("projectResource", {
identifier: "string",
orgId: "string",
color: "string",
description: "string",
name: "string",
tags: ["string"],
});
type: harness:platform:Project
properties:
color: string
description: string
identifier: string
name: string
orgId: string
tags:
- string
Project Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Project resource accepts the following input properties:
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Color string
- Color of the project.
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- List<string>
- Tags to associate with the resource.
- Identifier string
- Unique identifier of the resource.
- Org
Id string - Unique identifier of the organization.
- Color string
- Color of the project.
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- []string
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- color String
- Color of the project.
- description String
- Description of the resource.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
- identifier string
- Unique identifier of the resource.
- org
Id string - Unique identifier of the organization.
- color string
- Color of the project.
- description string
- Description of the resource.
- name string
- Name of the resource.
- string[]
- Tags to associate with the resource.
- identifier str
- Unique identifier of the resource.
- org_
id str - Unique identifier of the organization.
- color str
- Color of the project.
- description str
- Description of the resource.
- name str
- Name of the resource.
- Sequence[str]
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- org
Id String - Unique identifier of the organization.
- color String
- Color of the project.
- description String
- Description of the resource.
- name String
- Name of the resource.
- List<String>
- Tags to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:
Look up Existing Project Resource
Get an existing Project resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectState, opts?: CustomResourceOptions): Project
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
color: Optional[str] = None,
description: Optional[str] = None,
identifier: Optional[str] = None,
modules: Optional[Sequence[str]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> Project
func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Color string
- Color of the project.
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Modules List<string>
- Modules in the project.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- List<string>
- Tags to associate with the resource.
- Color string
- Color of the project.
- Description string
- Description of the resource.
- Identifier string
- Unique identifier of the resource.
- Modules []string
- Modules in the project.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- []string
- Tags to associate with the resource.
- color String
- Color of the project.
- description String
- Description of the resource.
- identifier String
- Unique identifier of the resource.
- modules List<String>
- Modules in the project.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- List<String>
- Tags to associate with the resource.
- color string
- Color of the project.
- description string
- Description of the resource.
- identifier string
- Unique identifier of the resource.
- modules string[]
- Modules in the project.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- string[]
- Tags to associate with the resource.
- color str
- Color of the project.
- description str
- Description of the resource.
- identifier str
- Unique identifier of the resource.
- modules Sequence[str]
- Modules in the project.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- Sequence[str]
- Tags to associate with the resource.
- color String
- Color of the project.
- description String
- Description of the resource.
- identifier String
- Unique identifier of the resource.
- modules List<String>
- Modules in the project.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- List<String>
- Tags to associate with the resource.
Import
Import using the organization id and the project id
$ pulumi import harness:platform/project:Project example <organization_id>/<project_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.