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

Ignore AMI changing on worker launch config #375

Merged
merged 2 commits into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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