Skip to content

Commit 4b6e978

Browse files
authored
Merge pull request #2739 from philips-labs/develop
chore: Release
2 parents 75e15a6 + 8728523 commit 4b6e978

File tree

18 files changed

+535
-480
lines changed

18 files changed

+535
-480
lines changed

.release/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
},
77
"author": "Niek Palm",
88
"devDependencies": {
9-
"@semantic-release/changelog": "^6.0.1",
9+
"@semantic-release/changelog": "^6.0.2",
1010
"@semantic-release/commit-analyzer": "^9.0.2",
1111
"@semantic-release/exec": "^6.0.3",
1212
"@semantic-release/git": "^10.0.1",
13-
"@semantic-release/github": "^8.0.6",
13+
"@semantic-release/github": "^8.0.7",
1414
"@semantic-release/release-notes-generator": "^10.0.3",
1515
"conventional-changelog-conventionalcommits": "^5.0.0",
1616
"semantic-release": "^19.0.5"

.release/yarn.lock

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,14 @@
347347
dependencies:
348348
"@octokit/openapi-types" "^12.7.0"
349349

350-
"@semantic-release/changelog@^6.0.1":
351-
version "6.0.1"
352-
resolved "https://registry.yarnpkg.com/@semantic-release/changelog/-/changelog-6.0.1.tgz#8dd0334fd8c7d50cda747d2591e4f18f816b3c9c"
353-
integrity sha512-FT+tAGdWHr0RCM3EpWegWnvXJ05LQtBkQUaQRIExONoXjVjLuOILNm4DEKNaV+GAQyJjbLRVs57ti//GypH6PA==
350+
"@semantic-release/changelog@^6.0.2":
351+
version "6.0.2"
352+
resolved "https://registry.yarnpkg.com/@semantic-release/changelog/-/changelog-6.0.2.tgz#fdcdbd368788c8fcc69c4af29bf2064f4afb45f4"
353+
integrity sha512-jHqfTkoPbDEOAgAP18mGP53IxeMwxTISN+GwTRy9uLu58UjARoZU8ScCgWGeO2WPkEsm57H8AkyY02W2ntIlIw==
354354
dependencies:
355355
"@semantic-release/error" "^3.0.0"
356356
aggregate-error "^3.0.0"
357-
fs-extra "^9.0.0"
357+
fs-extra "^11.0.0"
358358
lodash "^4.17.4"
359359

360360
"@semantic-release/commit-analyzer@^9.0.2":
@@ -401,18 +401,18 @@
401401
micromatch "^4.0.0"
402402
p-reduce "^2.0.0"
403403

404-
"@semantic-release/github@^8.0.0", "@semantic-release/github@^8.0.6":
405-
version "8.0.6"
406-
resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-8.0.6.tgz#5235386d65a5d7d650dc10a6ebce908d213234f7"
407-
integrity sha512-ZxgaxYCeqt9ylm2x3OPqUoUqBw1p60LhxzdX6BqJlIBThupGma98lttsAbK64T6L6AlNa2G5T66BbiG8y0PIHQ==
404+
"@semantic-release/github@^8.0.0", "@semantic-release/github@^8.0.7":
405+
version "8.0.7"
406+
resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-8.0.7.tgz#643aee7a5cdd2acd3ae643bb90ad4ac796901de6"
407+
integrity sha512-VtgicRIKGvmTHwm//iqTh/5NGQwsncOMR5vQK9pMT92Aem7dv37JFKKRuulUsAnUOIlO4G8wH3gPiBAA0iW0ww==
408408
dependencies:
409409
"@octokit/rest" "^19.0.0"
410410
"@semantic-release/error" "^3.0.0"
411411
aggregate-error "^3.0.0"
412412
bottleneck "^2.18.1"
413413
debug "^4.0.0"
414414
dir-glob "^3.0.0"
415-
fs-extra "^10.0.0"
415+
fs-extra "^11.0.0"
416416
globby "^11.0.0"
417417
http-proxy-agent "^5.0.0"
418418
https-proxy-agent "^5.0.0"
@@ -599,11 +599,6 @@ asap@^2.0.0:
599599
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
600600
integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
601601

602-
at-least-node@^1.0.0:
603-
version "1.0.0"
604-
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
605-
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
606-
607602
balanced-match@^1.0.0:
608603
version "1.0.2"
609604
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
@@ -1236,12 +1231,11 @@ fs-extra@^10.0.0:
12361231
jsonfile "^6.0.1"
12371232
universalify "^2.0.0"
12381233

1239-
fs-extra@^9.0.0:
1240-
version "9.1.0"
1241-
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
1242-
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
1234+
fs-extra@^11.0.0:
1235+
version "11.1.0"
1236+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed"
1237+
integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==
12431238
dependencies:
1244-
at-least-node "^1.0.0"
12451239
graceful-fs "^4.2.0"
12461240
jsonfile "^6.0.1"
12471241
universalify "^2.0.0"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ module "github-runner" {
167167
vpc_id = "vpc-123"
168168
subnet_ids = ["subnet-123", "subnet-456"]
169169
170-
environment = "gh-ci"
170+
prefix = "gh-ci"
171171
172172
github_app = {
173173
key_base64 = "base64string"
@@ -439,13 +439,13 @@ We welcome any improvement to the standard module to make the default as secure
439439
| <a name="input_enable_ssm_on_runners"></a> [enable\_ssm\_on\_runners](#input\_enable\_ssm\_on\_runners) | Enable to allow access the runner instances for debugging purposes via SSM. Note that this adds additional permissions to the runner instances. | `bool` | `false` | no |
440440
| <a name="input_enable_user_data_debug_logging_runner"></a> [enable\_user\_data\_debug\_logging\_runner](#input\_enable\_user\_data\_debug\_logging\_runner) | Option to enable debug logging for user-data, this logs all secrets as well. | `bool` | `false` | no |
441441
| <a name="input_enabled_userdata"></a> [enabled\_userdata](#input\_enabled\_userdata) | Should the userdata script be enabled for the runner. Set this to false if you are using your own prebuilt AMI. | `bool` | `true` | no |
442-
| <a name="input_environment"></a> [environment](#input\_environment) | A name that identifies the environment, used as prefix and for tagging. | `string` | `null` | no |
442+
| <a name="input_environment"></a> [environment](#input\_environment) | DEPRECATED, no longer used. See `prefix` | `string` | `null` | no |
443443
| <a name="input_fifo_build_queue"></a> [fifo\_build\_queue](#input\_fifo\_build\_queue) | Enable a FIFO queue to remain the order of events received by the webhook. Suggest to set to true for repo level runners. | `bool` | `false` | no |
444444
| <a name="input_ghes_ssl_verify"></a> [ghes\_ssl\_verify](#input\_ghes\_ssl\_verify) | GitHub Enterprise SSL verification. Set to 'false' when custom certificate (chains) is used for GitHub Enterprise Server (insecure). | `bool` | `true` | no |
445445
| <a name="input_ghes_url"></a> [ghes\_url](#input\_ghes\_url) | GitHub Enterprise Server URL. Example: https://github.internal.co - DO NOT SET IF USING PUBLIC GITHUB | `string` | `null` | no |
446446
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub app parameters, see your github app. Ensure the key is the base64-encoded `.pem` file (the output of `base64 app.private-key.pem`, not the content of `private-key.pem`). | <pre>object({<br> key_base64 = string<br> id = string<br> webhook_secret = string<br> })</pre> | n/a | yes |
447447
| <a name="input_idle_config"></a> [idle\_config](#input\_idle\_config) | List of time period that can be defined as cron expression to keep a minimum amount of runners active instead of scaling down to 0. By defining this list you can ensure that in time periods that match the cron expression within 5 seconds a runner is kept idle. | <pre>list(object({<br> cron = string<br> timeZone = string<br> idleCount = number<br> }))</pre> | `[]` | no |
448-
| <a name="input_instance_allocation_strategy"></a> [instance\_allocation\_strategy](#input\_instance\_allocation\_strategy) | The allocation strategy for spot instances. AWS recommends to use `capacity-optimized` however the AWS default is `lowest-price`. | `string` | `"lowest-price"` | no |
448+
| <a name="input_instance_allocation_strategy"></a> [instance\_allocation\_strategy](#input\_instance\_allocation\_strategy) | The allocation strategy for spot instances. AWS recommends to use `price-capacity-optimized` however the AWS default is `lowest-price`. | `string` | `"lowest-price"` | no |
449449
| <a name="input_instance_max_spot_price"></a> [instance\_max\_spot\_price](#input\_instance\_max\_spot\_price) | Max price price for spot intances per hour. This variable will be passed to the create fleet as max spot price for the fleet. | `string` | `null` | no |
450450
| <a name="input_instance_profile_path"></a> [instance\_profile\_path](#input\_instance\_profile\_path) | The path that will be added to the instance\_profile, if not set the environment name will be used. | `string` | `null` | no |
451451
| <a name="input_instance_target_capacity_type"></a> [instance\_target\_capacity\_type](#input\_instance\_target\_capacity\_type) | Default lifecycle used for runner instances, can be either `spot` or `on-demand`. | `string` | `"spot"` | no |

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
"devDependencies": {
1818
"@octokit/rest": "^19.0.5",
1919
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
20-
"@types/jest": "^29.2.3",
21-
"@types/node": "^18.11.9",
20+
"@types/jest": "^29.2.4",
21+
"@types/node": "^18.11.12",
2222
"@types/request": "^2.48.8",
2323
"@typescript-eslint/eslint-plugin": "^4.33.0",
2424
"@typescript-eslint/parser": "^4.33.0",
2525
"@vercel/ncc": "^0.34.0",
26-
"aws-sdk": "^2.1265.0",
26+
"aws-sdk": "^2.1271.0",
2727
"eslint": "^7.32.0",
2828
"eslint-plugin-prettier": "4.2.1",
2929
"jest": "^29.3",

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,10 +1078,10 @@
10781078
dependencies:
10791079
"@types/istanbul-lib-report" "*"
10801080

1081-
"@types/jest@^29.2.3":
1082-
version "29.2.3"
1083-
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.3.tgz#f5fd88e43e5a9e4221ca361e23790d48fcf0a211"
1084-
integrity sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==
1081+
"@types/jest@^29.2.4":
1082+
version "29.2.4"
1083+
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.4.tgz#9c155c4b81c9570dbd183eb8604aa0ae80ba5a5b"
1084+
integrity sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==
10851085
dependencies:
10861086
expect "^29.0.0"
10871087
pretty-format "^29.0.0"
@@ -1091,10 +1091,10 @@
10911091
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
10921092
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
10931093

1094-
"@types/node@*", "@types/node@^18.11.9":
1095-
version "18.11.9"
1096-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4"
1097-
integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==
1094+
"@types/node@*", "@types/node@^18.11.12":
1095+
version "18.11.12"
1096+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.12.tgz#89e7f8aa8c88abf432f9bd594888144d7dba10aa"
1097+
integrity sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg==
10981098

10991099
"@types/prettier@^2.1.5":
11001100
version "2.4.2"
@@ -1392,10 +1392,10 @@ available-typed-arrays@^1.0.5:
13921392
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
13931393
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
13941394

1395-
aws-sdk@^2.1265.0:
1396-
version "2.1265.0"
1397-
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1265.0.tgz#ec034b10126d7c81242b2501567cb4d5179a4e61"
1398-
integrity sha512-PcW3VAxatnOgSwdENkXpFAKnE6P5GJeI7yxjEhjHSLXFyOzQZQZIT5NMCs7B25nB6iACzxizjKaYbU0kNA/8/Q==
1395+
aws-sdk@^2.1271.0:
1396+
version "2.1271.0"
1397+
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1271.0.tgz#a060fe65ff33afddb7385913200df4a26717f691"
1398+
integrity sha512-hQF+mjwe2FXFKOMNQGlfqn9InIL1bRp650ftctRqDo+VpnrYnKqF9eZa5Hk2kugs3/WUa4J2aqQa+foGWeH+Fg==
13991399
dependencies:
14001400
buffer "4.9.2"
14011401
events "1.1.1"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": [
7+
"ec2:CreateNetworkInterface",
8+
"ec2:DescribeNetworkInterfaces",
9+
"ec2:DeleteNetworkInterface"
10+
],
11+
"Resource": "*"
12+
}
13+
]
14+
}

modules/runner-binaries-syncer/runner-binaries-syncer.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ resource "aws_iam_role_policy" "lambda_logging" {
100100
})
101101
}
102102

103+
resource "aws_iam_role_policy" "lambda_syncer_vpc" {
104+
count = length(var.lambda_subnet_ids) > 0 && length(var.lambda_security_group_ids) > 0 ? 1 : 0
105+
name = "${var.prefix}-lambda-syncer-vpc"
106+
role = aws_iam_role.syncer_lambda.id
107+
108+
policy = file("${path.module}/policies/lambda-vpc.json")
109+
}
110+
103111
resource "aws_iam_role_policy" "syncer" {
104112
name = "${var.prefix}-lambda-syncer-s3-policy"
105113
role = aws_iam_role.syncer_lambda.id

modules/runners/lambdas/runners/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
},
1818
"devDependencies": {
1919
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
20-
"@types/aws-lambda": "^8.10.108",
20+
"@types/aws-lambda": "^8.10.109",
2121
"@types/express": "^4.17.14",
22-
"@types/jest": "^29.2.3",
22+
"@types/jest": "^29.2.4",
2323
"@typescript-eslint/eslint-plugin": "^4.33.0",
2424
"@typescript-eslint/parser": "^4.33.0",
2525
"@vercel/ncc": "^0.34.0",
@@ -40,10 +40,10 @@
4040
"@octokit/auth-app": "4.0.7",
4141
"@octokit/rest": "^19.0.5",
4242
"@octokit/types": "^8.0.0",
43-
"@types/aws-lambda": "^8.10.108",
43+
"@types/aws-lambda": "^8.10.109",
4444
"@types/express": "^4.17.14",
45-
"@types/node": "^18.11.9",
46-
"aws-sdk": "^2.1265.0",
45+
"@types/node": "^18.11.12",
46+
"aws-sdk": "^2.1267.0",
4747
"cron-parser": "^4.6.0",
4848
"tslog": "^3.3.4",
4949
"typescript": "^4.9.3"

modules/runners/lambdas/runners/yarn.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,10 +1791,10 @@
17911791
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e"
17921792
integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==
17931793

1794-
"@types/aws-lambda@^8.10.108":
1795-
version "8.10.108"
1796-
resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.108.tgz#ddadf0d9182f2f5e689ce5fc05b5f711fad6d115"
1797-
integrity sha512-1yh1W1WoqK3lGHy+V/Fi55zobxrDHUUsluCWdMlOXkCvtsCmHPXOG+CQ2STIL4B1g6xi6I6XzxaF8V9+zeIFLA==
1794+
"@types/aws-lambda@^8.10.109":
1795+
version "8.10.109"
1796+
resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.109.tgz#2f434cbfafe083529e365fe9c114787827a169a8"
1797+
integrity sha512-/ME92FneNyXQzrAfcnQQlW1XkCZGPDlpi2ao1MJwecN+6SbeonKeggU8eybv1DfKli90FAVT1MlIZVXfwVuCyg==
17981798

17991799
"@types/babel__core@^7.1.14":
18001800
version "7.1.18"
@@ -1894,10 +1894,10 @@
18941894
dependencies:
18951895
"@types/istanbul-lib-report" "*"
18961896

1897-
"@types/jest@^29.2.3":
1898-
version "29.2.3"
1899-
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.3.tgz#f5fd88e43e5a9e4221ca361e23790d48fcf0a211"
1900-
integrity sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==
1897+
"@types/jest@^29.2.4":
1898+
version "29.2.4"
1899+
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.4.tgz#9c155c4b81c9570dbd183eb8604aa0ae80ba5a5b"
1900+
integrity sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==
19011901
dependencies:
19021902
expect "^29.0.0"
19031903
pretty-format "^29.0.0"
@@ -1924,10 +1924,10 @@
19241924
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a"
19251925
integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==
19261926

1927-
"@types/node@*", "@types/node@^18.11.9":
1928-
version "18.11.9"
1929-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4"
1930-
integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==
1927+
"@types/node@*", "@types/node@^18.11.12":
1928+
version "18.11.12"
1929+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.12.tgz#89e7f8aa8c88abf432f9bd594888144d7dba10aa"
1930+
integrity sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg==
19311931

19321932
"@types/prettier@^2.1.5":
19331933
version "2.4.3"
@@ -2223,10 +2223,10 @@ available-typed-arrays@^1.0.5:
22232223
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
22242224
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
22252225

2226-
aws-sdk@^2.1265.0:
2227-
version "2.1265.0"
2228-
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1265.0.tgz#ec034b10126d7c81242b2501567cb4d5179a4e61"
2229-
integrity sha512-PcW3VAxatnOgSwdENkXpFAKnE6P5GJeI7yxjEhjHSLXFyOzQZQZIT5NMCs7B25nB6iACzxizjKaYbU0kNA/8/Q==
2226+
aws-sdk@^2.1267.0:
2227+
version "2.1267.0"
2228+
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1267.0.tgz#8f45c7bc7efb89a757526d993c5f77a2e7208676"
2229+
integrity sha512-ANTtRay26WwNRbYs6eZYN71b3DURNfWaq3AD6BtVNa8fVvnSLn+NNINw2+vLRjDLPZXMAQVHm0qH/TmyBvtjRA==
22302230
dependencies:
22312231
buffer "4.9.2"
22322232
events "1.1.1"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": [
7+
"ec2:CreateNetworkInterface",
8+
"ec2:DescribeNetworkInterfaces",
9+
"ec2:DeleteNetworkInterface"
10+
],
11+
"Resource": "*"
12+
}
13+
]
14+
}

modules/runners/pool/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ resource "aws_iam_role_policy" "pool_logging" {
8181
})
8282
}
8383

84+
resource "aws_iam_role_policy" "lambda_pool_vpc" {
85+
count = length(var.config.lambda.subnet_ids) > 0 && length(var.config.lambda.security_group_ids) > 0 ? 1 : 0
86+
name = "${var.config.prefix}-lambda-pool-vpc"
87+
role = aws_iam_role.pool.id
88+
89+
policy = file("${path.module}/../policies/lambda-vpc.json")
90+
}
91+
8492
resource "aws_iam_role_policy_attachment" "pool_vpc_execution_role" {
8593
count = length(var.config.lambda.subnet_ids) > 0 ? 1 : 0
8694
role = aws_iam_role.pool.name

modules/runners/scale-down.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ resource "aws_iam_role_policy" "scale_down_logging" {
9696
})
9797
}
9898

99+
resource "aws_iam_role_policy" "lambda_scale_down_vpc" {
100+
count = length(var.lambda_subnet_ids) > 0 && length(var.lambda_security_group_ids) > 0 ? 1 : 0
101+
name = "${var.prefix}-lambda-scale-down-vpc"
102+
role = aws_iam_role.scale_down.id
103+
104+
policy = file("${path.module}/policies/lambda-vpc.json")
105+
}
106+
99107
resource "aws_iam_role_policy_attachment" "scale_down_vpc_execution_role" {
100108
count = length(var.lambda_subnet_ids) > 0 ? 1 : 0
101109
role = aws_iam_role.scale_down.name

modules/runners/scale-up.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ resource "aws_iam_role_policy" "service_linked_role" {
106106
policy = templatefile("${path.module}/policies/service-linked-role-create-policy.json", { aws_partition = var.aws_partition })
107107
}
108108

109+
resource "aws_iam_role_policy" "lambda_scale_up_vpc" {
110+
count = length(var.lambda_subnet_ids) > 0 && length(var.lambda_security_group_ids) > 0 ? 1 : 0
111+
name = "${var.prefix}-lambda-scale-up-vpc"
112+
role = aws_iam_role.scale_up.id
113+
114+
policy = file("${path.module}/policies/lambda-vpc.json")
115+
}
116+
109117
resource "aws_iam_role_policy_attachment" "scale_up_vpc_execution_role" {
110118
count = length(var.lambda_subnet_ids) > 0 ? 1 : 0
111119
role = aws_iam_role.scale_up.name

modules/runners/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ variable "instance_allocation_strategy" {
109109
default = "lowest-price"
110110

111111
validation {
112-
condition = contains(["lowest-price", "diversified", "capacity-optimized", "capacity-optimized-prioritized"], var.instance_allocation_strategy)
112+
condition = contains(["lowest-price", "diversified", "capacity-optimized", "capacity-optimized-prioritized", "price-capacity-optimized"], var.instance_allocation_strategy)
113113
error_message = "The instance allocation strategy does not match the allowed values."
114114
}
115115
}

modules/webhook/lambdas/webhook/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
2121
"@types/aws-lambda": "^8.10.108",
2222
"@types/express": "^4.17.14",
23-
"@types/jest": "^29.2.3",
24-
"@types/node": "^18.11.9",
23+
"@types/jest": "^29.2.4",
24+
"@types/node": "^18.11.12",
2525
"@typescript-eslint/eslint-plugin": "^4.33.0",
2626
"@typescript-eslint/parser": "^4.33.0",
2727
"@vercel/ncc": "0.34.0",
28-
"aws-sdk": "^2.1262.0",
28+
"aws-sdk": "^2.1271.0",
2929
"body-parser": "^1.20.0",
3030
"eslint": "^7.32.0",
3131
"eslint-plugin-prettier": "4.2.1",
@@ -39,7 +39,7 @@
3939
"typescript": "^4.9.3"
4040
},
4141
"dependencies": {
42-
"@aws-sdk/client-ssm": "^3.218.0",
42+
"@aws-sdk/client-ssm": "^3.223.0",
4343
"@octokit/rest": "^19.0.5",
4444
"@octokit/webhooks": "^10.3.1",
4545
"aws-lambda": "^1.0.7",

0 commit comments

Comments
 (0)