Skip to content

Instantly share code, notes, and snippets.

@Gary-Armstrong
Last active December 17, 2015 18:17
Show Gist options
  • Save Gary-Armstrong/23a7dc54bdf16a6fc488 to your computer and use it in GitHub Desktop.
Save Gary-Armstrong/23a7dc54bdf16a6fc488 to your computer and use it in GitHub Desktop.
Terraform Adventure in which Apply to Add Storage is Met With Error
# Waited a bit for the Terminated & Untagged instances to disappear.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ terraform plan
Refreshing Terraform state prior to plan...
aws_iam_role.wxmix_role: Refreshing state... (ID: wxmix-qa-us-east-1-wxmix_role)
aws_vpc.main: Refreshing state... (ID: vpc-b89e07dc)
aws_iam_policy.wxmix_policy: Refreshing state... (ID: arn:aws:iam::133124267079:policy/wxmix-qa-us-east-1-wxmix_policy)
aws_iam_instance_profile.wxmix_profile: Refreshing state... (ID: wxmix-qa-us-east-1-wxmix_profile)
aws_iam_policy_attachment.wxmix_policy-attach: Refreshing state... (ID: wxmix-qa-us-east-1-wxmix_policy-attach)
aws_security_group.nat: Refreshing state... (ID: sg-4b342e2d)
aws_internet_gateway.main: Refreshing state... (ID: igw-e43bd280)
aws_security_group.wxmix: Refreshing state... (ID: sg-4d342e2b)
aws_security_group.admin_sg: Refreshing state... (ID: sg-4a342e2c)
aws_vpc_peering_connection.legacy_sun_vpc: Refreshing state... (ID: pcx-3e4c9257)
aws_subnet.private.0: Refreshing state... (ID: subnet-aefbe485)
aws_subnet.public.0: Refreshing state... (ID: subnet-adfbe486)
aws_subnet.private.1: Refreshing state... (ID: subnet-07529971)
aws_subnet.public.1: Refreshing state... (ID: subnet-06529970)
aws_security_group_rule.nat_egress_all: Refreshing state... (ID: sgrule-929703067)
aws_security_group_rule.nat_ingress_all: Refreshing state... (ID: sgrule-897666475)
aws_route_table.public: Refreshing state... (ID: rtb-e8d5838c)
aws_security_group_rule.admin_egress_all: Refreshing state... (ID: sgrule-1349328380)
aws_security_group_rule.admin_ingress_22_wfh_ip: Refreshing state... (ID: sgrule-2998879472)
aws_instance.nat: Refreshing state... (ID: i-d2945c63)
aws_security_group_rule.admin_ingress_ICMP: Refreshing state... (ID: sgrule-3038985898)
aws_security_group_rule.admin_ingress_22_offices: Refreshing state... (ID: sgrule-1622961307)
aws_security_group_rule.wxmix_subnet: Refreshing state... (ID: sgrule-1167425670)
aws_security_group_rule.wxmix_ftp: Refreshing state... (ID: sgrule-3564642630)
aws_security_group_rule.wxmix_perforce: Refreshing state... (ID: sgrule-3492022185)
aws_security_group_rule.wxmix_rmq: Refreshing state... (ID: sgrule-450900623)
aws_security_group_rule.wxmix_http: Refreshing state... (ID: sgrule-2696598707)
aws_security_group_rule.wxmix_ldm: Refreshing state... (ID: sgrule-3482201414)
aws_security_group_rule.wxmix_postgres: Refreshing state... (ID: sgrule-1253085172)
aws_security_group_rule.wxmix_https: Refreshing state... (ID: sgrule-1185019192)
aws_instance.compute.0: Refreshing state... (ID: i-dc02a46d)
aws_main_route_table_association.a: Refreshing state... (ID: rtbassoc-f5c23892)
null_resource.provision_viewer: Refreshing state... (ID: 451476113218009528)
aws_route_table_association.public.1: Refreshing state... (ID: rtbassoc-f6c23891)
aws_route_table_association.public.0: Refreshing state... (ID: rtbassoc-f7c23890)
null_resource.provision_head: Refreshing state... (ID: 2100568399940106845)
aws_eip.nat: Refreshing state... (ID: eipalloc-2208dd46)
aws_route_table.private: Refreshing state... (ID: rtb-81a8fee5)
aws_route_table_association.private.1: Refreshing state... (ID: rtbassoc-bdcb31da)
aws_route_table_association.private.0: Refreshing state... (ID: rtbassoc-becb31d9)
null_resource.provision_compute.5: Refreshing state... (ID: 1190749518798508638)
null_resource.provision_compute.0: Refreshing state... (ID: 885053682695095576)
null_resource.provision_compute.1: Refreshing state... (ID: 6274447464031639755)
null_resource.provision_compute.2: Refreshing state... (ID: 6497917891160263103)
null_resource.provision_compute.3: Refreshing state... (ID: 21927624175027837)
null_resource.provision_compute.4: Refreshing state... (ID: 5197441962081503331)
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.
+ aws_instance.compute.1
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1c"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-06529970"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-001"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
+ aws_instance.compute.2
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-002"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
+ aws_instance.compute.3
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1c"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-06529970"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-003"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
+ aws_instance.compute.4
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-004"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
+ aws_instance.compute.5
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1c"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-06529970"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-005"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
+ aws_instance.head
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "1"
ebs_block_device.2554893574.delete_on_termination: "" => "1"
ebs_block_device.2554893574.device_name: "" => "/dev/sdc"
ebs_block_device.2554893574.encrypted: "" => "<computed>"
ebs_block_device.2554893574.iops: "" => "<computed>"
ebs_block_device.2554893574.snapshot_id: "" => "<computed>"
ebs_block_device.2554893574.volume_size: "" => "4096"
ebs_block_device.2554893574.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.2xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-head-000"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
+ aws_instance.viewer
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "2"
ebs_block_device.2554893574.delete_on_termination: "" => "1"
ebs_block_device.2554893574.device_name: "" => "/dev/sdc"
ebs_block_device.2554893574.encrypted: "" => "<computed>"
ebs_block_device.2554893574.iops: "" => "<computed>"
ebs_block_device.2554893574.snapshot_id: "" => "<computed>"
ebs_block_device.2554893574.volume_size: "" => "11264"
ebs_block_device.2554893574.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "64"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "i2.xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-viewer-000"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
Plan: 7 to add, 0 to change, 0 to destroy.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ terraform apply
aws_iam_role.wxmix_role: Refreshing state... (ID: wxmix-qa-us-east-1-wxmix_role)
aws_iam_policy.wxmix_policy: Refreshing state... (ID: arn:aws:iam::133124267079:policy/wxmix-qa-us-east-1-wxmix_policy)
aws_vpc.main: Refreshing state... (ID: vpc-b89e07dc)
aws_iam_instance_profile.wxmix_profile: Refreshing state... (ID: wxmix-qa-us-east-1-wxmix_profile)
aws_iam_policy_attachment.wxmix_policy-attach: Refreshing state... (ID: wxmix-qa-us-east-1-wxmix_policy-attach)
aws_security_group.admin_sg: Refreshing state... (ID: sg-4a342e2c)
aws_internet_gateway.main: Refreshing state... (ID: igw-e43bd280)
aws_subnet.public.1: Refreshing state... (ID: subnet-06529970)
aws_security_group.wxmix: Refreshing state... (ID: sg-4d342e2b)
aws_security_group.nat: Refreshing state... (ID: sg-4b342e2d)
aws_subnet.private.0: Refreshing state... (ID: subnet-aefbe485)
aws_vpc_peering_connection.legacy_sun_vpc: Refreshing state... (ID: pcx-3e4c9257)
aws_subnet.public.0: Refreshing state... (ID: subnet-adfbe486)
aws_subnet.private.1: Refreshing state... (ID: subnet-07529971)
aws_security_group_rule.admin_ingress_ICMP: Refreshing state... (ID: sgrule-3038985898)
aws_security_group_rule.admin_egress_all: Refreshing state... (ID: sgrule-1349328380)
aws_security_group_rule.admin_ingress_22_wfh_ip: Refreshing state... (ID: sgrule-2998879472)
aws_security_group_rule.admin_ingress_22_offices: Refreshing state... (ID: sgrule-1622961307)
aws_route_table.public: Refreshing state... (ID: rtb-e8d5838c)
aws_security_group_rule.nat_egress_all: Refreshing state... (ID: sgrule-929703067)
aws_security_group_rule.nat_ingress_all: Refreshing state... (ID: sgrule-897666475)
aws_security_group_rule.wxmix_https: Refreshing state... (ID: sgrule-1185019192)
aws_security_group_rule.wxmix_http: Refreshing state... (ID: sgrule-2696598707)
aws_security_group_rule.wxmix_subnet: Refreshing state... (ID: sgrule-1167425670)
aws_security_group_rule.wxmix_rmq: Refreshing state... (ID: sgrule-450900623)
aws_security_group_rule.wxmix_perforce: Refreshing state... (ID: sgrule-3492022185)
aws_security_group_rule.wxmix_ftp: Refreshing state... (ID: sgrule-3564642630)
aws_security_group_rule.wxmix_ldm: Refreshing state... (ID: sgrule-3482201414)
aws_security_group_rule.wxmix_postgres: Refreshing state... (ID: sgrule-1253085172)
aws_instance.nat: Refreshing state... (ID: i-d2945c63)
aws_instance.compute.0: Refreshing state... (ID: i-dc02a46d)
aws_main_route_table_association.a: Refreshing state... (ID: rtbassoc-f5c23892)
aws_route_table_association.public.0: Refreshing state... (ID: rtbassoc-f7c23890)
null_resource.provision_viewer: Refreshing state... (ID: 451476113218009528)
aws_route_table_association.public.1: Refreshing state... (ID: rtbassoc-f6c23891)
null_resource.provision_head: Refreshing state... (ID: 2100568399940106845)
aws_eip.nat: Refreshing state... (ID: eipalloc-2208dd46)
aws_route_table.private: Refreshing state... (ID: rtb-81a8fee5)
null_resource.provision_compute.2: Refreshing state... (ID: 6497917891160263103)
null_resource.provision_compute.3: Refreshing state... (ID: 21927624175027837)
null_resource.provision_compute.4: Refreshing state... (ID: 5197441962081503331)
null_resource.provision_compute.5: Refreshing state... (ID: 1190749518798508638)
null_resource.provision_compute.0: Refreshing state... (ID: 885053682695095576)
null_resource.provision_compute.1: Refreshing state... (ID: 6274447464031639755)
aws_route_table_association.private.0: Refreshing state... (ID: rtbassoc-becb31d9)
aws_route_table_association.private.1: Refreshing state... (ID: rtbassoc-bdcb31da)
aws_instance.viewer: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "2"
ebs_block_device.2554893574.delete_on_termination: "" => "1"
ebs_block_device.2554893574.device_name: "" => "/dev/sdc"
ebs_block_device.2554893574.encrypted: "" => "<computed>"
ebs_block_device.2554893574.iops: "" => "<computed>"
ebs_block_device.2554893574.snapshot_id: "" => "<computed>"
ebs_block_device.2554893574.volume_size: "" => "11264"
ebs_block_device.2554893574.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "64"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "i2.xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-viewer-000"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
aws_instance.head: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "1"
ebs_block_device.2554893574.delete_on_termination: "" => "1"
ebs_block_device.2554893574.device_name: "" => "/dev/sdc"
ebs_block_device.2554893574.encrypted: "" => "<computed>"
ebs_block_device.2554893574.iops: "" => "<computed>"
ebs_block_device.2554893574.snapshot_id: "" => "<computed>"
ebs_block_device.2554893574.volume_size: "" => "4096"
ebs_block_device.2554893574.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.2xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-head-000"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
aws_instance.compute.5: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1c"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-06529970"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-005"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
aws_instance.compute.1: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1c"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-06529970"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-001"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
aws_instance.compute.4: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-004"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
aws_instance.compute.2: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1b"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-adfbe486"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-002"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
aws_instance.compute.3: Creating...
ami: "" => "ami-61bbf104"
associate_public_ip_address: "" => "1"
availability_zone: "" => "us-east-1c"
ebs_block_device.#: "" => "2"
ebs_block_device.2630216116.delete_on_termination: "" => "1"
ebs_block_device.2630216116.device_name: "" => "/dev/sde"
ebs_block_device.2630216116.encrypted: "" => "<computed>"
ebs_block_device.2630216116.iops: "" => "<computed>"
ebs_block_device.2630216116.snapshot_id: "" => "<computed>"
ebs_block_device.2630216116.volume_size: "" => "64"
ebs_block_device.2630216116.volume_type: "" => "gp2"
ebs_block_device.2634515331.delete_on_termination: "" => "1"
ebs_block_device.2634515331.device_name: "" => "/dev/sdd"
ebs_block_device.2634515331.encrypted: "" => "<computed>"
ebs_block_device.2634515331.iops: "" => "<computed>"
ebs_block_device.2634515331.snapshot_id: "" => "<computed>"
ebs_block_device.2634515331.volume_size: "" => "4096"
ebs_block_device.2634515331.volume_type: "" => "gp2"
ephemeral_block_device.#: "" => "2"
ephemeral_block_device.3710187412.device_name: "" => "/dev/sdc"
ephemeral_block_device.3710187412.virtual_name: "" => "ephemeral1"
ephemeral_block_device.430514000.device_name: "" => "/dev/sdb"
ephemeral_block_device.430514000.virtual_name: "" => "ephemeral0"
iam_instance_profile: "" => "wxmix-qa-us-east-1-wxmix_profile"
instance_type: "" => "r3.8xlarge"
key_name: "" => "sunfod-qa-us-east-1-general"
placement_group: "" => "<computed>"
private_dns: "" => "<computed>"
private_ip: "" => "<computed>"
public_dns: "" => "<computed>"
public_ip: "" => "<computed>"
root_block_device.#: "" => "<computed>"
security_groups.#: "" => "<computed>"
source_dest_check: "" => "1"
subnet_id: "" => "subnet-06529970"
tags.#: "" => "2"
tags.Billing: "" => "FOD"
tags.Name: "" => "wxmix-qa-compute-003"
tenancy: "" => "<computed>"
vpc_security_group_ids.#: "" => "2"
vpc_security_group_ids.2604585730: "" => "sg-4a342e2c"
vpc_security_group_ids.3187788851: "" => "sg-4d342e2b"
Error applying plan:
7 error(s) occurred:
* aws_instance.viewer: Error waiting for instance (i-d39a3b62) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.head: Error waiting for instance (i-c09a3b71) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.5: Error waiting for instance (i-8a9ae93c) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.3: Error waiting for instance (i-659be8d3) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.4: Error waiting for instance (i-4b9d3cfa) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.2: Error waiting for instance (i-c79a3b76) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.1: Error waiting for instance (i-309be886) to become ready: unexpected state 'terminated', wanted target 'running'
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
# Those instance IDs do not look familiar.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ grep i-dc99386d *
grep: templates: Is a directory
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ grep head terraform.tfstate
"aws_instance.head": {
"tags.Name": "wxmix-qa-head-000",
"null_resource.provision_head": {
"aws_instance.head"
# TF is creating instances and setting to Terminated ? What is happening ?
# If a `terraform refresh` doesn't work, I will see how `terraform destroy` works.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ terraform destroy -target=aws_instance.head
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
aws_instance.head: Refreshing state... (ID: i-c09a3b71)
null_resource.provision_head: Refreshing state... (ID: 2100568399940106845)
null_resource.provision_head: Destroying...
null_resource.provision_head: Destruction complete
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ grep head terraform.tfstate
# OK, that seems to have cleared out the terraform.tfstate without my resorting to vim. Naturally, the instance is still visible in AWS and is Terminated. Let's clear out the rest of them.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ grep aws_instance terraform.tfstate
"aws_instance.nat"
"aws_instance.bastion": {
"type": "aws_instance",
"aws_instance.compute.0": {
"type": "aws_instance",
"aws_instance.compute.1": {
"type": "aws_instance",
"aws_instance.compute.2": {
"type": "aws_instance",
"aws_instance.compute.3": {
"type": "aws_instance",
"aws_instance.compute.4": {
"type": "aws_instance",
"aws_instance.compute.5": {
"type": "aws_instance",
"aws_instance.nat": {
"type": "aws_instance",
"aws_instance.viewer": {
"type": "aws_instance",
"aws_instance.nat",
"aws_instance.nat",
"aws_instance.compute"
"aws_instance.compute"
"aws_instance.compute"
"aws_instance.compute"
"aws_instance.compute"
"aws_instance.compute"
"aws_instance.viewer"
# Oh, hey, it's that aws_instance.bastion that I could not get rid of before (the instance has been manually deleted yesterday). I'll just lump that one into this exercise as well.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ awk -F\" '$2~/aws_instance/{print$2}' terraform.tfstate|sort|uniq
aws_instance.bastion
aws_instance.compute
aws_instance.compute.0
aws_instance.compute.1
aws_instance.compute.2
aws_instance.compute.3
aws_instance.compute.4
aws_instance.compute.5
aws_instance.nat
aws_instance.viewer
# Yeah, let's whack all of those.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ for res in $(awk -F\" '$2~/aws_instance/{print$2}' terraform.tfstate|sort|uniq);do
> yes yes|terraform destroy -target=$res
> done
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
aws_instance.compute.0: Refreshing state... (ID: i-dc02a46d)
aws_instance.compute.1: Refreshing state... (ID: i-309be886)
aws_instance.compute.2: Refreshing state... (ID: i-c79a3b76)
aws_instance.compute.3: Refreshing state... (ID: i-659be8d3)
aws_instance.compute.4: Refreshing state... (ID: i-4b9d3cfa)
aws_instance.compute.5: Refreshing state... (ID: i-8a9ae93c)
null_resource.provision_compute.2: Refreshing state... (ID: 6497917891160263103)
null_resource.provision_compute.3: Refreshing state... (ID: 21927624175027837)
null_resource.provision_compute.4: Refreshing state... (ID: 5197441962081503331)
null_resource.provision_compute.5: Refreshing state... (ID: 1190749518798508638)
null_resource.provision_compute.0: Refreshing state... (ID: 885053682695095576)
null_resource.provision_compute.1: Refreshing state... (ID: 6274447464031639755)
null_resource.provision_compute.0: Destroying...
null_resource.provision_compute.1: Destroying...
null_resource.provision_compute.3: Destroying...
null_resource.provision_compute.5: Destroying...
null_resource.provision_compute.0: Destruction complete
null_resource.provision_compute.3: Destruction complete
null_resource.provision_compute.2: Destroying...
null_resource.provision_compute.4: Destroying...
null_resource.provision_compute.1: Destruction complete
null_resource.provision_compute.5: Destruction complete
null_resource.provision_compute.2: Destruction complete
null_resource.provision_compute.4: Destruction complete
aws_instance.compute.0: Destroying...
aws_instance.compute.0: Destruction complete
Apply complete! Resources: 0 added, 0 changed, 7 destroyed.
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Error configuring: Unexpected value for InstanceType field: "0"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Error configuring: Unexpected value for InstanceType field: "1"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Error configuring: Unexpected value for InstanceType field: "2"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Error configuring: Unexpected value for InstanceType field: "3"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Error configuring: Unexpected value for InstanceType field: "4"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Error configuring: Unexpected value for InstanceType field: "5"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
aws_instance.nat: Refreshing state... (ID: i-d2945c63)
aws_eip.nat: Refreshing state... (ID: eipalloc-2208dd46)
aws_route_table.private: Refreshing state... (ID: rtb-81a8fee5)
aws_route_table_association.private.0: Refreshing state... (ID: rtbassoc-becb31d9)
aws_route_table_association.private.1: Refreshing state... (ID: rtbassoc-bdcb31da)
aws_eip.nat: Destroying...
aws_route_table_association.private.0: Destroying...
aws_route_table_association.private.1: Destroying...
aws_route_table_association.private.1: Destruction complete
aws_route_table_association.private.0: Destruction complete
aws_route_table.private: Destroying...
aws_route_table.private: Destruction complete
aws_eip.nat: Destruction complete
aws_instance.nat: Destroying...
aws_instance.nat: Destruction complete
Apply complete! Resources: 0 added, 0 changed, 5 destroyed.
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
aws_instance.viewer: Refreshing state... (ID: i-d39a3b62)
null_resource.provision_viewer: Refreshing state... (ID: 451476113218009528)
null_resource.provision_viewer: Destroying...
null_resource.provision_viewer: Destruction complete
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$
garmstrong-ml:config-qa-aws-us-east-1 gary.armstrong$ grep aws_instance terraform.tfstate
"aws_instance.bastion": {
"type": "aws_instance",
# YOU WIN AGAIN, BASTION DEFINITION!
Taking the example of aws_instance.head in the apply output, the error references i-9010b621 as having a state 'terminated'. Viewing the console, the Terminated (terminated by TF, not manually) instance is i-b9c31a08.
Instance i-9010b621 does indeed exist and is in Terminated state, but lacks tags. Instance type is correct for this node type (r3.2xlarge) so one might assume that TF created it and then terminated it. This seems unlikely or very bad.
Does TF ever reference an AWS instance by Name tag?
# Preamble: The instances were Stopped in AWS at the time of the `terraform apply`. TF plan was dandy. Upon apply, a refresh of the AWS console reveals a new & running instance "wxmix-qa-compute-000" alongside a Terminated "wxmix-qa-compute-000".
# While I would expect the Name tag to be irrelevant in instance identification, this superficially resembles the "umanageable bastion" adventure, in which another bastion instance with the same name existed.
Error applying plan:
7 error(s) occurred:
* aws_instance.viewer: Error waiting for instance (i-0905a3b8) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.head: Error waiting for instance (i-f802a449) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.1: Error waiting for instance (i-ae2e5d18) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.4: Error waiting for instance (i-f902a448) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.3: Error waiting for instance (i-de2d5e68) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.5: Error waiting for instance (i-162d5ea0) to become ready: unexpected state 'terminated', wanted target 'running'
* aws_instance.compute.2: Error waiting for instance (i-0805a3b9) to become ready: unexpected state 'terminated', wanted target 'running'
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment