Skip to content

Commit

Permalink
Ensure the default version of the launch template is updated on when …
Browse files Browse the repository at this point in the history
…it changes.

Otherwise new instances will not have the latest version of the launch template.
  • Loading branch information
dbernstein committed Dec 13, 2024
1 parent 97e04cd commit ebe5b1a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions mill/audit-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "aws_launch_template" "audit_worker_launch_template" {
vpc_security_group_ids = [aws_security_group.mill_instance.id]
key_name = var.ec2_keypair
user_data = base64encode(templatefile("${path.module}/resources/cloud-init.tpl", merge(local.cloud_init_props, { node_type = "audit-worker" })))
update_default_version = true

block_device_mappings {
device_name = "/dev/sda1"
Expand Down
1 change: 1 addition & 0 deletions mill/bit-report-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "aws_launch_template" "bit_report_worker_launch_template" {
node_type = "bit-report-worker"
max_worker_threads = var.bit_report_max_worker_threads
})))
update_default_version = true

block_device_mappings {
device_name = "/dev/sda1"
Expand Down
2 changes: 1 addition & 1 deletion mill/bit-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_launch_template" "bit_worker_launch_template" {
vpc_security_group_ids = [aws_security_group.mill_instance.id]
key_name = var.ec2_keypair
user_data = base64encode(templatefile("${path.module}/resources/cloud-init.tpl", merge(local.cloud_init_props, { node_type = "bit-worker" })))

update_default_version = true
block_device_mappings {
device_name = "/dev/sda1"
ebs {
Expand Down
1 change: 1 addition & 0 deletions mill/high-priority-dup-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "aws_launch_template" "high_priority_dup_worker_launch_template" {
vpc_security_group_ids = [aws_security_group.mill_instance.id]
key_name = var.ec2_keypair
user_data = base64encode(templatefile("${path.module}/resources/cloud-init.tpl", merge(local.cloud_init_props, { node_type = "dup-worker" })))
update_default_version = true

block_device_mappings {
device_name = "/dev/sda1"
Expand Down
1 change: 1 addition & 0 deletions mill/low-priority-dup-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "aws_launch_template" "low_priority_dup_worker_launch_template" {
vpc_security_group_ids = [aws_security_group.mill_instance.id]
key_name = var.ec2_keypair
user_data = base64encode(templatefile("${path.module}/resources/cloud-init.tpl", merge(local.cloud_init_props, { node_type = "dup-worker" })))
update_default_version = true

block_device_mappings {
device_name = "/dev/sda1"
Expand Down
1 change: 1 addition & 0 deletions mill/sentinel.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "aws_launch_template" "sentinel_launch_template" {
vpc_security_group_ids = [aws_security_group.mill_instance.id]
key_name = var.ec2_keypair
user_data = base64encode(templatefile("${path.module}/resources/cloud-init.tpl", merge(local.cloud_init_props, { node_type = "sentinel" })))
update_default_version = true

block_device_mappings {
device_name = "/dev/sda1"
Expand Down
1 change: 1 addition & 0 deletions mill/storage-stats-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "aws_launch_template" "storage_stats_worker_launch_template" {
vpc_security_group_ids = [aws_security_group.mill_instance.id]
key_name = var.ec2_keypair
user_data = base64encode(templatefile("${path.module}/resources/cloud-init.tpl", merge(local.cloud_init_props, { node_type = "storage_stats-worker" })))
update_default_version = true

block_device_mappings {
device_name = "/dev/sda1"
Expand Down

0 comments on commit ebe5b1a

Please sign in to comment.