-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
d/aws_default_tags: Fix regression with null
vs. empty map
#27377
Conversation
Community NoteVoting for Prioritization
For Submitters
|
…PluginSDK_Empty'. Acceptance test output: % make testacc TESTARGS='-run=TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK' PKG=meta ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/meta/... -v -count 1 -parallel 20 -run=TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK -timeout 180m === RUN TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty === PAUSE TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty === CONT TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty --- PASS: TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty (48.27s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/meta 52.656s
$ make testacc TESTARGS='-run=TestAccMetaDefaultTagsDataSource_' PKG=meta
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/meta/... -v -count 1 -parallel 20 -run=TestAccMetaDefaultTagsDataSource_ -timeout 180m
=== RUN TestAccMetaDefaultTagsDataSource_basic
=== PAUSE TestAccMetaDefaultTagsDataSource_basic
=== RUN TestAccMetaDefaultTagsDataSource_empty
=== PAUSE TestAccMetaDefaultTagsDataSource_empty
=== RUN TestAccMetaDefaultTagsDataSource_multiple
=== PAUSE TestAccMetaDefaultTagsDataSource_multiple
=== RUN TestAccMetaDefaultTagsDataSource_ignore
=== PAUSE TestAccMetaDefaultTagsDataSource_ignore
=== RUN TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty
=== PAUSE TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty
=== CONT TestAccMetaDefaultTagsDataSource_basic
=== CONT TestAccMetaDefaultTagsDataSource_ignore
=== CONT TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty
=== CONT TestAccMetaDefaultTagsDataSource_multiple
=== CONT TestAccMetaDefaultTagsDataSource_empty
--- PASS: TestAccMetaDefaultTagsDataSource_multiple (6.15s)
--- PASS: TestAccMetaDefaultTagsDataSource_basic (6.15s)
--- PASS: TestAccMetaDefaultTagsDataSource_empty (10.08s)
--- PASS: TestAccMetaDefaultTagsDataSource_ignore (13.40s)
--- PASS: TestAccMetaDefaultTagsDataSource_MigrateFromPluginSDK_Empty (24.20s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/meta 26.973s Also verified a local build results in the $ cat terraform.tfstate
{
"version": 4,
"terraform_version": "1.2.9",
"serial": 3,
"lineage": "d2c608b8-e9f3-fcf0-e08a-9cdf59522a3f",
"outputs": {},
"resources": [
{
"mode": "data",
"type": "aws_default_tags",
"name": "test",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "aws",
"tags": {}
},
"sensitive_attributes": []
}
]
}
]
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⚡
This functionality has been released in v4.36.1 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Fixes a v4.36.0 regression where the
aws_default_tags
data source returnsnull
vs. an empty map ({}
) when nodefault_tags
are configured.Relations
Closes #27372.
Relates #27221.
Output from Acceptance Testing
N.B.
unset TF_CLI_CONFIG_FILE
before running.After applying this configuration
the Terraform state is
which matches the v4.35.0 version.
Unfortunately we can't test state migration as described in Migrating from SDK as the provider configuration has to be explictly defined for
default_tags
.