#gcp (2023-02)
Google Cloud Platform
2023-02-27
2023-02-28

Hi folks, anyone aware of a similar TF module like https://github.com/cloudposse/terraform-null-label but for GCP ?


the context variables namespace
, environment
, tenant
, stage
- you can use all of them or just those that you need

namespace
is your Org

environment
is a region

tenant
is a subdivision in your Org (OU in AWS)

stage
is the account

thx a bunch @Andriy Knysh (Cloud Posse)

(was surprised to see that there are no other modules like this embedded in any of the supported google tf modules)

the module is used to uniquely and consistently naming cloud resources. If you use all the context vars, the resulting resource name/Id would look like {namespace}-{tenant}-{environment}-{stage}-{name}
, for example for an AWS resource it could be cp-plat-ue1-prod-vpc-logs-bucket

same thing could be used for GCP

by using that, you can tell right away the stack that the resource belongs to by looking at the resource name/ID

indeed. The whole reason i want to use it is to support multiple deployments within same GCP project like:
• ephemeral/ sandbox envs
• uat
• etc