What do you do when a resource type is deprecated, like inline `acl` on `aws_s3_bucket`?
IntermediateProductionRefactoring, Migration and Drift
Answer
Read the provider's migration guide, adopt the replacement resources (aws_s3_bucket_acl, aws_s3_bucket_ownership_controls), import existing settings into them with import blocks if needed and verify an empty plan. Do it per module with a minor-version release, so consumers upgrade at their own pace.
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