-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Show diff for computed nested labels fields #10393
Conversation
91248f5
to
3029660
Compare
Tests analyticsTotal tests: Click here to see the affected service packagesall service packages are affected Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccCloudRunService_withComputedLabels|TestAccKMSEkmConnection_kmsEkmConnectionBasicExample_update|TestAccSqlUser_postgresIAM |
Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.
|
Tests analyticsTotal tests: Click here to see the affected service packagesall service packages are affected Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccCloudRunService_withComputedLabels|TestAccSqlUser_postgresIAM |
Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.
|
Resource
google_cloud_run_service
andgoogle_cloud_run_domain_mapping
have nested labels fieldsmetadata.0.labels
andmetadata.0.annotations
.In the CustomizeDiff function SetMetadataLabelsDiff,
SetNew
is applied on "metadata" field with the object includingterraform_labels
andeffective_labels
. It introduced two bugs.metadata.0.labels
andmetadata.0.annotations
fields don't appear in terraform planThis bug cannot be fixed with the similar way in Fix the bug for computed labels and annotations #10182.
The reason is that
metadata.0.terraform_labels
andmetadat.0.effective_labels
fields cannot be set to computed due to a bug that SetNew doesn't work on nested fieldsin terraform sdk SetNew does not work on nested fields hashicorp/terraform-plugin-sdk#459
These two bugs can be fixed by moving
terraform_labels
andeffective_labels
to root level in provider release 6.0.Before the release 6.0, the first bug can be fixed in this PR and I don't find an easy way to fix the second bug.
Release Note Template for Downstream PRs (will be copied)