Skip to content
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

Implements import with specified provider #10310

Merged
merged 1 commit into from
Nov 23, 2016

Conversation

spangenberg
Copy link
Contributor

This allows the import with a specified provider.
So far it was not possible to get resources imported from a different provider
than the default.

Example invocation that allows to import the specified AWS SQS queue with an AWS provider called "second":
terraform import -provider=aws.second aws_sqs_queue.fancy https://sqs.us-east-1.amazonaws.com/123456789101/fancy

This will fix #10029.

This allows the import with a specified provider.
So far it was not possible to get resources imported from a different provider
than the default.
@mitchellh
Copy link
Contributor

Really well done. I'm going to touch up some things a bit but this is agreat.

@mitchellh mitchellh merged commit c15754c into hashicorp:master Nov 23, 2016
mitchellh added a commit that referenced this pull request Nov 23, 2016
@spangenberg spangenberg deleted the custom-import-provider branch November 24, 2016 12:13
gusmat pushed a commit to gusmat/terraform that referenced this pull request Dec 6, 2016
@jleclanche
Copy link

@mitchellh that command line argument should probably be mentioned in https://www.terraform.io/docs/import/usage.html and/or the error message - it's very confusing to get an error on an instance id not existing simply because it's outside the default provider.

fatmcgav pushed a commit to fatmcgav/terraform that referenced this pull request Feb 27, 2017
@cregkly
Copy link

cregkly commented May 29, 2019

I ran into this issue and found the solution by searching and ending up on this page. The official documentation has not been updated.

In the example given there is a mistake. The provider needs to be in ""

terraform import -provider="aws.second" aws_sqs_queue.fancy https://sqs.us-east-1.amazonaws.com/123456789101/fancy

@pwhitehead00
Copy link

+1 on adding this to the documentation, I was only able to successfully import state with multiple providers only after finding this issue.

@ghost
Copy link

ghost commented Jul 24, 2019

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.

@ghost ghost locked and limited conversation to collaborators Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform import does not handle multiple AWS profiles
5 participants