Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 12a403d

Browse files
committed
chore: SSM prefix (#2704)
1 parent 910b91c commit 12a403d

File tree

7 files changed

+13
-27
lines changed

7 files changed

+13
-27
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ We welcome any improvement to the standard module to make the default as secure
528528
| <a name="input_runners_scale_up_lambda_timeout"></a> [runners\_scale\_up\_lambda\_timeout](#input\_runners\_scale\_up\_lambda\_timeout) | Time out for the scale up lambda in seconds. | `number` | `30` | no |
529529
| <a name="input_scale_down_schedule_expression"></a> [scale\_down\_schedule\_expression](#input\_scale\_down\_schedule\_expression) | Scheduler expression to check every x for scale down. | `string` | `"cron(*/5 * * * ? *)"` | no |
530530
| <a name="input_scale_up_reserved_concurrent_executions"></a> [scale\_up\_reserved\_concurrent\_executions](#input\_scale\_up\_reserved\_concurrent\_executions) | Amount of reserved concurrent executions for the scale-up lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. | `number` | `1` | no |
531-
| <a name="input_ssm_paths"></a> [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secreets. | <pre>object({<br> root = string<br> use_prefix = bool<br> app = string<br> runners = string<br> })</pre> | <pre>{<br> "app": "app",<br> "root": "github-action-runners",<br> "runners": "runners",<br> "use_prefix": true<br>}</pre> | no |
531+
| <a name="input_ssm_paths"></a> [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secreets. | <pre>object({<br> root = optional(string, "github-action-runners")<br> app = optional(string, "app")<br> runners = optional(string, "runners")<br> use_prefix = optional(bool, true)<br> })</pre> | `{}` | no |
532532
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | n/a | yes |
533533
| <a name="input_syncer_lambda_s3_key"></a> [syncer\_lambda\_s3\_key](#input\_syncer\_lambda\_s3\_key) | S3 key for syncer lambda function. Required if using S3 bucket to specify lambdas. | `string` | `null` | no |
534534
| <a name="input_syncer_lambda_s3_object_version"></a> [syncer\_lambda\_s3\_object\_version](#input\_syncer\_lambda\_s3\_object\_version) | S3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no |

Diff for: examples/multi-runner/main.tf

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ resource "random_id" "random" {
77
byte_length = 20
88
}
99

10-
11-
################################################################################
12-
### Hybrid account
13-
################################################################################
14-
1510
module "multi-runner" {
1611
source = "../../modules/multi-runner"
1712
multi_runner_config = {

Diff for: modules/multi-runner/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ module "multi-runner" {
156156
| <a name="input_runners_lambda_zip"></a> [runners\_lambda\_zip](#input\_runners\_lambda\_zip) | File location of the lambda zip file for scaling runners. | `string` | `null` | no |
157157
| <a name="input_runners_scale_down_lambda_timeout"></a> [runners\_scale\_down\_lambda\_timeout](#input\_runners\_scale\_down\_lambda\_timeout) | Time out for the scale down lambda in seconds. | `number` | `60` | no |
158158
| <a name="input_runners_scale_up_lambda_timeout"></a> [runners\_scale\_up\_lambda\_timeout](#input\_runners\_scale\_up\_lambda\_timeout) | Time out for the scale up lambda in seconds. | `number` | `30` | no |
159-
| <a name="input_ssm_paths"></a> [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secreets. | <pre>object({<br> root = string<br> app = string<br> runners = string<br> })</pre> | <pre>{<br> "app": "app",<br> "root": "github-action-runners",<br> "runners": "runners"<br>}</pre> | no |
159+
| <a name="input_ssm_paths"></a> [ssm\_paths](#input\_ssm\_paths) | The root path used in SSM to store configuration and secreets. | <pre>object({<br> root = optional(string, "github-action-runners")<br> app = optional(string, "app")<br> runners = optional(string, "runners")<br> })</pre> | `{}` | no |
160160
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | n/a | yes |
161161
| <a name="input_syncer_lambda_s3_key"></a> [syncer\_lambda\_s3\_key](#input\_syncer\_lambda\_s3\_key) | S3 key for syncer lambda function. Required if using S3 bucket to specify lambdas. | `string` | `null` | no |
162162
| <a name="input_syncer_lambda_s3_object_version"></a> [syncer\_lambda\_s3\_object\_version](#input\_syncer\_lambda\_s3\_object\_version) | S3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket. | `string` | `null` | no |

Diff for: modules/multi-runner/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ locals {
1313
tmp_distinct_list_unique_os_and_arch = distinct([for i, config in local.runner_config : { "os_type" : config.runner_config.runner_os, "architecture" : config.runner_config.runner_architecture } if config.runner_config.enable_runner_binaries_syncer])
1414
unique_os_and_arch = { for i, v in local.tmp_distinct_list_unique_os_and_arch : "${v.os_type}_${v.architecture}" => v }
1515

16-
ssm_root_path = "/${var.ssm_paths.root}"
16+
ssm_root_path = "/${var.ssm_paths.root}/${var.prefix}"
1717
}
1818

1919
resource "random_string" "random" {

Diff for: modules/multi-runner/runners.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module "runners" {
1313
s3_runner_binaries = each.value.runner_config.enable_runner_binaries_syncer ? local.runner_binaries_by_os_and_arch_map["${each.value.runner_config.runner_os}_${each.value.runner_config.runner_architecture}"] : null
1414

1515
ssm_paths = {
16-
root = "${local.ssm_root_path}/${var.prefix}-${each.key}"
16+
root = "${local.ssm_root_path}/${each.key}"
1717
tokens = "${var.ssm_paths.runners}/tokens"
1818
config = "${var.ssm_paths.runners}/config"
1919
}

Diff for: modules/multi-runner/variables.tf

+4-8
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,9 @@ variable "workflow_job_queue_configuration" {
515515
variable "ssm_paths" {
516516
description = "The root path used in SSM to store configuration and secreets."
517517
type = object({
518-
root = string
519-
app = string
520-
runners = string
518+
root = optional(string, "github-action-runners")
519+
app = optional(string, "app")
520+
runners = optional(string, "runners")
521521
})
522-
default = {
523-
root = "github-action-runners"
524-
runners = "runners"
525-
app = "app"
526-
}
522+
default = {}
527523
}

Diff for: variables.tf

+5-10
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,10 @@ variable "enable_user_data_debug_logging_runner" {
756756
variable "ssm_paths" {
757757
description = "The root path used in SSM to store configuration and secreets."
758758
type = object({
759-
root = string
760-
use_prefix = bool
761-
app = string
762-
runners = string
759+
root = optional(string, "github-action-runners")
760+
app = optional(string, "app")
761+
runners = optional(string, "runners")
762+
use_prefix = optional(bool, true)
763763
})
764-
default = {
765-
root = "github-action-runners"
766-
use_prefix = true
767-
runners = "runners"
768-
app = "app"
769-
}
764+
default = {}
770765
}

0 commit comments

Comments
 (0)