Difference between revisions of "Terraform import aws instance.my foo i-abcd1234"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | terraform import aws_instance.YOUR_NAME i-00b1cf99a8fd118aa | ||
+ | aws_instance.YOUR_NAME: Importing from ID "i-00b1cf99a8fd118aa"... | ||
+ | aws_instance.YOUR_NAME: Import prepared! | ||
+ | Prepared aws_instance for import | ||
+ | aws_instance.YOUR_NAME: Refreshing state... [id=i-00b1cf99a8fd118aa] | ||
+ | |||
+ | Import successful! | ||
+ | |||
+ | The resources that were imported are shown above. These resources are now in | ||
+ | your Terraform state and will henceforth be managed by Terraform. | ||
+ | |||
+ | |||
+ | == Errors == | ||
terraform import [[aws_instance]].your_name i-00b1cf99a8fd118aa | terraform import [[aws_instance]].your_name i-00b1cf99a8fd118aa | ||
Error: resource address "aws_instance.your_name" does not exist in the configuration. | Error: resource address "aws_instance.your_name" does not exist in the configuration. |
Revision as of 19:43, 22 June 2022
terraform import aws_instance.YOUR_NAME i-00b1cf99a8fd118aa aws_instance.YOUR_NAME: Importing from ID "i-00b1cf99a8fd118aa"... aws_instance.YOUR_NAME: Import prepared! Prepared aws_instance for import aws_instance.YOUR_NAME: Refreshing state... [id=i-00b1cf99a8fd118aa] Import successful! The resources that were imported are shown above. These resources are now in your Terraform state and will henceforth be managed by Terraform.
Errors
terraform import aws_instance.your_name i-00b1cf99a8fd118aa Error: resource address "aws_instance.your_name" does not exist in the configuration. Before importing this resource, please create its configuration in the root module. For example: resource "aws_instance" "your_name" { # (resource arguments) }
See also
Advertising: