Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.cloudresourcemanager/v1.Project
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Request that a new Project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. Authorization requires the Google IAM permission resourcemanager.projects.create
on the specified parent for the new project. The parent is identified by a specified ResourceId, which must include both an ID and a type, such as organization. This method does not associate the new project with a billing account. You can set or update the billing account associated with a project using the [projects.updateBillingInfo
] (/billing/reference/rest/v1/projects/updateBillingInfo) method.
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: Optional[ProjectArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Project(resource_name: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
lifecycle_state: Optional[ProjectLifecycleState] = None,
name: Optional[str] = None,
parent: Optional[ResourceIdArgs] = None,
project_id: Optional[str] = None,
project_number: Optional[str] = None)
func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)
public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
public Project(String name, ProjectArgs args)
public Project(String name, ProjectArgs args, CustomResourceOptions options)
type: google-native:cloudresourcemanager/v1: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 GoogleNative.CloudResourceManager.V1.Project("projectResource", new()
{
CreateTime = "string",
Labels =
{
{ "string", "string" },
},
LifecycleState = GoogleNative.CloudResourceManager.V1.ProjectLifecycleState.LifecycleStateUnspecified,
Name = "string",
Parent = new GoogleNative.CloudResourceManager.V1.Inputs.ResourceIdArgs
{
Id = "string",
Type = "string",
},
ProjectId = "string",
ProjectNumber = "string",
});
example, err := cloudresourcemanager.NewProject(ctx, "projectResource", &cloudresourcemanager.ProjectArgs{
CreateTime: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
LifecycleState: cloudresourcemanager.ProjectLifecycleStateLifecycleStateUnspecified,
Name: pulumi.String("string"),
Parent: &cloudresourcemanager.ResourceIdArgs{
Id: pulumi.String("string"),
Type: pulumi.String("string"),
},
ProjectId: pulumi.String("string"),
ProjectNumber: pulumi.String("string"),
})
var projectResource = new Project("projectResource", ProjectArgs.builder()
.createTime("string")
.labels(Map.of("string", "string"))
.lifecycleState("LIFECYCLE_STATE_UNSPECIFIED")
.name("string")
.parent(ResourceIdArgs.builder()
.id("string")
.type("string")
.build())
.projectId("string")
.projectNumber("string")
.build());
project_resource = google_native.cloudresourcemanager.v1.Project("projectResource",
create_time="string",
labels={
"string": "string",
},
lifecycle_state=google_native.cloudresourcemanager.v1.ProjectLifecycleState.LIFECYCLE_STATE_UNSPECIFIED,
name="string",
parent=google_native.cloudresourcemanager.v1.ResourceIdArgs(
id="string",
type="string",
),
project_id="string",
project_number="string")
const projectResource = new google_native.cloudresourcemanager.v1.Project("projectResource", {
createTime: "string",
labels: {
string: "string",
},
lifecycleState: google_native.cloudresourcemanager.v1.ProjectLifecycleState.LifecycleStateUnspecified,
name: "string",
parent: {
id: "string",
type: "string",
},
projectId: "string",
projectNumber: "string",
});
type: google-native:cloudresourcemanager/v1:Project
properties:
createTime: string
labels:
string: string
lifecycleState: LIFECYCLE_STATE_UNSPECIFIED
name: string
parent:
id: string
type: string
projectId: string
projectNumber: 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
The Project resource accepts the following input properties:
- Create
Time string - Creation time. Read-only.
- Labels Dictionary<string, string>
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
- Lifecycle
State Pulumi.Google Native. Cloud Resource Manager. V1. Project Lifecycle State - The Project lifecycle state. Read-only.
- Name string
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example:
My Project
Read-write. - Parent
Pulumi.
Google Native. Cloud Resource Manager. V1. Inputs. Resource Id - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. - Project
Id string - The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example:
tokyo-rain-123
Read-only after creation. - Project
Number string - The number uniquely identifying the project. Example:
415104041262
Read-only.
- Create
Time string - Creation time. Read-only.
- Labels map[string]string
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
- Lifecycle
State ProjectLifecycle State - The Project lifecycle state. Read-only.
- Name string
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example:
My Project
Read-write. - Parent
Resource
Id Args - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. - Project
Id string - The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example:
tokyo-rain-123
Read-only after creation. - Project
Number string - The number uniquely identifying the project. Example:
415104041262
Read-only.
- create
Time String - Creation time. Read-only.
- labels Map<String,String>
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
- lifecycle
State ProjectLifecycle State - The Project lifecycle state. Read-only.
- name String
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example:
My Project
Read-write. - parent
Resource
Id - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. - project
Id String - The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example:
tokyo-rain-123
Read-only after creation. - project
Number String - The number uniquely identifying the project. Example:
415104041262
Read-only.
- create
Time string - Creation time. Read-only.
- labels {[key: string]: string}
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
- lifecycle
State ProjectLifecycle State - The Project lifecycle state. Read-only.
- name string
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example:
My Project
Read-write. - parent
Resource
Id - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. - project
Id string - The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example:
tokyo-rain-123
Read-only after creation. - project
Number string - The number uniquely identifying the project. Example:
415104041262
Read-only.
- create_
time str - Creation time. Read-only.
- labels Mapping[str, str]
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
- lifecycle_
state ProjectLifecycle State - The Project lifecycle state. Read-only.
- name str
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example:
My Project
Read-write. - parent
Resource
Id Args - An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. - project_
id str - The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example:
tokyo-rain-123
Read-only after creation. - project_
number str - The number uniquely identifying the project. Example:
415104041262
Read-only.
- create
Time String - Creation time. Read-only.
- labels Map<String>
- The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z{0,62}. Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
- lifecycle
State "LIFECYCLE_STATE_UNSPECIFIED" | "ACTIVE" | "DELETE_REQUESTED" | "DELETE_IN_PROGRESS" - The Project lifecycle state. Read-only.
- name String
- The optional user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example:
My Project
Read-write. - parent Property Map
- An optional reference to a parent Resource. Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The
parent
can be set on creation or using theUpdateProject
method; the end user must have theresourcemanager.projects.create
permission on the parent. - project
Id String - The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example:
tokyo-rain-123
Read-only after creation. - project
Number String - The number uniquely identifying the project. Example:
415104041262
Read-only.
Outputs
All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
ProjectLifecycleState, ProjectLifecycleStateArgs
- Lifecycle
State Unspecified - LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Active
- ACTIVEThe normal and active state.
- Delete
Requested - DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- Delete
In Progress - DELETE_IN_PROGRESSThis lifecycle state is no longer used and not returned by the API.
- Project
Lifecycle State Lifecycle State Unspecified - LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Project
Lifecycle State Active - ACTIVEThe normal and active state.
- Project
Lifecycle State Delete Requested - DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- Project
Lifecycle State Delete In Progress - DELETE_IN_PROGRESSThis lifecycle state is no longer used and not returned by the API.
- Lifecycle
State Unspecified - LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Active
- ACTIVEThe normal and active state.
- Delete
Requested - DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- Delete
In Progress - DELETE_IN_PROGRESSThis lifecycle state is no longer used and not returned by the API.
- Lifecycle
State Unspecified - LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- Active
- ACTIVEThe normal and active state.
- Delete
Requested - DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- Delete
In Progress - DELETE_IN_PROGRESSThis lifecycle state is no longer used and not returned by the API.
- LIFECYCLE_STATE_UNSPECIFIED
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- ACTIVE
- ACTIVEThe normal and active state.
- DELETE_REQUESTED
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- DELETE_IN_PROGRESS
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and not returned by the API.
- "LIFECYCLE_STATE_UNSPECIFIED"
- LIFECYCLE_STATE_UNSPECIFIEDUnspecified state. This is only used/useful for distinguishing unset values.
- "ACTIVE"
- ACTIVEThe normal and active state.
- "DELETE_REQUESTED"
- DELETE_REQUESTEDThe project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject.
- "DELETE_IN_PROGRESS"
- DELETE_IN_PROGRESSThis lifecycle state is no longer used and not returned by the API.
ResourceId, ResourceIdArgs
ResourceIdResponse, ResourceIdResponseArgs
- Type string
- The resource type this id is for. At present, the valid types are: "organization", "folder", and "project".
- Type string
- The resource type this id is for. At present, the valid types are: "organization", "folder", and "project".
- type String
- The resource type this id is for. At present, the valid types are: "organization", "folder", and "project".
- type string
- The resource type this id is for. At present, the valid types are: "organization", "folder", and "project".
- type str
- The resource type this id is for. At present, the valid types are: "organization", "folder", and "project".
- type String
- The resource type this id is for. At present, the valid types are: "organization", "folder", and "project".
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.