terraform-cdk-serverless-github-actions-runner-controller 0.0.0 → 0.0.1

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.
@@ -0,0 +1,355 @@
1
+ {
2
+ "//": {
3
+ "metadata": {
4
+ "backend": "local",
5
+ "stackName": "google-cloud-run",
6
+ "version": "0.20.0"
7
+ },
8
+ "outputs": {
9
+ }
10
+ },
11
+ "locals": {
12
+ "cr_autoscalerMember_AA00D082": "serviceAccount:${google_service_account.cr_autoscalerServiceAccount_37C5FFAD.email}",
13
+ "cr_bucketModification_B1ECB227": "CLOUDSDK_CORE_DISABLE_PROMPTS=1 gcloud alpha storage buckets create gs://gha-runner-job-externals --project=gha-runner-example --location=europe-north1 --uniform-bucket-level-access --enable-hierarchical-namespace",
14
+ "cr_ghaMember_2ADFD977": "serviceAccount:${google_service_account.cr_jobServiceAccount_4D2CB679.email}"
15
+ },
16
+ "resource": {
17
+ "google_artifact_registry_repository": {
18
+ "cr_registry_886F88F0": {
19
+ "//": {
20
+ "metadata": {
21
+ "path": "google-cloud-run/cr/registry",
22
+ "uniqueId": "cr_registry_886F88F0"
23
+ }
24
+ },
25
+ "description": "Repository to host run and resulting images from GHA runs",
26
+ "format": "DOCKER",
27
+ "mode": "REMOTE_REPOSITORY",
28
+ "remote_repository_config": {
29
+ "docker_repository": {
30
+ "custom_repository": {
31
+ "uri": "https://ghcr.io"
32
+ }
33
+ }
34
+ },
35
+ "repository_id": "gha-runner-test"
36
+ }
37
+ },
38
+ "google_cloud_run_service": {
39
+ "cr_autoscalerService_A4FAA2B6": {
40
+ "//": {
41
+ "metadata": {
42
+ "path": "google-cloud-run/cr/autoscalerService",
43
+ "uniqueId": "cr_autoscalerService_A4FAA2B6"
44
+ }
45
+ },
46
+ "location": "europe-north1",
47
+ "metadata": {
48
+ "annotations": {
49
+ "run.googleapis.com/ingress": "internal"
50
+ }
51
+ },
52
+ "name": "gha-autoscaler",
53
+ "template": {
54
+ "metadata": {
55
+ "annotations": {
56
+ "autoscaling.knative.dev/maxScale": "1",
57
+ "autoscaling.knative.dev/minScale": "1",
58
+ "run.googleapis.com/cpu-throttling": "false",
59
+ "run.googleapis.com/startup-cpu-boost": "false"
60
+ }
61
+ },
62
+ "spec": {
63
+ "container_concurrency": 1,
64
+ "containers": [
65
+ {
66
+ "env": [
67
+ {
68
+ "name": "PAT",
69
+ "value": "${var.cr_PAT_DD795492}"
70
+ },
71
+ {
72
+ "name": "GITHUB_CONFIG_URL",
73
+ "value": "${var.cr_github_config_url_9957B21B}"
74
+ },
75
+ {
76
+ "name": "JOB_NAME",
77
+ "value": "${google_cloud_run_v2_job.cr_ghaJob_3BDFC08A.name}"
78
+ },
79
+ {
80
+ "name": "SCALE_SET_NAME",
81
+ "value": "cr-runner-set"
82
+ },
83
+ {
84
+ "name": "CLOUDSDK_RUN_REGION",
85
+ "value": "europe-north1"
86
+ },
87
+ {
88
+ "name": "GOOGLE_CLOUD_PROJECT",
89
+ "value": "gha-runner-example"
90
+ }
91
+ ],
92
+ "image": "${google_artifact_registry_repository.cr_registry_886F88F0.location}-docker.pkg.dev/gha-runner-example/${google_artifact_registry_repository.cr_registry_886F88F0.repository_id}/hi-fi/gha-runners-on-managed-env:test",
93
+ "resources": {
94
+ "limits": {
95
+ "cpu": "1000m",
96
+ "memory": "512Mi"
97
+ }
98
+ }
99
+ }
100
+ ],
101
+ "service_account_name": "${google_service_account.cr_autoscalerServiceAccount_37C5FFAD.email}"
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "google_cloud_run_v2_job": {
107
+ "cr_ghaJob_3BDFC08A": {
108
+ "//": {
109
+ "metadata": {
110
+ "path": "google-cloud-run/cr/ghaJob",
111
+ "uniqueId": "cr_ghaJob_3BDFC08A"
112
+ }
113
+ },
114
+ "deletion_protection": false,
115
+ "depends_on": [
116
+ "null_resource.cr_gcloud_3D7A726F"
117
+ ],
118
+ "location": "europe-north1",
119
+ "name": "gha-runner-job",
120
+ "template": {
121
+ "template": {
122
+ "containers": [
123
+ {
124
+ "command": [
125
+ "/home/runner/ephemeral_runner.sh"
126
+ ],
127
+ "env": [
128
+ {
129
+ "name": "CLOUDSDK_RUN_REGION",
130
+ "value": "europe-north1"
131
+ },
132
+ {
133
+ "name": "GOOGLE_CLOUD_PROJECT",
134
+ "value": "gha-runner-example"
135
+ },
136
+ {
137
+ "name": "EXTERNAL_STORAGE_NAME",
138
+ "value": "gha-runner-job-externals"
139
+ },
140
+ {
141
+ "name": "TAR_OPTIONS",
142
+ "value": "--touch --no-overwrite-dir --no-same-owner"
143
+ }
144
+ ],
145
+ "image": "${google_artifact_registry_repository.cr_registry_886F88F0.location}-docker.pkg.dev/gha-runner-example/${google_artifact_registry_repository.cr_registry_886F88F0.repository_id}/hi-fi/actions-runner:cr",
146
+ "resources": {
147
+ "limits": {
148
+ "cpu": "1",
149
+ "memory": "2Gi"
150
+ }
151
+ },
152
+ "volume_mounts": [
153
+ {
154
+ "mount_path": "/home/runner/_work/externals",
155
+ "name": "externals"
156
+ }
157
+ ]
158
+ }
159
+ ],
160
+ "max_retries": 0,
161
+ "service_account": "${google_service_account.cr_jobServiceAccount_4D2CB679.email}",
162
+ "volumes": [
163
+ {
164
+ "gcs": {
165
+ "bucket": "gha-runner-job-externals"
166
+ },
167
+ "name": "externals"
168
+ }
169
+ ]
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "google_project_iam_custom_role": {
175
+ "cr_autoscalerRole_8A950337": {
176
+ "//": {
177
+ "metadata": {
178
+ "path": "google-cloud-run/cr/autoscalerRole",
179
+ "uniqueId": "cr_autoscalerRole_8A950337"
180
+ }
181
+ },
182
+ "permissions": [
183
+ "artifactregistry.dockerimages.get",
184
+ "artifactregistry.dockerimages.list",
185
+ "run.jobs.run",
186
+ "run.jobs.create",
187
+ "run.jobs.delete"
188
+ ],
189
+ "role_id": "ghaAutoscalerRole",
190
+ "title": "GHA Autoscaler Role"
191
+ },
192
+ "cr_runnerRole_07508BC4": {
193
+ "//": {
194
+ "metadata": {
195
+ "path": "google-cloud-run/cr/runnerRole",
196
+ "uniqueId": "cr_runnerRole_07508BC4"
197
+ }
198
+ },
199
+ "permissions": [
200
+ "artifactregistry.dockerimages.get",
201
+ "artifactregistry.dockerimages.list",
202
+ "run.jobs.run",
203
+ "run.jobs.create",
204
+ "run.jobs.delete",
205
+ "run.jobs.list",
206
+ "run.executions.get"
207
+ ],
208
+ "role_id": "ghaRunnerRole",
209
+ "title": "GHA Runner Role"
210
+ }
211
+ },
212
+ "google_project_iam_member": {
213
+ "cr_autoscalerRoleBindingRunServiceAgent_83C78179": {
214
+ "//": {
215
+ "metadata": {
216
+ "path": "google-cloud-run/cr/autoscalerRoleBindingRunServiceAgent",
217
+ "uniqueId": "cr_autoscalerRoleBindingRunServiceAgent_83C78179"
218
+ }
219
+ },
220
+ "member": "${local.cr_autoscalerMember_AA00D082}",
221
+ "project": "gha-runner-example",
222
+ "role": "roles/run.serviceAgent"
223
+ },
224
+ "cr_autoscalerRoleBindingRun_76E1E813": {
225
+ "//": {
226
+ "metadata": {
227
+ "path": "google-cloud-run/cr/autoscalerRoleBindingRun",
228
+ "uniqueId": "cr_autoscalerRoleBindingRun_76E1E813"
229
+ }
230
+ },
231
+ "member": "${local.cr_autoscalerMember_AA00D082}",
232
+ "project": "gha-runner-example",
233
+ "role": "roles/run.developer"
234
+ },
235
+ "cr_autoscalerRoleBindingStorage_C1A676AA": {
236
+ "//": {
237
+ "metadata": {
238
+ "path": "google-cloud-run/cr/autoscalerRoleBindingStorage",
239
+ "uniqueId": "cr_autoscalerRoleBindingStorage_C1A676AA"
240
+ }
241
+ },
242
+ "member": "${local.cr_autoscalerMember_AA00D082}",
243
+ "project": "gha-runner-example",
244
+ "role": "roles/storage.admin"
245
+ },
246
+ "cr_runnerRoleBindingRunServiceAgent_88652FB8": {
247
+ "//": {
248
+ "metadata": {
249
+ "path": "google-cloud-run/cr/runnerRoleBindingRunServiceAgent",
250
+ "uniqueId": "cr_runnerRoleBindingRunServiceAgent_88652FB8"
251
+ }
252
+ },
253
+ "member": "${local.cr_ghaMember_2ADFD977}",
254
+ "project": "gha-runner-example",
255
+ "role": "roles/run.serviceAgent"
256
+ },
257
+ "cr_runnerRoleBindingRunViewer_328C548F": {
258
+ "//": {
259
+ "metadata": {
260
+ "path": "google-cloud-run/cr/runnerRoleBindingRunViewer",
261
+ "uniqueId": "cr_runnerRoleBindingRunViewer_328C548F"
262
+ }
263
+ },
264
+ "member": "${local.cr_ghaMember_2ADFD977}",
265
+ "project": "gha-runner-example",
266
+ "role": "roles/run.viewer"
267
+ },
268
+ "cr_runnerRoleBindingStorage_8D8C3B87": {
269
+ "//": {
270
+ "metadata": {
271
+ "path": "google-cloud-run/cr/runnerRoleBindingStorage",
272
+ "uniqueId": "cr_runnerRoleBindingStorage_8D8C3B87"
273
+ }
274
+ },
275
+ "member": "${local.cr_ghaMember_2ADFD977}",
276
+ "project": "gha-runner-example",
277
+ "role": "roles/storage.admin"
278
+ },
279
+ "cr_runnerRoleBinding_E20193A5": {
280
+ "//": {
281
+ "metadata": {
282
+ "path": "google-cloud-run/cr/runnerRoleBinding",
283
+ "uniqueId": "cr_runnerRoleBinding_E20193A5"
284
+ }
285
+ },
286
+ "member": "${local.cr_ghaMember_2ADFD977}",
287
+ "project": "gha-runner-example",
288
+ "role": "${google_project_iam_custom_role.cr_runnerRole_07508BC4.id}"
289
+ }
290
+ },
291
+ "google_service_account": {
292
+ "cr_autoscalerServiceAccount_37C5FFAD": {
293
+ "//": {
294
+ "metadata": {
295
+ "path": "google-cloud-run/cr/autoscalerServiceAccount",
296
+ "uniqueId": "cr_autoscalerServiceAccount_37C5FFAD"
297
+ }
298
+ },
299
+ "account_id": "autoscaler-sa"
300
+ },
301
+ "cr_jobServiceAccount_4D2CB679": {
302
+ "//": {
303
+ "metadata": {
304
+ "path": "google-cloud-run/cr/jobServiceAccount",
305
+ "uniqueId": "cr_jobServiceAccount_4D2CB679"
306
+ }
307
+ },
308
+ "account_id": "gha-runner-job-sa"
309
+ }
310
+ },
311
+ "null_resource": {
312
+ "cr_gcloud_3D7A726F": {
313
+ "//": {
314
+ "metadata": {
315
+ "path": "google-cloud-run/cr/gcloud",
316
+ "uniqueId": "cr_gcloud_3D7A726F"
317
+ }
318
+ },
319
+ "provisioner": [
320
+ {
321
+ "local-exec": {
322
+ "command": "${local.cr_bucketModification_B1ECB227}"
323
+ }
324
+ }
325
+ ],
326
+ "triggers": {
327
+ "fqn": "${local.cr_bucketModification_B1ECB227}"
328
+ }
329
+ }
330
+ }
331
+ },
332
+ "terraform": {
333
+ "required_providers": {
334
+ "google": {
335
+ "source": "google",
336
+ "version": "6.32.0"
337
+ },
338
+ "null": {
339
+ "source": "null",
340
+ "version": "3.2.4"
341
+ }
342
+ }
343
+ },
344
+ "variable": {
345
+ "cr_PAT_DD795492": {
346
+ "description": "Github PAT with Actions:Read and Admin:Read+Write scopes",
347
+ "nullable": false,
348
+ "sensitive": true
349
+ },
350
+ "cr_github_config_url_9957B21B": {
351
+ "description": "Github URL where runners should register to. Format https://<GitHub host>/<your_enterprise/org/repo>",
352
+ "nullable": false
353
+ }
354
+ }
355
+ }
package/package.json CHANGED
@@ -35,7 +35,11 @@
35
35
  "organization": false
36
36
  },
37
37
  "devDependencies": {
38
+ "@aws-sdk/client-ecs": "^3.797.0",
39
+ "@cdktf/provider-aws": "19.62.0",
38
40
  "@cdktf/provider-azurerm": "13.26.0",
41
+ "@cdktf/provider-google": "14.31.0",
42
+ "@cdktf/provider-null": "10.0.2",
39
43
  "@cdktf/provider-random": "11.1.1",
40
44
  "@types/jest": "^29.5.14",
41
45
  "@types/node": "ts5.6",
@@ -65,7 +69,10 @@
65
69
  "typescript": "~5.6.0"
66
70
  },
67
71
  "peerDependencies": {
72
+ "@cdktf/provider-aws": "^19.62.0",
68
73
  "@cdktf/provider-azurerm": "^13.26.0",
74
+ "@cdktf/provider-google": "^14.31.0",
75
+ "@cdktf/provider-null": "^10.0.2",
69
76
  "@cdktf/provider-random": "^11.1.1",
70
77
  "cdktf": ">=0.20.0",
71
78
  "constructs": ">=10.4.2"
@@ -84,7 +91,7 @@
84
91
  "publishConfig": {
85
92
  "access": "public"
86
93
  },
87
- "version": "0.0.0",
94
+ "version": "0.0.1",
88
95
  "jest": {
89
96
  "coverageProvider": "v8",
90
97
  "testMatch": [