ProjectArgs

data class ProjectArgs(val autoCreateNetwork: Output<Boolean>? = null, val billingAccount: Output<String>? = null, val folderId: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val name: Output<String>? = null, val orgId: Output<String>? = null, val projectId: Output<String>? = null, val skipDelete: Output<Boolean>? = null) : ConvertibleToJava<ProjectArgs>

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 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 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. To get more information about projects, see:

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.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 myProject = new Project("myProject", ProjectArgs.builder()
.orgId("1234567")
.projectId("your-project-id")
.build());
}
}

Import

Projects can be imported using the project_id, e.g.

$ pulumi import gcp:organizations/project:Project my_project your-project-id

Constructors

Link copied to clipboard
constructor(autoCreateNetwork: Output<Boolean>? = null, billingAccount: Output<String>? = null, folderId: Output<String>? = null, labels: Output<Map<String, String>>? = null, name: Output<String>? = null, orgId: Output<String>? = null, projectId: Output<String>? = null, skipDelete: Output<Boolean>? = null)

Properties

Link copied to clipboard
val autoCreateNetwork: Output<Boolean>? = null

Create the 'default' network automatically. Default true. If set to false, the default network will be deleted. Note that, for quota purposes, you will still need to have 1 network slot available to create the project successfully, even if you set auto_create_network to false, since the network will exist momentarily.

Link copied to clipboard
val billingAccount: Output<String>? = null

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 for more details.

Link copied to clipboard
val folderId: Output<String>? = null

The numeric ID of the folder this project should be created under. Only one of org_id or folder_id may be specified. If the folder_id is specified, then the project is created under the specified folder. Changing this forces the project to be migrated to the newly specified folder.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

A set of key/value label pairs to assign to the project.

Link copied to clipboard
val name: Output<String>? = null

The display name of the project.

Link copied to clipboard
val orgId: Output<String>? = null

The numeric ID of the organization this project belongs to. Changing this forces a new project to be created. Only one of org_id or folder_id may be specified. If the org_id is specified then the project is created at the top level. Changing this forces the project to be migrated to the newly specified organization.

Link copied to clipboard
val projectId: Output<String>? = null

The project ID. Changing this forces a new project to be created.

Link copied to clipboard
val skipDelete: Output<Boolean>? = null

If true, the resource can be deleted without deleting the Project via the Google API.

Functions

Link copied to clipboard
open override fun toJava(): ProjectArgs