File tree 3 files changed +11
-43
lines changed
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
+
1
5
locals {
2
6
environment = var. environment != null ? var. environment : " multi-runner"
3
7
aws_region = var. aws_region
4
8
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
+
5
14
# Load runner configurations from Yaml files
6
15
multi_runner_config_files = {
7
16
for c in fileset (" ${ path . module } /templates/runner-configs" , " *.yaml" ) :
@@ -19,6 +28,7 @@ locals {
19
28
{
20
29
subnet_ids = lookup (v. runner_config , " subnet_ids" , null ) != null ? [module.base.vpc.private_subnets[0 ]] : null
21
30
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
22
32
}
23
33
)
24
34
}
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ runner_config:
14
14
instance_types :
15
15
- m5ad.large
16
16
- m5a.large
17
+ ami_id_ssm_parameter_arn : ${ami_id_ssm_parameter_arn}
17
18
runners_maximum_count : 1
18
19
enable_ephemeral_runners : true
19
20
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