import * as pulumi from "@pulumi/pulumi"; /** * Allows creation and management of a Google Cloud Platform project. * * Projects created with this resource must be associated with an Organization. * See the [Organization documentation](https://docs.cloud.google.com/resource-manager/docs/quickstarts) for more details. * * The user or service account that is running this provider when creating a `gcp.organizations.Project` * resource must have `roles/resourcemanager.projectCreator` on the specified organization. See the * [Access Control for Organizations Using IAM](https://docs.cloud.google.com/resource-manager/docs/access-control-org) * doc for more information. * * > This resource reads the specified billing account on every pulumi up and plan operation so you must have permissions on the specified billing account. * * > It is recommended to use the `constraints/compute.skipDefaultNetworkCreation` [constraint](https://www.terraform.io/docs/providers/google/r/google_organization_policy.html) to remove the default network instead of setting `autoCreateNetwork` to false, when possible. * * > It may take a while for the attached tag bindings to be deleted after the project is scheduled to be deleted. * * To get more information about projects, see: * * * [API documentation](https://docs.cloud.google.com/resource-manager/reference/rest/v1/projects) * * How-to Guides * * [Creating and managing projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myProject = new gcp.organizations.Project("my_project", { * name: "My Project", * projectId: "your-project-id", * orgId: "1234567", * }); * ``` * * To create a project under a specific folder * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const department1 = new gcp.organizations.Folder("department1", { * displayName: "Department 1", * parent: "organizations/1234567", * }); * const myProject_in_a_folder = new gcp.organizations.Project("my_project-in-a-folder", { * name: "My Project", * projectId: "your-project-id", * folderId: department1.name, * }); * ``` * * To create a project with a tag * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myProject = new gcp.organizations.Project("my_project", { * name: "My Project", * projectId: "your-project-id", * orgId: "1234567", * tags: { * "1234567/env": "staging", * }, * }); * ``` * * ## Import * * Projects can be imported using the `projectId`, e.g. * * * `{{project_id}}` * * When using the `pulumi import` command, Projects can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:organizations/project:Project default {{project_id}} * ``` */ export declare class Project extends pulumi.CustomResource { /** * Get an existing Project resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ProjectState, opts?: pulumi.CustomResourceOptions): Project; /** * Returns true if the given object is an instance of Project. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Project; /** * Controls whether the 'default' network exists on the project. Defaults * to `true`, where it is created. If set to `false`, the default network will still be created by GCP but * will be deleted immediately by Terraform. Therefore, for quota purposes, you will still need to have 1 * network slot available to create the project successfully, even if you set `autoCreateNetwork` to * `false`. Note that when `false`, Terraform enables `compute.googleapis.com` on the project to interact * with the GCE API and currently leaves it enabled. */ readonly autoCreateNetwork: pulumi.Output; /** * The alphanumeric ID of the billing account this project * belongs to. The user or service account performing this operation with the provider * must have at mininum Billing Account User privileges (`roles/billing.user`) on the billing account. * See [Google Cloud Billing API Access Control](https://cloud.google.com/billing/docs/how-to/billing-access) * for more details. */ readonly billingAccount: pulumi.Output; /** * The deletion policy for the Project. Setting PREVENT will protect the project * against any destroy actions caused by a pulumi up or terraform destroy. Setting ABANDON allows the resource * to be abandoned rather than deleted, i.e., the Terraform resource can be deleted without deleting the Project via * the Google API. Possible values are: "PREVENT", "ABANDON", "DELETE". Default value is `PREVENT`. */ readonly deletionPolicy: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * The numeric ID of the folder this project should be * created under. Only one of `orgId` or `folderId` may be * specified. If the `folderId` is specified, then the project is * created under the specified folder. Changing this forces the * project to be migrated to the newly specified folder. */ readonly folderId: pulumi.Output; /** * A set of key/value label pairs to assign to the project. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field 'effective_labels' for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The display name of the project. */ readonly name: pulumi.Output; /** * The numeric identifier of the project. */ readonly number: pulumi.Output; /** * The numeric ID of the organization this project belongs to. * Changing this forces a new project to be created. Only one of * `orgId` or `folderId` may be specified. If the `orgId` is * specified then the project is created at the top level. Changing * this forces the project to be migrated to the newly specified * organization. */ readonly orgId: pulumi.Output; /** * The project ID. Changing this forces a new project to be created. */ readonly projectId: pulumi.Output; /** * (ReadOnly) The combination of labels configured directly on the resource and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored when empty. The field is immutable and causes resource replacement when mutated. This field is only set at create time and modifying this field after creation will trigger recreation. To apply tags to an existing resource, see the `gcp.tags.TagValue` resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a Project resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ProjectArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Project resources. */ export interface ProjectState { /** * Controls whether the 'default' network exists on the project. Defaults * to `true`, where it is created. If set to `false`, the default network will still be created by GCP but * will be deleted immediately by Terraform. Therefore, for quota purposes, you will still need to have 1 * network slot available to create the project successfully, even if you set `autoCreateNetwork` to * `false`. Note that when `false`, Terraform enables `compute.googleapis.com` on the project to interact * with the GCE API and currently leaves it enabled. */ autoCreateNetwork?: pulumi.Input; /** * The alphanumeric ID of the billing account this project * belongs to. The user or service account performing this operation with the provider * must have at mininum Billing Account User privileges (`roles/billing.user`) on the billing account. * See [Google Cloud Billing API Access Control](https://cloud.google.com/billing/docs/how-to/billing-access) * for more details. */ billingAccount?: pulumi.Input; /** * The deletion policy for the Project. Setting PREVENT will protect the project * against any destroy actions caused by a pulumi up or terraform destroy. Setting ABANDON allows the resource * to be abandoned rather than deleted, i.e., the Terraform resource can be deleted without deleting the Project via * the Google API. Possible values are: "PREVENT", "ABANDON", "DELETE". Default value is `PREVENT`. */ deletionPolicy?: pulumi.Input; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The numeric ID of the folder this project should be * created under. Only one of `orgId` or `folderId` may be * specified. If the `folderId` is specified, then the project is * created under the specified folder. Changing this forces the * project to be migrated to the newly specified folder. */ folderId?: pulumi.Input; /** * A set of key/value label pairs to assign to the project. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field 'effective_labels' for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The display name of the project. */ name?: pulumi.Input; /** * The numeric identifier of the project. */ number?: pulumi.Input; /** * The numeric ID of the organization this project belongs to. * Changing this forces a new project to be created. Only one of * `orgId` or `folderId` may be specified. If the `orgId` is * specified then the project is created at the top level. Changing * this forces the project to be migrated to the newly specified * organization. */ orgId?: pulumi.Input; /** * The project ID. Changing this forces a new project to be created. */ projectId?: pulumi.Input; /** * (ReadOnly) The combination of labels configured directly on the resource and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored when empty. The field is immutable and causes resource replacement when mutated. This field is only set at create time and modifying this field after creation will trigger recreation. To apply tags to an existing resource, see the `gcp.tags.TagValue` resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a Project resource. */ export interface ProjectArgs { /** * Controls whether the 'default' network exists on the project. Defaults * to `true`, where it is created. If set to `false`, the default network will still be created by GCP but * will be deleted immediately by Terraform. Therefore, for quota purposes, you will still need to have 1 * network slot available to create the project successfully, even if you set `autoCreateNetwork` to * `false`. Note that when `false`, Terraform enables `compute.googleapis.com` on the project to interact * with the GCE API and currently leaves it enabled. */ autoCreateNetwork?: pulumi.Input; /** * The alphanumeric ID of the billing account this project * belongs to. The user or service account performing this operation with the provider * must have at mininum Billing Account User privileges (`roles/billing.user`) on the billing account. * See [Google Cloud Billing API Access Control](https://cloud.google.com/billing/docs/how-to/billing-access) * for more details. */ billingAccount?: pulumi.Input; /** * The deletion policy for the Project. Setting PREVENT will protect the project * against any destroy actions caused by a pulumi up or terraform destroy. Setting ABANDON allows the resource * to be abandoned rather than deleted, i.e., the Terraform resource can be deleted without deleting the Project via * the Google API. Possible values are: "PREVENT", "ABANDON", "DELETE". Default value is `PREVENT`. */ deletionPolicy?: pulumi.Input; /** * The numeric ID of the folder this project should be * created under. Only one of `orgId` or `folderId` may be * specified. If the `folderId` is specified, then the project is * created under the specified folder. Changing this forces the * project to be migrated to the newly specified folder. */ folderId?: pulumi.Input; /** * A set of key/value label pairs to assign to the project. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field 'effective_labels' for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The display name of the project. */ name?: pulumi.Input; /** * The numeric ID of the organization this project belongs to. * Changing this forces a new project to be created. Only one of * `orgId` or `folderId` may be specified. If the `orgId` is * specified then the project is created at the top level. Changing * this forces the project to be migrated to the newly specified * organization. */ orgId?: pulumi.Input; /** * The project ID. Changing this forces a new project to be created. */ projectId?: pulumi.Input; /** * A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored when empty. The field is immutable and causes resource replacement when mutated. This field is only set at create time and modifying this field after creation will trigger recreation. To apply tags to an existing resource, see the `gcp.tags.TagValue` resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }