resource/aws_rds_cluster: Terraform 0.14 ignore_changes Handling with global_cluster_identifier #15645
Labels
service/rds
Issues and PRs that pertain to the rds service.
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Community Note
Description
Future versions of Terraform CLI, starting with 0.14, are more sensitive to how the
lifecycle
configuration blockignore_changes
argument is applied. Directionally, Terraform's core logic has been moving towards being more explicit about what Terraform Providers can and cannot suggest towards having configurations differ from the final applied state. These differences typically are what cause subtle bugs in core's handling across its whole feature set or represent situations where a generated plan may not exactly match the applied intention of a configuration.In our Terraform 0.14.0-alpha20201007 testing of the provider, this failure is present:
This attribute is used for creating an Aurora global cluster member on
aws_rds_cluster
resource creation or as in the case of this test, has the value of its global cluster when its used as the source of creating an Aurora global cluster. Given the latter situation but the possibility for the first situation if its value was defined in the configuration, the Terraform resource must mark this attribute withComputed: true
so it can be properly set by the provider without a configuration (andignore_changes
omitted). This effectively disables drift detection when not configured, which should be documented during the resource update.However, potentially unlike #15643, marking the attribute as
Computed: true
could introduce a new problem with the resource deletion as noted in the original implementation description:Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: