diff --git a/al1.pkr.hcl b/al1.pkr.hcl index fbd78e9..7a6c64b 100644 --- a/al1.pkr.hcl +++ b/al1.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al1 = "${var.ami_name_prefix_al1}${var.ami_version}-amazon-ecs-optimized" + ami_name_al1 = "${var.ami_name_prefix_al1}${var.ami_version_al1}-amazon-ecs-optimized" } source "amazon-ebs" "al1" { ami_name = "${local.ami_name_al1}" - ami_description = "Amazon Linux AMI amzn-ami-2018.03.${var.ami_version} x86_64 ECS HVM GP2" + ami_description = "Amazon Linux AMI amzn-ami-2018.03.${var.ami_version_al1} x86_64 ECS HVM GP2" instance_type = var.general_purpose_instance_types[0] launch_block_device_mappings { volume_size = 8 @@ -36,7 +36,7 @@ source "amazon-ebs" "al1" { ecs_runtime_version = "Docker version ${var.docker_version_al1}" ecs_agent_version = "${var.ecs_version_al1}" ami_type = "al1" - ami_version = "2018.03.${var.ami_version}" + ami_version = "2018.03.${var.ami_version_al1}" } } diff --git a/al2.pkr.hcl b/al2.pkr.hcl index fb03ba7..c68b80c 100644 --- a/al2.pkr.hcl +++ b/al2.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2 = "${var.ami_name_prefix_al2}-hvm-2.0.${var.ami_version}-x86_64-ebs" + ami_name_al2 = "${var.ami_name_prefix_al2}-hvm-2.0.${var.ami_version_al2}-x86_64-ebs" } source "amazon-ebs" "al2" { ami_name = "${local.ami_name_al2}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} x86_64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} x86_64 ECS HVM GP2" instance_type = var.general_purpose_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,7 +28,7 @@ source "amazon-ebs" "al2" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/al2023.pkr.hcl b/al2023.pkr.hcl index 0a3e535..ac2c6cc 100644 --- a/al2023.pkr.hcl +++ b/al2023.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2023 = "${var.ami_name_prefix_al2023}-hvm-2023.0.${var.ami_version}${var.kernel_version_al2023}-x86_64" + ami_name_al2023 = "${var.ami_name_prefix_al2023}-hvm-2023.0.${var.ami_version_al2023}${var.kernel_version_al2023}-x86_64" } source "amazon-ebs" "al2023" { ami_name = "${local.ami_name_al2023}" - ami_description = "Amazon Linux AMI 2023.0.${var.ami_version} x86_64 ECS HVM EBS" + ami_description = "Amazon Linux AMI 2023.0.${var.ami_version_al2023} x86_64 ECS HVM EBS" instance_type = var.general_purpose_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,7 +28,7 @@ source "amazon-ebs" "al2023" { ecs_runtime_version = "Docker version ${var.docker_version_al2023}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2023" - ami_version = "2023.0.${var.ami_version}" + ami_version = "2023.0.${var.ami_version_al2023}" } } diff --git a/al2023arm.pkr.hcl b/al2023arm.pkr.hcl index 154d858..2bc8870 100644 --- a/al2023arm.pkr.hcl +++ b/al2023arm.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2023arm = "${var.ami_name_prefix_al2023}-hvm-2023.0.${var.ami_version}${var.kernel_version_al2023arm}-arm64" + ami_name_al2023arm = "${var.ami_name_prefix_al2023}-hvm-2023.0.${var.ami_version_al2023}${var.kernel_version_al2023arm}-arm64" } source "amazon-ebs" "al2023arm" { ami_name = "${local.ami_name_al2023arm}" - ami_description = "Amazon Linux AMI 2023.0.${var.ami_version} arm64 ECS HVM EBS" + ami_description = "Amazon Linux AMI 2023.0.${var.ami_version_al2023} arm64 ECS HVM EBS" instance_type = var.arm_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2023arm" { ecs_runtime_version = "Docker version ${var.docker_version_al2023}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2023arm" - ami_version = "2023.0.${var.ami_version}" + ami_version = "2023.0.${var.ami_version_al2023}" } } diff --git a/al2023neu.pkr.hcl b/al2023neu.pkr.hcl index 35ea4a1..1ea860e 100644 --- a/al2023neu.pkr.hcl +++ b/al2023neu.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2023neu = "${var.ami_name_prefix_al2023}-neuron-hvm-2023.0.${var.ami_version}${var.kernel_version_al2023}-x86_64" + ami_name_al2023neu = "${var.ami_name_prefix_al2023}-neuron-hvm-2023.0.${var.ami_version_al2023}${var.kernel_version_al2023}-x86_64" } source "amazon-ebs" "al2023neu" { ami_name = "${local.ami_name_al2023neu}" - ami_description = "Amazon Linux AMI 2023.0.${var.ami_version} x86_64 ECS HVM EBS" + ami_description = "Amazon Linux AMI 2023.0.${var.ami_version_al2023} x86_64 ECS HVM EBS" instance_type = var.neu_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,7 +28,7 @@ source "amazon-ebs" "al2023neu" { ecs_runtime_version = "Docker version ${var.docker_version_al2023}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2023neu" - ami_version = "2023.0.${var.ami_version}" + ami_version = "2023.0.${var.ami_version_al2023}" } } diff --git a/al2arm.pkr.hcl b/al2arm.pkr.hcl index 7aa99a1..88739fd 100644 --- a/al2arm.pkr.hcl +++ b/al2arm.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2arm = "${var.ami_name_prefix_al2}-hvm-2.0.${var.ami_version}-arm64-ebs" + ami_name_al2arm = "${var.ami_name_prefix_al2}-hvm-2.0.${var.ami_version_al2}-arm64-ebs" } source "amazon-ebs" "al2arm" { ami_name = "${local.ami_name_al2arm}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} arm64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} arm64 ECS HVM GP2" instance_type = var.arm_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2arm" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2arm" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/al2gpu.pkr.hcl b/al2gpu.pkr.hcl index baf74c2..02401c8 100644 --- a/al2gpu.pkr.hcl +++ b/al2gpu.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2gpu = "${var.ami_name_prefix_al2}-gpu-hvm-2.0.${var.ami_version}-x86_64-ebs" + ami_name_al2gpu = "${var.ami_name_prefix_al2}-gpu-hvm-2.0.${var.ami_version_al2}-x86_64-ebs" } source "amazon-ebs" "al2gpu" { ami_name = "${local.ami_name_al2gpu}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} x86_64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} x86_64 ECS HVM GP2" instance_type = var.gpu_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2gpu" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2gpu" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/al2inf.pkr.hcl b/al2inf.pkr.hcl index b13cf90..b44bc28 100644 --- a/al2inf.pkr.hcl +++ b/al2inf.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2inf = "${var.ami_name_prefix_al2}-inf-hvm-2.0.${var.ami_version}-x86_64-ebs" + ami_name_al2inf = "${var.ami_name_prefix_al2}-inf-hvm-2.0.${var.ami_version_al2}-x86_64-ebs" } source "amazon-ebs" "al2inf" { ami_name = "${local.ami_name_al2inf}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} x86_64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} x86_64 ECS HVM GP2" instance_type = var.inf_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2inf" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2inf" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/al2keplergpu.pkr.hcl b/al2keplergpu.pkr.hcl index 84dcdc8..5ffd504 100644 --- a/al2keplergpu.pkr.hcl +++ b/al2keplergpu.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2keplergpu = "${var.ami_name_prefix_al2}-kepler-gpu-hvm-2.0.${var.ami_version}-x86_64-ebs" + ami_name_al2keplergpu = "${var.ami_name_prefix_al2}-kepler-gpu-hvm-2.0.${var.ami_version_al2}-x86_64-ebs" } source "amazon-ebs" "al2keplergpu" { ami_name = "${local.ami_name_al2keplergpu}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} x86_64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} x86_64 ECS HVM GP2" instance_type = var.gpu_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2keplergpu" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2keplergpu" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/al2kernel5dot10.pkr.hcl b/al2kernel5dot10.pkr.hcl index b817043..0c730d0 100644 --- a/al2kernel5dot10.pkr.hcl +++ b/al2kernel5dot10.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2kernel5dot10 = "${var.ami_name_prefix_al2}-kernel-5.10-hvm-2.0.${var.ami_version}-x86_64-ebs" + ami_name_al2kernel5dot10 = "${var.ami_name_prefix_al2}-kernel-5.10-hvm-2.0.${var.ami_version_al2}-x86_64-ebs" } source "amazon-ebs" "al2kernel5dot10" { ami_name = "${local.ami_name_al2kernel5dot10}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} Kernel 5.10 x86_64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} Kernel 5.10 x86_64 ECS HVM GP2" instance_type = var.general_purpose_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2kernel5dot10" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2kernel5dot10" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/al2kernel5dot10arm.pkr.hcl b/al2kernel5dot10arm.pkr.hcl index 51c878b..c689b75 100644 --- a/al2kernel5dot10arm.pkr.hcl +++ b/al2kernel5dot10arm.pkr.hcl @@ -1,10 +1,10 @@ locals { - ami_name_al2kernel5dot10arm = "${var.ami_name_prefix_al2}-kernel-5.10-hvm-2.0.${var.ami_version}-arm64-ebs" + ami_name_al2kernel5dot10arm = "${var.ami_name_prefix_al2}-kernel-5.10-hvm-2.0.${var.ami_version_al2}-arm64-ebs" } source "amazon-ebs" "al2kernel5dot10arm" { ami_name = "${local.ami_name_al2kernel5dot10arm}" - ami_description = "Amazon Linux AMI 2.0.${var.ami_version} Kernel 5.10 arm64 ECS HVM GP2" + ami_description = "Amazon Linux AMI 2.0.${var.ami_version_al2} Kernel 5.10 arm64 ECS HVM GP2" instance_type = var.arm_instance_types[0] launch_block_device_mappings { volume_size = var.block_device_size_gb @@ -28,6 +28,6 @@ source "amazon-ebs" "al2kernel5dot10arm" { ecs_runtime_version = "Docker version ${var.docker_version}" ecs_agent_version = "${var.ecs_agent_version}" ami_type = "al2kernel5dot10arm" - ami_version = "2.0.${var.ami_version}" + ami_version = "2.0.${var.ami_version_al2}" } } diff --git a/generate-release-vars.sh b/generate-release-vars.sh index 8cbde63..18a0b78 100755 --- a/generate-release-vars.sh +++ b/generate-release-vars.sh @@ -40,7 +40,7 @@ case "$ami_type" in readonly exec_ssm_version=$(sed -n '/variable "exec_ssm_version" {/,/}/p' variables.pkr.hcl | grep "default" | awk -F '"' '{ print $2 }') cat >|release-al1.auto.pkrvars.hcl <|release-al2.auto.pkrvars.hcl <|release-al2023.auto.pkrvars.hcl <