terraform-cdk-serverless-github-actions-runner-controller 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +128 -5
- package/API.md +74 -1
- package/biome.jsonc +66 -0
- package/lib/lib/aws.d.ts +16 -1
- package/lib/lib/aws.js +275 -280
- package/lib/lib/azure.d.ts +1 -1
- package/lib/lib/azure.js +105 -130
- package/lib/lib/gcp.d.ts +1 -1
- package/lib/lib/gcp.js +46 -48
- package/lib/lib/variables.d.ts +3 -2
- package/lib/lib/variables.js +11 -5
- package/lib/tfModules.js +40 -10
- package/modules/azure-container-apps/README.md +2 -1
- package/modules/azure-container-apps/cdk.tf.json +10 -6
- package/modules/elastic-container-service/README.md +25 -24
- package/modules/elastic-container-service/cdk.tf.json +64 -74
- package/modules/google-cloud-run/README.md +18 -17
- package/modules/google-cloud-run/cdk.tf.json +10 -6
- package/package.json +16 -69
- package/renovate.json5 +42 -0
- package/vitest.config.ts +28 -0
- package/lib/__tests__/index-test.d.ts +0 -1
- package/lib/__tests__/index-test.js +0 -26
- package/main.tf +0 -26
- package/scripts/collect-variables.ts +0 -188
- package/variables.tf +0 -27
|
@@ -36,6 +36,16 @@
|
|
|
36
36
|
"path": "elastic-container-service/aws/SecurityGroups",
|
|
37
37
|
"uniqueId": "aws_SecurityGroups_BAABB08D"
|
|
38
38
|
}
|
|
39
|
+
},
|
|
40
|
+
"dynamic": {
|
|
41
|
+
"filter": {
|
|
42
|
+
"content": {
|
|
43
|
+
"name": "${each.value.name}",
|
|
44
|
+
"values": "${each.value.values}"
|
|
45
|
+
},
|
|
46
|
+
"for_each": "${toset(var.ecs_security_group_filters)}",
|
|
47
|
+
"iterator": "each"
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
}
|
|
41
51
|
},
|
|
@@ -46,6 +56,16 @@
|
|
|
46
56
|
"path": "elastic-container-service/aws/Subnets",
|
|
47
57
|
"uniqueId": "aws_Subnets_75E5377D"
|
|
48
58
|
}
|
|
59
|
+
},
|
|
60
|
+
"dynamic": {
|
|
61
|
+
"filter": {
|
|
62
|
+
"content": {
|
|
63
|
+
"name": "${each.value.name}",
|
|
64
|
+
"values": "${each.value.values}"
|
|
65
|
+
},
|
|
66
|
+
"for_each": "${toset(var.ecs_subnet_filters)}",
|
|
67
|
+
"iterator": "each"
|
|
68
|
+
}
|
|
49
69
|
}
|
|
50
70
|
}
|
|
51
71
|
}
|
|
@@ -79,7 +99,7 @@
|
|
|
79
99
|
"uniqueId": "aws_Cluster_BA268616"
|
|
80
100
|
}
|
|
81
101
|
},
|
|
82
|
-
"name": "
|
|
102
|
+
"name": "${var.ecs_cluster_name}"
|
|
83
103
|
}
|
|
84
104
|
},
|
|
85
105
|
"aws_ecs_service": {
|
|
@@ -115,7 +135,7 @@
|
|
|
115
135
|
"uniqueId": "aws_AutoscalerTaskDefinition_24A76F67"
|
|
116
136
|
}
|
|
117
137
|
},
|
|
118
|
-
"container_definitions": "${jsonencode([{\"name\" = \"autoscaler\", \"image\" =
|
|
138
|
+
"container_definitions": "${jsonencode([{\"name\" = \"autoscaler\", \"image\" = var.autoscaler_image, \"essential\" = true, \"environment\" = [{\"name\" = \"PAT\", \"value\" = var.personal_access_token}, {\"name\" = \"GITHUB_CONFIG_URL\", \"value\" = var.github_config_url}, {\"name\" = \"ECS_CLUSTER\", \"value\" = aws_ecs_cluster.aws_Cluster_BA268616.arn}, {\"name\" = \"ECS_SUBNETS\", \"value\" = join(\",\", data.aws_subnets.aws_Subnets_75E5377D.ids)}, {\"name\" = \"ECS_SECURITY_GROUPS\", \"value\" = join(\",\", data.aws_security_groups.aws_SecurityGroups_BAABB08D.ids)}, {\"name\" = \"SCALE_SET_NAME\", \"value\" = \"ecs-runner-set\"}, {\"name\" = \"TASK_DEFINITION_ARN\", \"value\" = aws_ecs_task_definition.aws_RunnerTaskDefinition_9C7563BE.arn}], \"logConfiguration\" = {\"logDriver\" = \"awslogs\", \"options\" = {\"awslogs-group\" = aws_cloudwatch_log_group.aws_AutoscalerLogGroup_BFE58053.name, \"awslogs-region\" = data.aws_region.aws_Region_7477CA06.name, \"awslogs-stream-prefix\" = \"ecs\"}}}])}",
|
|
119
139
|
"cpu": "256",
|
|
120
140
|
"execution_role_arn": "${aws_iam_role.aws_TaskExecutionRole_FAB64402.arn}",
|
|
121
141
|
"family": "Autoscaler",
|
|
@@ -137,7 +157,7 @@
|
|
|
137
157
|
"uniqueId": "aws_RunnerTaskDefinition_9C7563BE"
|
|
138
158
|
}
|
|
139
159
|
},
|
|
140
|
-
"container_definitions": "${jsonencode([{\"name\" = \"runner\", \"image\" = \"ghcr.io/
|
|
160
|
+
"container_definitions": "${jsonencode([{\"name\" = \"runner\", \"image\" = \"ghcr.io/actions/actions-runner:2.323.0\", \"essential\" = true, \"entryPoint\" = [\"/home/runner/run.sh\"], \"environment\" = [{\"name\" = \"ECS_CLUSTER_NAME\", \"value\" = aws_ecs_cluster.aws_Cluster_BA268616.name}, {\"name\" = \"ACTIONS_RUNNER_POD_NAME\", \"value\" = \"gha-pod\"}, {\"name\" = \"ECS_SUBNETS\", \"value\" = join(\",\", data.aws_subnets.aws_Subnets_75E5377D.ids)}, {\"name\" = \"ECS_SECURITY_GROUPS\", \"value\" = join(\",\", data.aws_security_groups.aws_SecurityGroups_BAABB08D.ids)}, {\"name\" = \"ECS_TASK_ROLE\", \"value\" = aws_iam_role.aws_RunnerRole_75263C23.arn}, {\"name\" = \"ECS_EXECUTION_ROLE\", \"value\" = aws_iam_role.aws_TaskExecutionRole_FAB64402.arn}], \"mountPoints\" = [], \"logConfiguration\" = {\"logDriver\" = \"awslogs\", \"options\" = {\"awslogs-group\" = aws_cloudwatch_log_group.aws_RunnerLogGroup_711756A6.name, \"awslogs-region\" = data.aws_region.aws_Region_7477CA06.name, \"awslogs-stream-prefix\" = \"ecs\"}}}])}",
|
|
141
161
|
"cpu": "1024",
|
|
142
162
|
"execution_role_arn": "${aws_iam_role.aws_TaskExecutionRole_FAB64402.arn}",
|
|
143
163
|
"family": "GHA",
|
|
@@ -152,71 +172,9 @@
|
|
|
152
172
|
},
|
|
153
173
|
"task_role_arn": "${aws_iam_role.aws_RunnerRole_75263C23.arn}",
|
|
154
174
|
"volume": [
|
|
155
|
-
{
|
|
156
|
-
"efs_volume_configuration": {
|
|
157
|
-
"file_system_id": "${aws_efs_file_system.aws_efs_B3BBB350.id}"
|
|
158
|
-
},
|
|
159
|
-
"name": "work"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"efs_volume_configuration": {
|
|
163
|
-
"file_system_id": "${aws_efs_file_system.aws_externalsEfs_C15353C9.id}"
|
|
164
|
-
},
|
|
165
|
-
"name": "externals"
|
|
166
|
-
}
|
|
167
175
|
]
|
|
168
176
|
}
|
|
169
177
|
},
|
|
170
|
-
"aws_efs_file_system": {
|
|
171
|
-
"aws_efs_B3BBB350": {
|
|
172
|
-
"//": {
|
|
173
|
-
"metadata": {
|
|
174
|
-
"path": "elastic-container-service/aws/efs",
|
|
175
|
-
"uniqueId": "aws_efs_B3BBB350"
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"tags": {
|
|
179
|
-
"Name": "work"
|
|
180
|
-
},
|
|
181
|
-
"throughput_mode": "elastic"
|
|
182
|
-
},
|
|
183
|
-
"aws_externalsEfs_C15353C9": {
|
|
184
|
-
"//": {
|
|
185
|
-
"metadata": {
|
|
186
|
-
"path": "elastic-container-service/aws/externalsEfs",
|
|
187
|
-
"uniqueId": "aws_externalsEfs_C15353C9"
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
"tags": {
|
|
191
|
-
"Name": "externals"
|
|
192
|
-
},
|
|
193
|
-
"throughput_mode": "elastic"
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"aws_efs_mount_target": {
|
|
197
|
-
"aws_EfsMountTarget_B2BDD3E5": {
|
|
198
|
-
"//": {
|
|
199
|
-
"metadata": {
|
|
200
|
-
"path": "elastic-container-service/aws/EfsMountTarget",
|
|
201
|
-
"uniqueId": "aws_EfsMountTarget_B2BDD3E5"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"file_system_id": "${aws_efs_file_system.aws_efs_B3BBB350.id}",
|
|
205
|
-
"for_each": "${toset(data.aws_subnets.aws_Subnets_75E5377D.ids)}",
|
|
206
|
-
"subnet_id": "${each.value}"
|
|
207
|
-
},
|
|
208
|
-
"aws_ExternalsEfsMountTarget_2D9AE418": {
|
|
209
|
-
"//": {
|
|
210
|
-
"metadata": {
|
|
211
|
-
"path": "elastic-container-service/aws/ExternalsEfsMountTarget",
|
|
212
|
-
"uniqueId": "aws_ExternalsEfsMountTarget_2D9AE418"
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
"file_system_id": "${aws_efs_file_system.aws_externalsEfs_C15353C9.id}",
|
|
216
|
-
"for_each": "${toset(data.aws_subnets.aws_Subnets_75E5377D.ids)}",
|
|
217
|
-
"subnet_id": "${each.value}"
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
178
|
"aws_iam_policy": {
|
|
221
179
|
"aws_AutoscalerPolicy_FF16A997": {
|
|
222
180
|
"//": {
|
|
@@ -263,10 +221,7 @@
|
|
|
263
221
|
"uniqueId": "aws_TaskExecutionRole_FAB64402"
|
|
264
222
|
}
|
|
265
223
|
},
|
|
266
|
-
"assume_role_policy": "${jsonencode({\"Version\" = \"2012-10-17\", \"Statement\" = [{\"Effect\" = \"Allow\", \"Principal\" = {\"Service\" = \"ecs-tasks.amazonaws.com\"}, \"Action\" = \"sts:AssumeRole\"}]})}"
|
|
267
|
-
"managed_policy_arns": [
|
|
268
|
-
"arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
|
|
269
|
-
]
|
|
224
|
+
"assume_role_policy": "${jsonencode({\"Version\" = \"2012-10-17\", \"Statement\" = [{\"Effect\" = \"Allow\", \"Principal\" = {\"Service\" = \"ecs-tasks.amazonaws.com\"}, \"Action\" = \"sts:AssumeRole\"}]})}"
|
|
270
225
|
}
|
|
271
226
|
},
|
|
272
227
|
"aws_iam_role_policy_attachment": {
|
|
@@ -289,6 +244,16 @@
|
|
|
289
244
|
},
|
|
290
245
|
"policy_arn": "${aws_iam_policy.aws_RunnerPolicy_7B21DB81.arn}",
|
|
291
246
|
"role": "${aws_iam_role.aws_RunnerRole_75263C23.name}"
|
|
247
|
+
},
|
|
248
|
+
"aws_TeskExecutionRoleAttachment_9AEA9D8D": {
|
|
249
|
+
"//": {
|
|
250
|
+
"metadata": {
|
|
251
|
+
"path": "elastic-container-service/aws/TeskExecutionRoleAttachment",
|
|
252
|
+
"uniqueId": "aws_TeskExecutionRoleAttachment_9AEA9D8D"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"policy_arn": "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy",
|
|
256
|
+
"role": "${aws_iam_role.aws_TaskExecutionRole_FAB64402.name}"
|
|
292
257
|
}
|
|
293
258
|
}
|
|
294
259
|
},
|
|
@@ -296,19 +261,44 @@
|
|
|
296
261
|
"required_providers": {
|
|
297
262
|
"aws": {
|
|
298
263
|
"source": "aws",
|
|
299
|
-
"version": "5.
|
|
264
|
+
"version": "5.97.0"
|
|
300
265
|
}
|
|
301
266
|
}
|
|
302
267
|
},
|
|
303
268
|
"variable": {
|
|
304
|
-
"
|
|
305
|
-
"
|
|
306
|
-
"
|
|
307
|
-
"sensitive": true
|
|
269
|
+
"autoscaler_image": {
|
|
270
|
+
"default": "ghcr.io/hi-fi/gha-runners-on-managed-env:ebe559da0d51e04eff903f0a04de09da93f4614f",
|
|
271
|
+
"description": "Autoscaler image triggering runners"
|
|
308
272
|
},
|
|
273
|
+
"ecs_cluster_name": [
|
|
274
|
+
{
|
|
275
|
+
"description": "Name of the ECS cluster to create"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"ecs_security_group_filters": [
|
|
279
|
+
{
|
|
280
|
+
"default": [
|
|
281
|
+
],
|
|
282
|
+
"description": "Filters for security groups",
|
|
283
|
+
"type": "list(object({name=string, values=list(string)}))"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"ecs_subnet_filters": [
|
|
287
|
+
{
|
|
288
|
+
"default": [
|
|
289
|
+
],
|
|
290
|
+
"description": "Filters for security groups",
|
|
291
|
+
"type": "list(object({name=string, values=list(string)}))"
|
|
292
|
+
}
|
|
293
|
+
],
|
|
309
294
|
"github_config_url": {
|
|
310
295
|
"description": "Github URL where runners should register to. Format https://<GitHub host>/<your_enterprise/org/repo>",
|
|
311
296
|
"nullable": false
|
|
297
|
+
},
|
|
298
|
+
"personal_access_token": {
|
|
299
|
+
"description": "Github PAT with Actions:Read and Admin:Read+Write scopes",
|
|
300
|
+
"nullable": false,
|
|
301
|
+
"sensitive": true
|
|
312
302
|
}
|
|
313
303
|
}
|
|
314
304
|
}
|
|
@@ -15,14 +15,14 @@ module "arc_on_aca" {
|
|
|
15
15
|
|
|
16
16
|
| Name | Version |
|
|
17
17
|
|------|---------|
|
|
18
|
-
| <a name="requirement_google"></a> [google](#requirement\_google) | 6.
|
|
18
|
+
| <a name="requirement_google"></a> [google](#requirement\_google) | 6.34.0 |
|
|
19
19
|
| <a name="requirement_null"></a> [null](#requirement\_null) | 3.2.4 |
|
|
20
20
|
|
|
21
21
|
## Providers
|
|
22
22
|
|
|
23
23
|
| Name | Version |
|
|
24
24
|
|------|---------|
|
|
25
|
-
| <a name="provider_google"></a> [google](#provider\_google) | 6.
|
|
25
|
+
| <a name="provider_google"></a> [google](#provider\_google) | 6.34.0 |
|
|
26
26
|
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.4 |
|
|
27
27
|
|
|
28
28
|
## Modules
|
|
@@ -33,28 +33,29 @@ No modules.
|
|
|
33
33
|
|
|
34
34
|
| Name | Type |
|
|
35
35
|
|------|------|
|
|
36
|
-
| [google_artifact_registry_repository.cr_registry_886F88F0](https://registry.terraform.io/providers/google/6.
|
|
37
|
-
| [google_cloud_run_service.cr_autoscalerService_A4FAA2B6](https://registry.terraform.io/providers/google/6.
|
|
38
|
-
| [google_cloud_run_v2_job.cr_ghaJob_3BDFC08A](https://registry.terraform.io/providers/google/6.
|
|
39
|
-
| [google_project_iam_custom_role.cr_autoscalerRole_8A950337](https://registry.terraform.io/providers/google/6.
|
|
40
|
-
| [google_project_iam_custom_role.cr_runnerRole_07508BC4](https://registry.terraform.io/providers/google/6.
|
|
41
|
-
| [google_project_iam_member.cr_autoscalerRoleBindingRunServiceAgent_83C78179](https://registry.terraform.io/providers/google/6.
|
|
42
|
-
| [google_project_iam_member.cr_autoscalerRoleBindingRun_76E1E813](https://registry.terraform.io/providers/google/6.
|
|
43
|
-
| [google_project_iam_member.cr_autoscalerRoleBindingStorage_C1A676AA](https://registry.terraform.io/providers/google/6.
|
|
44
|
-
| [google_project_iam_member.cr_runnerRoleBindingRunServiceAgent_88652FB8](https://registry.terraform.io/providers/google/6.
|
|
45
|
-
| [google_project_iam_member.cr_runnerRoleBindingRunViewer_328C548F](https://registry.terraform.io/providers/google/6.
|
|
46
|
-
| [google_project_iam_member.cr_runnerRoleBindingStorage_8D8C3B87](https://registry.terraform.io/providers/google/6.
|
|
47
|
-
| [google_project_iam_member.cr_runnerRoleBinding_E20193A5](https://registry.terraform.io/providers/google/6.
|
|
48
|
-
| [google_service_account.cr_autoscalerServiceAccount_37C5FFAD](https://registry.terraform.io/providers/google/6.
|
|
49
|
-
| [google_service_account.cr_jobServiceAccount_4D2CB679](https://registry.terraform.io/providers/google/6.
|
|
36
|
+
| [google_artifact_registry_repository.cr_registry_886F88F0](https://registry.terraform.io/providers/google/6.34.0/docs/resources/artifact_registry_repository) | resource |
|
|
37
|
+
| [google_cloud_run_service.cr_autoscalerService_A4FAA2B6](https://registry.terraform.io/providers/google/6.34.0/docs/resources/cloud_run_service) | resource |
|
|
38
|
+
| [google_cloud_run_v2_job.cr_ghaJob_3BDFC08A](https://registry.terraform.io/providers/google/6.34.0/docs/resources/cloud_run_v2_job) | resource |
|
|
39
|
+
| [google_project_iam_custom_role.cr_autoscalerRole_8A950337](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_custom_role) | resource |
|
|
40
|
+
| [google_project_iam_custom_role.cr_runnerRole_07508BC4](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_custom_role) | resource |
|
|
41
|
+
| [google_project_iam_member.cr_autoscalerRoleBindingRunServiceAgent_83C78179](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
42
|
+
| [google_project_iam_member.cr_autoscalerRoleBindingRun_76E1E813](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
43
|
+
| [google_project_iam_member.cr_autoscalerRoleBindingStorage_C1A676AA](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
44
|
+
| [google_project_iam_member.cr_runnerRoleBindingRunServiceAgent_88652FB8](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
45
|
+
| [google_project_iam_member.cr_runnerRoleBindingRunViewer_328C548F](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
46
|
+
| [google_project_iam_member.cr_runnerRoleBindingStorage_8D8C3B87](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
47
|
+
| [google_project_iam_member.cr_runnerRoleBinding_E20193A5](https://registry.terraform.io/providers/google/6.34.0/docs/resources/project_iam_member) | resource |
|
|
48
|
+
| [google_service_account.cr_autoscalerServiceAccount_37C5FFAD](https://registry.terraform.io/providers/google/6.34.0/docs/resources/service_account) | resource |
|
|
49
|
+
| [google_service_account.cr_jobServiceAccount_4D2CB679](https://registry.terraform.io/providers/google/6.34.0/docs/resources/service_account) | resource |
|
|
50
50
|
| [null_resource.cr_gcloud_3D7A726F](https://registry.terraform.io/providers/null/3.2.4/docs/resources/resource) | resource |
|
|
51
51
|
|
|
52
52
|
## Inputs
|
|
53
53
|
|
|
54
54
|
| Name | Description | Type | Default | Required |
|
|
55
55
|
|------|-------------|------|---------|:--------:|
|
|
56
|
-
| <a name="
|
|
56
|
+
| <a name="input_autoscaler_image"></a> [autoscaler\_image](#input\_autoscaler\_image) | Autoscaler image triggering runners | `string` | `"ghcr.io/hi-fi/gha-runners-on-managed-env:ebe559da0d51e04eff903f0a04de09da93f4614f"` | no |
|
|
57
57
|
| <a name="input_github_config_url"></a> [github\_config\_url](#input\_github\_config\_url) | Github URL where runners should register to. Format https://<GitHub host>/<your\_enterprise/org/repo> | `any` | n/a | yes |
|
|
58
|
+
| <a name="input_personal_access_token"></a> [personal\_access\_token](#input\_personal\_access\_token) | Github PAT with Actions:Read and Admin:Read+Write scopes | `any` | n/a | yes |
|
|
58
59
|
|
|
59
60
|
## Outputs
|
|
60
61
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"env": [
|
|
67
67
|
{
|
|
68
68
|
"name": "PAT",
|
|
69
|
-
"value": "${var.
|
|
69
|
+
"value": "${var.personal_access_token}"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"name": "GITHUB_CONFIG_URL",
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
"required_providers": {
|
|
334
334
|
"google": {
|
|
335
335
|
"source": "google",
|
|
336
|
-
"version": "6.
|
|
336
|
+
"version": "6.34.0"
|
|
337
337
|
},
|
|
338
338
|
"null": {
|
|
339
339
|
"source": "null",
|
|
@@ -342,14 +342,18 @@
|
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
"variable": {
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
"
|
|
348
|
-
"sensitive": true
|
|
345
|
+
"autoscaler_image": {
|
|
346
|
+
"default": "ghcr.io/hi-fi/gha-runners-on-managed-env:ebe559da0d51e04eff903f0a04de09da93f4614f",
|
|
347
|
+
"description": "Autoscaler image triggering runners"
|
|
349
348
|
},
|
|
350
349
|
"github_config_url": {
|
|
351
350
|
"description": "Github URL where runners should register to. Format https://<GitHub host>/<your_enterprise/org/repo>",
|
|
352
351
|
"nullable": false
|
|
352
|
+
},
|
|
353
|
+
"personal_access_token": {
|
|
354
|
+
"description": "Github PAT with Actions:Read and Admin:Read+Write scopes",
|
|
355
|
+
"nullable": false,
|
|
356
|
+
"sensitive": true
|
|
353
357
|
}
|
|
354
358
|
}
|
|
355
359
|
}
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/Hi-Fi/terraform-cdk-serverless-github-actions-runner-controller.git"
|
|
6
6
|
},
|
|
7
7
|
"scripts": {
|
|
8
|
+
"biome": "npx projen biome",
|
|
8
9
|
"build": "npx projen build",
|
|
9
10
|
"bump": "npx projen bump",
|
|
10
11
|
"clobber": "npx projen clobber",
|
|
@@ -13,7 +14,6 @@
|
|
|
13
14
|
"default": "npx projen default",
|
|
14
15
|
"docgen": "npx projen docgen",
|
|
15
16
|
"eject": "npx projen eject",
|
|
16
|
-
"eslint": "npx projen eslint",
|
|
17
17
|
"package": "npx projen package",
|
|
18
18
|
"package-all": "npx projen package-all",
|
|
19
19
|
"package:js": "npx projen package:js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"pre-compile": "npx projen pre-compile",
|
|
23
23
|
"release": "npx projen release",
|
|
24
24
|
"test": "npx projen test",
|
|
25
|
+
"test:update": "npx projen test:update",
|
|
25
26
|
"test:watch": "npx projen test:watch",
|
|
26
27
|
"unbump": "npx projen unbump",
|
|
27
28
|
"upgrade": "npx projen upgrade",
|
|
@@ -35,38 +36,31 @@
|
|
|
35
36
|
"organization": false
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@aws-sdk/client-ecs": "^3.
|
|
39
|
-
"@
|
|
39
|
+
"@aws-sdk/client-ecs": "^3.804.0",
|
|
40
|
+
"@biomejs/biome": "^1",
|
|
41
|
+
"@cdktf/provider-aws": "19.63.0",
|
|
40
42
|
"@cdktf/provider-azurerm": "13.26.0",
|
|
41
|
-
"@cdktf/provider-google": "14.
|
|
43
|
+
"@cdktf/provider-google": "14.33.0",
|
|
42
44
|
"@cdktf/provider-null": "10.0.2",
|
|
43
45
|
"@cdktf/provider-random": "11.1.1",
|
|
44
|
-
"@
|
|
46
|
+
"@nikovirtala/projen-vitest": "^2.0.27",
|
|
45
47
|
"@types/node": "ts5.6",
|
|
46
|
-
"@
|
|
47
|
-
"@typescript-eslint/parser": "^8",
|
|
48
|
+
"@vitest/coverage-v8": "^3",
|
|
48
49
|
"cdktf": "0.20.0",
|
|
49
50
|
"cdktf-cli": "~0.20.0",
|
|
50
51
|
"commit-and-tag-version": "^12",
|
|
51
52
|
"constructs": "10.4.2",
|
|
52
|
-
"eslint": "^9",
|
|
53
|
-
"eslint-config-prettier": "^10.1.2",
|
|
54
|
-
"eslint-import-resolver-typescript": "^4.3.4",
|
|
55
|
-
"eslint-plugin-import": "^2.31.0",
|
|
56
|
-
"eslint-plugin-prettier": "^5.2.6",
|
|
57
|
-
"jest": "^29.7.0",
|
|
58
|
-
"jest-junit": "^16",
|
|
59
53
|
"jsii": "~5.6.0",
|
|
60
|
-
"jsii-diff": "^1.
|
|
54
|
+
"jsii-diff": "^1.112.0",
|
|
61
55
|
"jsii-docgen": "^10.0.0",
|
|
62
|
-
"jsii-pacmak": "^1.
|
|
56
|
+
"jsii-pacmak": "^1.112.0",
|
|
63
57
|
"jsii-rosetta": "~5.6.0",
|
|
64
|
-
"
|
|
65
|
-
"projen": "^0.
|
|
66
|
-
"projen-cdktf-hybrid-construct": "^0.9.
|
|
67
|
-
"ts-jest": "^29.3.2",
|
|
58
|
+
"projen": "^0.92.2",
|
|
59
|
+
"projen-biome": "^0.0.1",
|
|
60
|
+
"projen-cdktf-hybrid-construct": "^0.9.26",
|
|
68
61
|
"ts-node": ">=10.9.1",
|
|
69
|
-
"typescript": "~5.6.0"
|
|
62
|
+
"typescript": "~5.6.0",
|
|
63
|
+
"vitest": "^3"
|
|
70
64
|
},
|
|
71
65
|
"peerDependencies": {
|
|
72
66
|
"@cdktf/provider-aws": "^19.62.0",
|
|
@@ -91,54 +85,7 @@
|
|
|
91
85
|
"publishConfig": {
|
|
92
86
|
"access": "public"
|
|
93
87
|
},
|
|
94
|
-
"version": "0.0.
|
|
95
|
-
"jest": {
|
|
96
|
-
"coverageProvider": "v8",
|
|
97
|
-
"testMatch": [
|
|
98
|
-
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
99
|
-
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)",
|
|
100
|
-
"<rootDir>/@(projenrc)/**/*(*.)@(spec|test).ts?(x)",
|
|
101
|
-
"<rootDir>/@(projenrc)/**/__tests__/**/*.ts?(x)"
|
|
102
|
-
],
|
|
103
|
-
"clearMocks": true,
|
|
104
|
-
"collectCoverage": true,
|
|
105
|
-
"coverageReporters": [
|
|
106
|
-
"json",
|
|
107
|
-
"lcov",
|
|
108
|
-
"clover",
|
|
109
|
-
"cobertura",
|
|
110
|
-
"text"
|
|
111
|
-
],
|
|
112
|
-
"coverageDirectory": "coverage",
|
|
113
|
-
"coveragePathIgnorePatterns": [
|
|
114
|
-
"/node_modules/",
|
|
115
|
-
"dist"
|
|
116
|
-
],
|
|
117
|
-
"testPathIgnorePatterns": [
|
|
118
|
-
"/node_modules/",
|
|
119
|
-
"dist"
|
|
120
|
-
],
|
|
121
|
-
"watchPathIgnorePatterns": [
|
|
122
|
-
"/node_modules/"
|
|
123
|
-
],
|
|
124
|
-
"reporters": [
|
|
125
|
-
"default",
|
|
126
|
-
[
|
|
127
|
-
"jest-junit",
|
|
128
|
-
{
|
|
129
|
-
"outputDirectory": "test-reports"
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
],
|
|
133
|
-
"transform": {
|
|
134
|
-
"^.+\\.[t]sx?$": [
|
|
135
|
-
"ts-jest",
|
|
136
|
-
{
|
|
137
|
-
"tsconfig": "tsconfig.dev.json"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
},
|
|
88
|
+
"version": "0.0.3",
|
|
142
89
|
"types": "lib/index.d.ts",
|
|
143
90
|
"stability": "stable",
|
|
144
91
|
"jsii": {
|
package/renovate.json5
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
|
|
2
|
+
{
|
|
3
|
+
"schedule": [
|
|
4
|
+
"at any time"
|
|
5
|
+
],
|
|
6
|
+
"extends": [
|
|
7
|
+
":preserveSemverRanges",
|
|
8
|
+
"config:recommended",
|
|
9
|
+
"group:allNonMajor",
|
|
10
|
+
"group:recommended",
|
|
11
|
+
"group:monorepos"
|
|
12
|
+
],
|
|
13
|
+
"packageRules": [
|
|
14
|
+
{
|
|
15
|
+
"matchDepTypes": [
|
|
16
|
+
"devDependencies"
|
|
17
|
+
],
|
|
18
|
+
"matchUpdateTypes": [
|
|
19
|
+
"patch",
|
|
20
|
+
"minor"
|
|
21
|
+
],
|
|
22
|
+
"groupName": "devDependencies (non-major)"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"ignoreDeps": [
|
|
26
|
+
"@biomejs/biome",
|
|
27
|
+
"@types/node",
|
|
28
|
+
"cdktf-cli",
|
|
29
|
+
"cdktf",
|
|
30
|
+
"commit-and-tag-version",
|
|
31
|
+
"constructs",
|
|
32
|
+
"jsii-docgen",
|
|
33
|
+
"jsii-rosetta",
|
|
34
|
+
"jsii",
|
|
35
|
+
"ts-node",
|
|
36
|
+
"typescript",
|
|
37
|
+
"vitest",
|
|
38
|
+
"@vitest/coverage-v8",
|
|
39
|
+
"@cdktf/tf-module-stack",
|
|
40
|
+
"projen"
|
|
41
|
+
]
|
|
42
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineConfig } from "@nikovirtala/projen-vitest/lib/bundled-define-config";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
bail: 0,
|
|
6
|
+
coverage: {
|
|
7
|
+
enabled: true,
|
|
8
|
+
provider: "v8",
|
|
9
|
+
reporter: ["text","lcov"],
|
|
10
|
+
reportsDirectory: "coverage",
|
|
11
|
+
},
|
|
12
|
+
environment: "node",
|
|
13
|
+
exclude: ["**/node_modules/**","**/dist/**","**/cypress/**","**/.{idea,git,cache,output,temp}/**","**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*"],
|
|
14
|
+
globals: false,
|
|
15
|
+
include: ["**/*.{test,spec}.?(c|m)[jt]s?(x)"],
|
|
16
|
+
isolate: true,
|
|
17
|
+
passWithNoTests: true,
|
|
18
|
+
printConsoleTrace: true,
|
|
19
|
+
pool: "forks",
|
|
20
|
+
slowTestThreshold: 300,
|
|
21
|
+
typecheck: {
|
|
22
|
+
enabled: true,
|
|
23
|
+
checker: "tsc --noEmit",
|
|
24
|
+
tsconfig: "tsconfig.dev.json",
|
|
25
|
+
},
|
|
26
|
+
update: true,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "cdktf/lib/testing/adapters/jest";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const cdktf_1 = require("cdktf");
|
|
4
|
-
require("cdktf/lib/testing/adapters/jest");
|
|
5
|
-
const azure_1 = require("../lib/azure");
|
|
6
|
-
const gcp_1 = require("../lib/gcp");
|
|
7
|
-
const aws_1 = require("../lib/aws");
|
|
8
|
-
// To learn more about testing see cdk.tf/testing
|
|
9
|
-
describe("Should synthesize snapshot for construct", () => {
|
|
10
|
-
it("Azure", () => {
|
|
11
|
-
expect(cdktf_1.Testing.synthScope((scope) => {
|
|
12
|
-
new azure_1.Azure(scope, "azure");
|
|
13
|
-
})).toMatchSnapshot();
|
|
14
|
-
});
|
|
15
|
-
it("Aws", () => {
|
|
16
|
-
expect(cdktf_1.Testing.synthScope((scope) => {
|
|
17
|
-
new aws_1.Aws(scope, "aws");
|
|
18
|
-
})).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
it("Google", () => {
|
|
21
|
-
expect(cdktf_1.Testing.synthScope((scope) => {
|
|
22
|
-
new gcp_1.Gcp(scope, "google");
|
|
23
|
-
})).toMatchSnapshot();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgtdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9fX3Rlc3RzX18vaW5kZXgtdGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGlDQUFnQztBQUNoQywyQ0FBeUM7QUFDekMsd0NBQXFDO0FBQ3JDLG9DQUFpQztBQUNqQyxvQ0FBaUM7QUFFakMsaURBQWlEO0FBQ2pELFFBQVEsQ0FBQywwQ0FBMEMsRUFBRSxHQUFHLEVBQUU7SUFDeEQsRUFBRSxDQUFDLE9BQU8sRUFBRSxHQUFHLEVBQUU7UUFDZixNQUFNLENBQ0osZUFBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1lBQzNCLElBQUksYUFBSyxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztRQUM1QixDQUFDLENBQUMsQ0FDSCxDQUFDLGVBQWUsRUFBRSxDQUFDO0lBQ3RCLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLEVBQUU7UUFDYixNQUFNLENBQ0osZUFBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1lBQzNCLElBQUksU0FBRyxDQUFDLEtBQUssRUFBRSxLQUFLLENBQUMsQ0FBQztRQUN4QixDQUFDLENBQUMsQ0FDSCxDQUFDLGVBQWUsRUFBRSxDQUFDO0lBQ3RCLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLFFBQVEsRUFBRSxHQUFHLEVBQUU7UUFDaEIsTUFBTSxDQUNKLGVBQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxLQUFLLEVBQUUsRUFBRTtZQUMzQixJQUFJLFNBQUcsQ0FBQyxLQUFLLEVBQUUsUUFBUSxDQUFDLENBQUM7UUFDM0IsQ0FBQyxDQUFDLENBQ0gsQ0FBQyxlQUFlLEVBQUUsQ0FBQztJQUN0QixDQUFDLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVGVzdGluZyB9IGZyb20gXCJjZGt0ZlwiO1xuaW1wb3J0IFwiY2RrdGYvbGliL3Rlc3RpbmcvYWRhcHRlcnMvamVzdFwiO1xuaW1wb3J0IHsgQXp1cmUgfSBmcm9tIFwiLi4vbGliL2F6dXJlXCI7XG5pbXBvcnQgeyBHY3AgfSBmcm9tIFwiLi4vbGliL2djcFwiO1xuaW1wb3J0IHsgQXdzIH0gZnJvbSBcIi4uL2xpYi9hd3NcIjtcblxuLy8gVG8gbGVhcm4gbW9yZSBhYm91dCB0ZXN0aW5nIHNlZSBjZGsudGYvdGVzdGluZ1xuZGVzY3JpYmUoXCJTaG91bGQgc3ludGhlc2l6ZSBzbmFwc2hvdCBmb3IgY29uc3RydWN0XCIsICgpID0+IHtcbiAgaXQoXCJBenVyZVwiLCAoKSA9PiB7XG4gICAgZXhwZWN0KFxuICAgICAgVGVzdGluZy5zeW50aFNjb3BlKChzY29wZSkgPT4ge1xuICAgICAgICBuZXcgQXp1cmUoc2NvcGUsIFwiYXp1cmVcIik7XG4gICAgICB9KVxuICAgICkudG9NYXRjaFNuYXBzaG90KCk7XG4gIH0pO1xuXG4gIGl0KFwiQXdzXCIsICgpID0+IHtcbiAgICBleHBlY3QoXG4gICAgICBUZXN0aW5nLnN5bnRoU2NvcGUoKHNjb3BlKSA9PiB7XG4gICAgICAgIG5ldyBBd3Moc2NvcGUsIFwiYXdzXCIpO1xuICAgICAgfSlcbiAgICApLnRvTWF0Y2hTbmFwc2hvdCgpO1xuICB9KTtcblxuICBpdChcIkdvb2dsZVwiLCAoKSA9PiB7XG4gICAgZXhwZWN0KFxuICAgICAgVGVzdGluZy5zeW50aFNjb3BlKChzY29wZSkgPT4ge1xuICAgICAgICBuZXcgR2NwKHNjb3BlLCBcImdvb2dsZVwiKTtcbiAgICAgIH0pXG4gICAgKS50b01hdGNoU25hcHNob3QoKTtcbiAgfSk7XG59KTsiXX0=
|
package/main.tf
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
locals {
|
|
2
|
-
is_ecs = upper(var.runner_platform) == "ECS" ? 1: 0
|
|
3
|
-
is_aca = upper(var.runner_platform) == "ACA" ? 1: 0
|
|
4
|
-
is_cr = upper(var.runner_platform) == "GCR" ? 1: 0
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
module "ecs" {
|
|
8
|
-
count = local.is_ecs
|
|
9
|
-
source = "./modules/elastic-container-service"
|
|
10
|
-
PAT = var.PAT
|
|
11
|
-
github_config_url = var.github_config_url
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
module "aca" {
|
|
15
|
-
count = local.is_aca
|
|
16
|
-
source = "./modules/azure-container-apps"
|
|
17
|
-
PAT = var.PAT
|
|
18
|
-
github_config_url = var.github_config_url
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
module "gcr" {
|
|
22
|
-
count = local.is_cr
|
|
23
|
-
source = "./modules/google-cloud-run"
|
|
24
|
-
PAT = var.PAT
|
|
25
|
-
github_config_url = var.github_config_url
|
|
26
|
-
}
|