resource/aws_autoscaling_group: Terraform 0.14 ignore_changes Handling for load_balancers and target_group_arns #15642
Labels
documentation
Introduces or discusses updates to documentation.
service/autoscaling
Issues and PRs that pertain to the autoscaling 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, these failures are present:
Recently in Terraform AWS Provider version 3.0.0, we enabled drift detection of the
aws_autoscaling_group
resourceload_balancers
andtarget_group_arns
arguments by removingComputed: true
from the schema to help practitioners with the case that wholly removing either of these arguments from their configuration would not physically remove load balancer and target group attachments as might be expected. However, these attachments can also occur via the separateaws_autoscaling_attachment
resource as noted in these tests, which is currently documented to work without specifying those arguments in some fashion. The new Terraform errors suggest that we can no longer document or provide the guidance that the arguments can be fully omitted while also suggestingignore_changes
. This may just require documentation and testing updates for now, although reverting back to the more properComputed: true
schema property may also be necessary in the future to match Terraform core's expectations that the provider cannot return a state value different than what is configured.Affected Resource(s)
Potential Terraform Configuration
References
load_balancers
when switching totarget_group_arns
The text was updated successfully, but these errors were encountered: