astonishing-oil-84546
11/24/2025, 9:22 PMCan also be configured with environment variables likeBefore I chase my tail, just wondering if that's an artifact from the Terraform documentation that doesn't actually apply to Pulumi (or, perhaps, is it.TF_AWS_DEFAULT_TAGS_<tag_name>
PULUMI_AWS_DEFAULT_TAG_<tag_name>?astonishing-oil-84546
11/24/2025, 10:09 PMTF_AWS... environment variables, but the behaviour is strange. For example, I'm setting:
TF_AWS_DEFAULT_TAGS_abc:bus:owner=Cloud Platforms
The diff is showing it's trying to add the key, but the value is `<null>`:
[provider=urn:pulumi:abc-coreinfrastructure-non-prod::abc-cp-vpc::pulumi:providers:aws::default_7_11_0::f1f82671-10ff-42b0-b4f0-2522f24fa3bf]
~ tagsAll: {
+ abc:bus:owner : <null>
...steep-plastic-74107
11/24/2025, 11:50 PM> export TF_AWS_DEFAULT_TAGS_abc:bus:owner=Cloud Platforms
export: not valid in this context: TF_AWS_DEFAULT_TAGS_abc:bus:owner
You'll likely also need to put "Cloud Platforms" in quotations so it grabs the whole stringastonishing-oil-84546
11/25/2025, 1:22 AM- script: |
env | sort
pulumi login
pulumi stack select ${{parameters.stackName}}
pulumi preview --diff
env:
PULUMI_BACKEND_URL: ${{parameters.stateBackend}}
TF_AWS_DEFAULT_TAGS_abc:ops:applicationid: $(TAGS_abc_ops_applicationid)
TF_AWS_DEFAULT_TAGS_abc:ops:managedby: $(TAGS_abc_ops_managedby)
TF_AWS_DEFAULT_TAGS_abc:bus:costcenter: $(TAGS_abc_bus_costcenter)
TF_AWS_DEFAULT_TAGS_abc:bus:owner: $(TAGS_abc_bus_owner)
TF_AWS_DEFAULT_TAGS_abc:bus:product: $(TAGS_abc_bus_product)
TF_AWS_DEFAULT_TAGS_abc:bus:criticality: $(TAGS_abc_bus_criticality)
TF_AWS_DEFAULT_TAGS_abc:tech:environment: $(TAGS_abc_tech_environment)
TF_AWS_DEFAULT_TAGS_abc:sec:classification: $(TAGS_abc_sec_classification)
TF_AWS_DEFAULT_TAGS_abc:ops:repo: $(Build.Repository.Uri)
TF_AWS_DEFAULT_TAGS_abc:tech:createdby: pulumi
TAGS_abc... is being set earlier in the pipeline by looking them up from an external resource. You're right, though, 'export ...` with colons definitely doesn't work, but setting the env seems OK (e.g., TF_AWS_DEFAULT_TAGS_abc:ops:managedby pulumi preview ... is valid, which I think is what the env statement is doing)astonishing-oil-84546
11/25/2025, 1:33 AMdefault_tags=aws.ProviderDefaultTagsArgs(
tags=aws.get_default_tags().tags,
),
And that is picking up the tag values.... 🤔astonishing-oil-84546
11/25/2025, 1:34 AM<nulls> in the preview output seem to be bogus - I ran the up and it actually did add the tags.. Small bug in the preview rendering I guess?adorable-house-61348
11/25/2025, 11:34 AMastonishing-oil-84546
11/25/2025, 11:49 PM