Skip to content

Instantly share code, notes, and snippets.

@spearman
Created March 9, 2022 03:21
Show Gist options
  • Save spearman/5f19ffb4c80791f0444c4a2a3b88afab to your computer and use it in GitHub Desktop.
Save spearman/5f19ffb4c80791f0444c4a2a3b88afab to your computer and use it in GitHub Desktop.
$ terraform apply
tls_private_key.mystatekey: Refreshing state... [id=51095f281d0e08196c846bd343ab4a35bcb0218d]
local_file.mymachinekey: Refreshing state... [id=ddbbd1aa4d3098e8a5981b9dab6b2d731edd8a25]
aws_key_pair.myawskey: Refreshing state... [id=terraform-generated-6a14a1607cdfe14d564243881d183c70b47ef5b85536cef6c3522dca8d965793]
aws_security_group.mysecuritygroup: Refreshing state... [id=sg-05dc8ad8a19e56b0f]
aws_instance.myinstance: Refreshing state... [id=i-0ef97f34902219a9f]
local_file.myinstanceip: Refreshing state... [id=58b5e32f3a8b30b62f0034463303f57088719c47]
module.deploy_nixos.null_resource.deploy_nixos: Refreshing state... [id=8904991364761607153]
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the last "terraform apply":
# aws_instance.myinstance has been changed
~ resource "aws_instance" "myinstance" {
id = "i-0ef97f34902219a9f"
+ tags = {}
# (29 unchanged attributes hidden)
# (5 unchanged blocks hidden)
}
# aws_key_pair.myawskey has been changed
~ resource "aws_key_pair" "myawskey" {
id = "terraform-generated-6a14a1607cdfe14d564243881d183c70b47ef5b85536cef6c3522dca8d965793"
+ tags = {}
# (7 unchanged attributes hidden)
}
# aws_security_group.mysecuritygroup has been changed
~ resource "aws_security_group" "mysecuritygroup" {
id = "sg-05dc8ad8a19e56b0f"
name = "terraform-20220309023736170400000001"
+ tags = {}
# (9 unchanged attributes hidden)
}
Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond to these changes.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# module.deploy_nixos.null_resource.deploy_nixos must be replaced
-/+ resource "null_resource" "deploy_nixos" {
~ id = "8904991364761607153" -> (known after apply)
~ triggers = { # forces replacement
~ "deploy_nixos_drv" = "/nix/store/m14nh92hxsk9a7pmpxz7ziys5906jkd3-nixos-system-unnamed-21.11.335130.386234e2a61.drv" -> "/nix/store/0bw8vlbp7iz7hlzswiynmpazhm3vqh0v-nixos-system-unnamed-21.11.335130.386234e2a61.drv"
# (1 unchanged element hidden)
}
}
Plan: 1 to add, 0 to change, 1 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.deploy_nixos.null_resource.deploy_nixos: Destroying... [id=8904991364761607153]
module.deploy_nixos.null_resource.deploy_nixos: Destruction complete after 0s
module.deploy_nixos.null_resource.deploy_nixos: Creating...
module.deploy_nixos.null_resource.deploy_nixos: Provisioning with 'file'...
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [10s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [20s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [30s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [40s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [50s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [1m0s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [1m10s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [1m20s elapsed]
module.deploy_nixos.null_resource.deploy_nixos: Still creating... [1m30s elapsed]
│ Error: file provisioner error
│ with module.deploy_nixos.null_resource.deploy_nixos,
│ on .terraform/modules/deploy_nixos/deploy_nixos/main.tf line 165, in resource "null_resource" "deploy_nixos":
│ 165: provisioner "file" {
│ timeout - last error: SSH authentication failed (root@52.60.78.197:22): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment