hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

import with different provider fails when using terraform cloud #12515

Open mrinella-fs opened 4 years ago

mrinella-fs commented 4 years ago

I am attempting to import a few existing aws resources into an existing state that are in a different region than the default provider in this terraform workspace. The backend is terraform cloud, so the action is happening there.

For both of the attempts I have made, the result is:

Error: Cannot import non-existent remote object

The commands I am running:

terraform import -provider=aws.prod-us-east-2 aws_vpc. vpc- terraform import -provider=aws.prod-us-east-2 aws_vpc_dhcp_options. dopt-

terraform version 0.12.23 aws provider version 2.54

I can assure you the places where I obscured the names and the ids were checked many times and I do have them correct. The provider name is also correct for this codebase. The default provider region is us-east-1. I have built things in both regions in this codebase. I'm just trying to bring in some existing items now.

Hopefully I'm doing something wrong and its easy.

Community Note

Terraform Version

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

justinretzolk commented 2 years ago

Hey @mrinella-fs πŸ‘‹ Thank you for taking the time to file this issue. Given that there's been a number of Terraform and AWS provider releases since you initially filed it, can you confirm if you're still experiencing this behavior?

github-actions[bot] commented 1 month ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!