fix(perf): use `$Default` launch template (#257)

Our perf terraform setup differentiates in long lived and short lived resources.
On CI, our long lived resources are spun up once and our short lived resources
are spun up on each CI run. From time to time we have to adjust the long lived
resources. End result is a new launch template that needs to be referenced in
the short lived resources by version.

Next to our CI, the perf terraform setup can as well be used on personal AWS
accounts. Their long lived launch template version likely doesn't match the
configured launch template version of the short lived aws_instance.

Instead of specifying a specific version, instruct terraform to use the default,
thus supporting both our CI and personal AWS account use-case.
This commit is contained in:
Max Inden 2023-08-17 15:02:23 +02:00 committed by GitHub
parent c763d1fdce
commit e5b7e0e16e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -117,4 +117,6 @@ resource "aws_launch_template" "perf" {
delete_on_termination = true
}
}
update_default_version = true
}

View File

@ -19,7 +19,6 @@ resource "aws_instance" "perf" {
launch_template {
name = "perf-node"
version = "4"
}
key_name = aws_key_pair.perf.key_name