From 41a2168765fb86690e192b67ca361149168d0244 Mon Sep 17 00:00:00 2001 From: Seth L <81644108+sethAmazon@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:50:57 -0500 Subject: [PATCH] Move Localstack To AL2023 ARM (#386) --- localstack/docker-compose.yml | 4 ++-- terraform/ec2/localstack/main.tf | 6 +++--- terraform/ec2/localstack/variables.tf | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/localstack/docker-compose.yml b/localstack/docker-compose.yml index dd61c9670..2634bda1d 100644 --- a/localstack/docker-compose.yml +++ b/localstack/docker-compose.yml @@ -4,8 +4,8 @@ services: localstack: container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}" # @TODO use latest when this is fixed https://github.com/localstack/localstack/issues/5502 - # Use 0.12.20 since this is last version that worked for now - image: localstack/localstack:0.12.20 + # Use 0.13.0 since this is last version that worked for now + image: localstack/localstack:0.13.0 network_mode: bridge ports: - "127.0.0.1:53:53" diff --git a/terraform/ec2/localstack/main.tf b/terraform/ec2/localstack/main.tf index 450c96ca9..409eaa8d6 100644 --- a/terraform/ec2/localstack/main.tf +++ b/terraform/ec2/localstack/main.tf @@ -52,7 +52,7 @@ resource "aws_instance" "integration-test" { inline = [ "cloud-init status --wait", "clone the agent and start the localstack", - "git clone ${var.github_test_repo}", + "git clone --branch ${var.github_test_repo_branch} ${var.github_test_repo}", "cd amazon-cloudwatch-agent-test", "git reset --hard ${var.cwa_test_github_sha}", "echo set up ssl pem for localstack, then start localstack", @@ -67,7 +67,7 @@ resource "aws_instance" "integration-test" { ] connection { type = "ssh" - user = "ubuntu" + user = "ec2-user" private_key = local.private_key_content host = self.public_dns } @@ -83,6 +83,6 @@ data "aws_ami" "latest" { filter { name = "name" - values = ["cloudwatch-agent-integration-test-ubuntu*"] + values = ["cloudwatch-agent-integration-test-aarch64-al2023*"] } } diff --git a/terraform/ec2/localstack/variables.tf b/terraform/ec2/localstack/variables.tf index a5f8fa401..741e2779d 100644 --- a/terraform/ec2/localstack/variables.tf +++ b/terraform/ec2/localstack/variables.tf @@ -3,7 +3,7 @@ variable "ec2_instance_type" { type = string - default = "t3a.medium" + default = "m6g.medium" } variable "ssh_key_name" { @@ -39,4 +39,8 @@ variable "github_test_repo" { variable "s3_bucket" { type = string default = "" +} + +variable "github_test_repo_branch" { + default = "main" } \ No newline at end of file