Closed bwmetcalf closed 1 year ago
Duplicate of #29294
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version
Terraform Configuration Files
Debug Output
n/a
Expected Behavior
Terraform isn't aware of what provider its using in state, so the result is understandable. However, not sure if this is possible to address. If resources are created by a module in the current AWS account and then a cross account provider is introduced in the module, those resources will be created in the cross account and reflected in state, but the resources created in the first account will not be destroyed and orphaned in AWS. This probably occurs with other cloud providers as well.
Not sure if it's somehow possible for Terraform to realize the provider has changed and remove the existing resources before creating the new ones.
Actual Behavior
See above.
Steps to Reproduce
Create a resource in AWS with a standard provider config such as
then introduce a second provider in the resource such as
and apply again.
Additional Context
No response
References
No response