File tree Expand file tree Collapse file tree 3 files changed +11
-43
lines changed Expand file tree Collapse file tree 3 files changed +11
-43
lines changed Original file line number Diff line number Diff line change 1+ data "aws_ssm_parameter" "al2023_arm" {
2+ name = " /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64"
3+ }
4+
15locals {
26 environment = var. environment != null ? var. environment : " multi-runner"
37 aws_region = var. aws_region
48
9+ # create map only with amazon linux 2023 x64 ami id
10+ ssm_ami_ids = {
11+ " linux-x64" = data.aws_ssm_parameter.al2023_arm.arn
12+ }
13+
514 # Load runner configurations from Yaml files
615 multi_runner_config_files = {
716 for c in fileset (" ${ path . module } /templates/runner-configs" , " *.yaml" ) :
@@ -19,6 +28,7 @@ locals {
1928 {
2029 subnet_ids = lookup (v. runner_config , " subnet_ids" , null ) != null ? [module.base.vpc.private_subnets[0 ]] : null
2130 vpc_id = lookup (v. runner_config , " vpc_id" , null ) != null ? module.base.vpc.vpc_id : null
31+ ami_id_ssm_parameter_arn = lookup (local. ssm_ami_ids , k, null ) != null ? local.ssm_ami_ids[k] : null
2232 }
2333 )
2434 }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ runner_config:
1414 instance_types :
1515 - m5ad.large
1616 - m5a.large
17+ ami_id_ssm_parameter_arn : ${ami_id_ssm_parameter_arn}
1718 runners_maximum_count : 1
1819 enable_ephemeral_runners : true
1920 enable_on_demand_failover_for_errors : ['InsufficientInstanceCapacity']
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments