-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(perf): use $Latest
launch template
#257
Conversation
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 latest, thus supporting both our CI and personal AWS account use-case. See also terraform `aws_instance` specification. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#launch-template-specification
//CC @marten-seemann this would make your life a bit easier, i.e. not require the diff below: modified perf/terraform/modules/short_lived/main.tf
@@ -19,7 +19,7 @@ resource "aws_instance" "perf" {
launch_template {
name = "perf-node"
- version = "4"
+ version = "1"
}
key_name = aws_key_pair.perf.key_name |
@galargh do you have alternative suggestions? |
Github Action perf run: https://github.com/libp2p/test-plans/actions/runs/5853132413/job/15866553674 |
$Latest
launch template
I see it was added here #241 and before that we were defaulting to the The other option would be to set update_default_version to true on aws_launch_template.perf, and then use the It'd be pretty much the same thing though so it's just a matter of preference. |
Today I learned about Triggered run: https://github.com/libp2p/test-plans/actions/runs/5889989158/job/15974217657 |
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 latest, thus supporting both our CI and personal AWS account use-case.
See also terraform
aws_instance
specification.https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#launch-template-specification