Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #375 from chancez/ignore_ami_changes_2
Browse files Browse the repository at this point in the history
Ignore AMI changing on worker launch config
  • Loading branch information
chancez authored Apr 27, 2017
2 parents a1fee44 + d604aa3 commit d4d733b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions modules/aws/etcd/nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ resource "aws_instance" "etcd_node" {
vpc_security_group_ids = ["${var.sg_ids}"]

lifecycle {
# Ignore changes in the AMI which force recreation of the resource. This
# avoids accidental deletion of nodes whenever a new CoreOS Release comes
# out.
ignore_changes = ["ami"]
}

Expand Down
6 changes: 5 additions & 1 deletion modules/aws/master-asg/master.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ resource "aws_launch_configuration" "master_conf" {

lifecycle {
create_before_destroy = true
ignore_changes = ["image_id"]

# Ignore changes in the AMI which force recreation of the resource. This
# avoids accidental deletion of nodes whenever a new CoreOS Release comes
# out.
ignore_changes = ["image_id"]
}

root_block_device {
Expand Down
5 changes: 5 additions & 0 deletions modules/aws/worker-asg/worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ resource "aws_launch_configuration" "worker_conf" {

lifecycle {
create_before_destroy = true

# Ignore changes in the AMI which force recreation of the resource. This
# avoids accidental deletion of nodes whenever a new CoreOS Release comes
# out.
ignore_changes = ["image_id"]
}

root_block_device {
Expand Down

0 comments on commit d4d733b

Please sign in to comment.