You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cd production
$ AWS_PROFILE=arthur AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 terraform import module.production-eu-west-1.aws_key_pair.test arthur-east
module.production-eu-west-1.aws_key_pair.test: Importing from ID "arthur-east"...
module.production-eu-west-1.aws_key_pair.test: Import complete!
Imported aws_key_pair (ID: arthur-east)
module.production-eu-west-1.aws_key_pair.test: Refreshing state... (ID: arthur-east)
Error importing: 1 error(s) occurred:
* module.production-eu-west-1.aws_key_pair.test (import id: arthur-east): 1 error(s) occurred:
* import module.production-eu-west-1.aws_key_pair.test result: arthur-east: import module.production-eu-west-1.aws_key_pair.test (id: arthur-east): Terraform detected a resource with this ID doesn'texist. Please verify the ID is correct. You cannot import non-existentresources using Terraform import.$ AWS_PROFILE=arthur AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 terraform import module.production-eu-west-1.aws_key_pair.test arthurmodule.production-eu-west-1.aws_key_pair.test: Importing from ID "arthur"...module.production-eu-west-1.aws_key_pair.test: Import complete! Imported aws_key_pair (ID: arthur)module.production-eu-west-1.aws_key_pair.test: Refreshing state... (ID: arthur)Import success! The resources imported are shown above. These arenow in your Terraform state. Import does not currently generateconfiguration, so you must do this next. If you do not create configurationfor the above resources, then the next `terraform plan` will markthem for destruction.
Test with another resource
$ AWS_PROFILE=arthur AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1 terraform import mo
dule.production-eu-west-1.aws_vpc.test vpc-e025af86
module.production-eu-west-1.aws_vpc.test: Importing from ID "vpc-e025af86"...
module.production-eu-west-1.aws_vpc.test: Import complete!
Imported aws_vpc (ID: vpc-e025af86)
module.production-eu-west-1.aws_vpc.test: Refreshing state... (ID: vpc-e025af86)
Error importing: 1 error(s) occurred:
* module.production-eu-west-1.aws_vpc.test (import id: vpc-e025af86): 1 error(s) occurred:
* import module.production-eu-west-1.aws_vpc.test result: vpc-e025af86: import module.production-eu-west-1.aws_vpc.test (id: vpc-e025af86): Terraform detected a resource with this ID doesn'texist. Please verify the ID is correct. You cannot import non-existentresources using Terraform import.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters