Difference between revisions of "Terraform import aws key pair.MyNewKeyInTerraform YourExistingKeyName2"
Jump to navigation
Jump to search
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
− | + | terraform import [[aws_key_pair]].MyNewKeyInTerraform test | |
− | aws_key_pair.MyNewKeyInTerraform: Importing from ID "test"... | + | aws_key_pair.MyNewKeyInTerraform: Importing from ID "test"... |
− | aws_key_pair.MyNewKeyInTerraform: Import prepared! | + | aws_key_pair.MyNewKeyInTerraform: Import prepared! |
− | + | Prepared aws_key_pair for import | |
− | aws_key_pair.MyNewKeyInTerraform: Refreshing state... [id=test] | + | aws_key_pair.MyNewKeyInTerraform: Refreshing state... [id=test] |
− | ╷ | + | ╷ |
− | │ Error: Cannot import non-existent remote object | + | │ Error: Cannot import non-existent remote object |
− | │ | + | │ |
− | │ While attempting to import an existing object to | + | │ While attempting to import an existing object to |
− | │ "aws_key_pair.MyNewKeyInTerraform", the provider detected that no object | + | │ "aws_key_pair.MyNewKeyInTerraform", the provider detected that no object |
− | │ exists with the given id. Only pre-existing objects can be imported; check | + | │ exists with the given id. Only pre-existing objects can be imported; check |
− | │ that the id is correct and that it is associated with the provider's | + | │ that the id is correct and that it is associated with the provider's |
− | │ configured region or endpoint, or use "terraform apply" to create a new | + | │ configured region or endpoint, or use "terraform apply" to create a new |
− | │ remote object for this resource. | + | │ remote object for this resource. |
− | ╵ | + | ╵ |
− | |||
== Related commands == | == Related commands == | ||
* <code>[[aws ec2 describe-key-pairs]]</code> | * <code>[[aws ec2 describe-key-pairs]]</code> | ||
+ | * <code>[[aws_key_pair]]</code> | ||
== See also == | == See also == | ||
* {{terraform import}} | * {{terraform import}} | ||
+ | * {{terraform cmd}} | ||
[[Category:Terraform]] | [[Category:Terraform]] |
Latest revision as of 10:46, 16 March 2023
terraform import aws_key_pair.MyNewKeyInTerraform test aws_key_pair.MyNewKeyInTerraform: Importing from ID "test"... aws_key_pair.MyNewKeyInTerraform: Import prepared! Prepared aws_key_pair for import aws_key_pair.MyNewKeyInTerraform: Refreshing state... [id=test] ╷ │ Error: Cannot import non-existent remote object │ │ While attempting to import an existing object to │ "aws_key_pair.MyNewKeyInTerraform", the provider detected that no object │ exists with the given id. Only pre-existing objects can be imported; check │ that the id is correct and that it is associated with the provider's │ configured region or endpoint, or use "terraform apply" to create a new │ remote object for this resource. ╵
Related commands[edit]
See also[edit]
terraform import
,terraform import --help
terraform
[untaint | fmt
|apply
|show
|state
|init | plan | console | output
|validate
|destroy
|debug
|import
|providers
|get
|graph
|workspaces
|resource
|login
|-var-file
|state mv
|state pull
|state push
|state replace-provider
|state rm
|force-unlock
|env
|tfe
|--version
|remote-exec
|delete on termination
| deprecated commands |terraform --help
]
Advertising: