-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import a S3 Bucket from a different region of my global provider #13750
Comments
Hey @nilo, thanks for the issue! If you specify the correct provider for the
|
That's what I was looking for @grubernaut thanks! |
Is there a minimum version of |
i am using latest version of terraform with s3 backend KMS and server side encryption and this work fine for me. Acquiring state lock. This may take a few moments... Import successful! The resources that were imported are shown above. These resources are now in Releasing state lock. This may take a few moments... |
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. |
Hi there,
The problem:
I have an S3 Bucket with my states on
ca-central-1
and all my other infra are onus-east-2
. I never created anything onus-east-2
when I ranterraform apply
I can't create a Bucket resource onca-central-1
that already exists, so I need to import it using something like:terraform import aws_s3_bucket.bucket states-terraform-stage
. When I do this I get this error:Terraform is trying to import the resource from
us-east-2
and not fromca-central-1
.A
-region=
option should resolve the problem.Terraform Version
0.9.3
Affected Resource(s)
Expected Behavior
import an s3 bucket from another region.
Actual Behavior
It is trying to import a bucket from the same region of the provider.
Steps to Reproduce
ca-central-1
using AWS console eg:states-tr
aws_s3_bucket
with the provider point toca-central-1
with the same nameus-east-2
terraform import aws_s3_bucket.bucket states-tr
The text was updated successfully, but these errors were encountered: