Skip to content

Commit

Permalink
GDB-10095 Introduced update_default_version = true to the aws_launch_…
Browse files Browse the repository at this point in the history
…template

This way the latest launch template will be the default instead of the initially created one.
  • Loading branch information
viktor-ribchev committed Apr 15, 2024
1 parent be05741 commit fcdb6eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/graphdb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ resource "aws_launch_template" "graphdb" {
aws_security_group.graphdb_security_group.id
]

ebs_optimized = "true"
ebs_optimized = "true"

iam_instance_profile {
name = var.iam_instance_profile
Expand All @@ -67,6 +67,8 @@ resource "aws_launch_template" "graphdb" {
http_endpoint = "enabled"
http_tokens = "required"
}

update_default_version = "true"
}

resource "aws_autoscaling_group" "graphdb_auto_scalling_group" {
Expand All @@ -80,7 +82,7 @@ resource "aws_autoscaling_group" "graphdb_auto_scalling_group" {

launch_template {
id = aws_launch_template.graphdb.id
version = "$Latest"
version = aws_launch_template.graphdb.latest_version
}

dynamic "tag" {
Expand Down

0 comments on commit fcdb6eb

Please sign in to comment.