Difference between revisions of "Terraform import aws instance.my foo i-abcd1234"

From wikieduonline
Jump to navigation Jump to search
 
Line 23: Line 23:
 
  }
 
  }
  
 
+
== Related ==
 +
* <code>[[terraform show]]</code>
  
 
== See also ==
 
== See also ==

Latest 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[edit]

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)
}

Related[edit]

See also[edit]

Advertising: