future-nail-59564
07/26/2021, 4:15 PMresource "google_project" "my_project" {
name = "my_project"
project_id = "my_project_123456"
billing_account = "01913E-D7CA1E-9371A0"
org_id = "my_org"
}
What am I missing here? 🤔prehistoric-activity-61023
07/26/2021, 8:04 PMpulumi-gcp
in python):
import pulumi_gcp as gcp
project = gcp.organizations.Project(
"project",
name=config.project_name,
project_id=config.project_id,
billing_account=config.billing_account,
auto_create_network=False,
folder_id=config.folder_id,
)
You can set or update the billing account associated with a project using the [] (/billing/reference/rest/v1/projects/updateBillingInfo) method.projects.updateBillingInfo
SRC: https://www.pulumi.com/docs/reference/pkg/google-native/cloudresourcemanager/v1/project/#projectDid you try that?
future-nail-59564
08/02/2021, 2:24 PMproject.id
in the form of projects/123456
, whereas the “native” one expects just 12345
as project ID, so I need to dynamically strip the projects/
prefix before passing it to the other native resources. That was annoying to troubleshoot initially, but now that it’s figured out, it works like a charm! 😉prehistoric-activity-61023
08/02/2021, 3:16 PMid
. I think you can use project.project_id
.future-nail-59564
08/03/2021, 11:58 AMid
and name
outputs seem to have the same format (ie: folders/1234
) and I see no other property… 😕