How do you let autoscaling or other systems own attributes?
IntermediateProductionRefactoring, Migration and Drift
Answer
Use lifecycle { ignore_changes = [...] } for exactly those attributes (desired_capacity, task_definition image, tags["..."]). Document why in a comment and keep the list as narrow as possible, because ignored attributes are blind spots for drift detection.
More on Refactoring, Migration and Drift
What is your workflow for refactoring Terraform safely?IntermediateHow do you rename a resource inside a shared module without breaking consumers?AdvancedHow do you split one state into two without downtime?AdvancedHow do you merge two states?IntermediateHow do you import a large existing environment efficiently?IntermediateHow do you upgrade a major version of the AWS provider?Advanced