After upgrading the AWS provider to 6.x, plans fail with `Unsupported argument` on arguments that worked before.
AdvancedTroubleshootingDependencies, Cycles and Providers
Answer
Likely causes → Major provider versions remove deprecated arguments and resources. Code used things marked deprecated in 5.x.
Diagnose → Read the provider's version 6 upgrade guide; before upgrading, terraform validate on 5.x shows Warning: Argument is deprecated for everything that will break.
Fix → Pin back to ~> 5.0 to unblock, fix the deprecations, then upgrade one stack at a time.
Prevent → Treat deprecation warnings as tech debt with an owner; pin majors in root modules (~> 5.0) so upgrades are deliberate.
More on Dependencies, Cycles and Providers
`Error: Cycle: aws_security_group.app, aws_security_group.db`.Beginner`Error: Cycle: local.name_prefix, local.tags`.BeginnerA cycle appears only after adding `depends_on = [module.app]` to a module. The error lists dozens of nodes.IntermediateAdding `create_before_destroy = true` to a launch template causes `Error: Cycle: ... (destroy deposed ...)`.Advanced`terraform init` fails: `Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given constraints ~> 4.0, >= 5.30.0`.Intermediate`Error: Inconsistent dependency lock file` with `locked version selection 5.31.0 doesn't match the updated version constraints ">= 5.40.0"`.Beginner