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

Commit dbba705

Browse files
ScottGuymernpalmRichiCoder1seemethere
authored
feat: add windows support (#1476)
Integrate the windows support to the module. Co-authored-by: Niek Palm <[email protected]> Co-authored-by: Richard Simpson <[email protected]> Co-authored-by: Eli Uriegas <[email protected]>
1 parent 83bb07b commit dbba705

File tree

34 files changed

+496
-114
lines changed

34 files changed

+496
-114
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ idle_config = [{
266266
}]
267267
```
268268

269+
_**Note**_: When using Windows runners it's recommended to keep a few runners warmed up due to the minutes-long cold start time.
270+
269271
### Prebuilt Images
270272

271273
This module also allows you to run agents from a prebuilt AMI to gain faster startup times. You can find more information in [the image README.md](/images/README.md)
@@ -294,7 +296,9 @@ Examples are located in the [examples](./examples) directory. The following exam
294296

295297
- _[Default](examples/default/README.md)_: The default example of the module
296298
- _[Permissions boundary](examples/permissions-boundary/README.md)_: Example usages of permissions boundaries.
299+
- _[Ubuntu](examples/ubuntu/README.md)_: Example usage of creating a runner using Ubuntu AMIs.
297300
- _[Prebuilt Images](examples/prebuilt/README.md)_: Example usages of deploying runners with a custom prebuilt image.
301+
- _[Windows](examples/windows/README.md)_: Example usage of creating a runner using Windows as the OS.
298302

299303
## Sub modules
300304

examples/default/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ locals {
33
aws_region = "eu-west-1"
44
}
55

6-
resource "random_password" "random" {
7-
length = 28
6+
resource "random_id" "random" {
7+
byte_length = 20
88
}
99

1010

@@ -27,7 +27,7 @@ module "runners" {
2727
github_app = {
2828
key_base64 = var.github_app_key_base64
2929
id = var.github_app_id
30-
webhook_secret = random_password.random.result
30+
webhook_secret = random_id.random.hex
3131
}
3232

3333
webhook_lambda_zip = "lambdas-download/webhook.zip"

examples/default/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ output "webhook_endpoint" {
1010

1111
output "webhook_secret" {
1212
sensitive = true
13-
value = random_password.random.result
13+
value = random_id.random.hex
1414
}
1515

examples/permissions-boundary/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ locals {
33
aws_region = "eu-west-1"
44
}
55

6-
resource "random_password" "random" {
7-
length = 32
6+
resource "random_id" "random" {
7+
byte_length = 20
88
}
99

1010
data "terraform_remote_state" "iam" {
@@ -46,7 +46,7 @@ module "runners" {
4646
id = var.github_app_id
4747
client_id = var.github_app_client_id
4848
client_secret = var.github_app_client_secret
49-
webhook_secret = random_password.random.result
49+
webhook_secret = random_id.random.hex
5050
}
5151

5252
webhook_lambda_zip = "lambdas-download/webhook.zip"

examples/permissions-boundary/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ output "runners" {
66

77
output "webhook" {
88
value = {
9-
secret = random_password.random.result
9+
secret = random_id.random.hex
1010
endpoint = module.runners.webhook.endpoint
1111
}
1212
}

examples/prebuilt/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ locals {
33
aws_region = "eu-west-1"
44
}
55

6-
resource "random_password" "random" {
7-
length = 28
6+
resource "random_id" "random" {
7+
byte_length = 20
88
}
99

1010
data "aws_caller_identity" "current" {}
@@ -21,7 +21,7 @@ module "runners" {
2121
github_app = {
2222
key_base64 = var.github_app_key_base64
2323
id = var.github_app_id
24-
webhook_secret = random_password.random.result
24+
webhook_secret = random_id.random.hex
2525
}
2626

2727
webhook_lambda_zip = "../../lambda_output/webhook.zip"

examples/prebuilt/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ output "webhook_endpoint" {
1010

1111
output "webhook_secret" {
1212
sensitive = true
13-
value = random_password.random.result
13+
value = random_id.random.hex
1414
}
1515

examples/ubuntu/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ locals {
33
aws_region = "eu-west-1"
44
}
55

6-
resource "random_password" "random" {
7-
length = 28
6+
resource "random_id" "random" {
7+
byte_length = 20
88
}
99

1010
module "runners" {
@@ -22,7 +22,7 @@ module "runners" {
2222
github_app = {
2323
key_base64 = var.github_app_key_base64
2424
id = var.github_app_id
25-
webhook_secret = random_password.random.result
25+
webhook_secret = random_id.random.hex
2626
}
2727

2828
# webhook_lambda_zip = "lambdas-download/webhook.zip"

examples/ubuntu/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ output "runners" {
66

77
output "webhook" {
88
value = {
9-
secret = random_password.random.result
9+
secret = random_id.random.hex
1010
endpoint = module.runners.webhook.endpoint
1111
}
1212
}

examples/windows/.terraform.lock.hcl

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)