diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index f4226c4270..8a0c1eb746 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -132,12 +132,9 @@ jobs: example: [ "default", - "ubuntu", "prebuilt", - "arm64", "ephemeral", "termination-watcher", - "windows", "multi-runner", ] defaults: diff --git a/docs/examples/index.md b/docs/examples/index.md index 6cf3bb15a5..ad7e7736c7 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -3,9 +3,9 @@ Examples are located in the [examples](https://github.com/philips-labs/terraform-aws-github-runner/tree/main/examples) directory. The following examples are provided: - _[Default](default.md)_: The default example of the module -- _[ARM64](arm64.md)_: Example usage with ARM64 architecture - _[Ephemeral](ephemeral.md)_: Example usages of ephemeral runners based on the default example. -- _[Multi Runner](multi-runner.md)_ : Example usage of creating a multi runner which creates multiple runners/ configurations with a single deployment +- _[Multi Runner](multi-runner.md)_ : Example usage of creating a multi runner which creates multiple runners/ configurations with a single deployment. The examples including: "arm64", "windows", and "ubuntu" runners. - _[Permissions boundary](permissions-boundary.md)_: Example usages of permissions boundaries. - _[Prebuilt Images](prebuilt.md)_: Example usages of deploying runners with a custom prebuilt image. - _[Windows](windows.md)_: Example usage of creating a runner using Windows as the OS. +- _[Termination watcher](termination-watcher.md)_: Example usages of termination watcher. diff --git a/examples/arm64/.terraform.lock.hcl b/examples/arm64/.terraform.lock.hcl deleted file mode 100644 index 60a47db0b8..0000000000 --- a/examples/arm64/.terraform.lock.hcl +++ /dev/null @@ -1,85 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "5.31.0" - constraints = ">= 5.0.0, ~> 5.27" - hashes = [ - "h1:ltxyuBWIy9cq0kIKDJH1jeWJy/y7XJLjS4QrsQK4plA=", - "zh:0cdb9c2083bf0902442384f7309367791e4640581652dda456f2d6d7abf0de8d", - "zh:2fe4884cb9642f48a5889f8dff8f5f511418a18537a9dfa77ada3bcdad391e4e", - "zh:36d8bdd72fe61d816d0049c179f495bc6f1e54d8d7b07c45b62e5e1696882a89", - "zh:539dd156e3ec608818eb21191697b230117437a58587cbd02ce533202a4dd520", - "zh:6a53f4b57ac4eb3479fc0d8b6e301ca3a27efae4c55d9f8bd24071b12a03361c", - "zh:6faeb8ff6792ca7af1c025255755ad764667a300291cc10cea0c615479488c87", - "zh:7d9423149b323f6d0df5b90c4d9029e5455c670aea2a7eb6fef4684ba7eb2e0b", - "zh:8235badd8a5d0993421cacf5ead48fac73d3b5a25c8a68599706a404b1f70730", - "zh:860b4f60842b2879c5128b7e386c8b49adeda9287fed12c5cd74861bb659bbcd", - "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:b021fceaf9382c8fe3c6eb608c24d01dce3d11ba7e65bb443d51ca9b90e9b237", - "zh:b38b0bfc1c69e714e80cf1c9ea06e687ee86aa9f45694be28eb07adcebbe0489", - "zh:c972d155f6c01af9690a72adfb99cfc24ef5ef311ca92ce46b9b13c5c153f572", - "zh:e0dd29920ec84fdb6026acff44dcc1fb1a24a0caa093fa04cdbc713d384c651d", - "zh:e3127ebd2cb0374cd1808f911e6bffe2f4ac4d84317061381242353f3a7bc27d", - ] -} - -provider "registry.terraform.io/hashicorp/local" { - version = "2.4.1" - constraints = "~> 2.0" - hashes = [ - "h1:gpp25uNkYJYzJVnkyRr7RIBVfwLs9GSq2HNnFpTRBg0=", - "zh:244b445bf34ddbd167731cc6c6b95bbed231dc4493f8cc34bd6850cfe1f78528", - "zh:3c330bdb626123228a0d1b1daa6c741b4d5d484ab1c7ae5d2f48d4c9885cc5e9", - "zh:5ff5f9b791ddd7557e815449173f2db38d338e674d2d91800ac6e6d808de1d1d", - "zh:70206147104f4bf26ae67d730c995772f85bf23e28c2c2e7612c74f4dae3c46f", - "zh:75029676993accd6bef933c196b2fad51a9ec8a69a847dbbe96ec8ebf7926cdc", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7d48d5999fe1fcdae9295a7c3448ac1541f5a24c474bd82df6d4fa3732483f2b", - "zh:b766b38b027f0f84028244d1c2f990431a37d4fc3ac645962924554016507e77", - "zh:bfc7ad301dada204cf51c59d8bd6a9a87de5fddb42190b4d6ba157d6e08a1f10", - "zh:c902b527702a8c5e2c25a6637d07bbb1690cb6c1e63917a5f6dc460efd18d43f", - "zh:d68ae0e1070cf429c46586bc87580c3ed113f76241da2b6e4f1a8348126b3c46", - "zh:f4903fd89f7c92a346ae9e666c2d0b6884c4474ae109e9b4bd15e7efaa4bfc29", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = "~> 3.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "3.6.0" - constraints = "~> 3.0" - hashes = [ - "h1:I8MBeauYA8J8yheLJ8oSMWqB0kovn16dF/wKZ1QTdkk=", - "zh:03360ed3ecd31e8c5dac9c95fe0858be50f3e9a0d0c654b5e504109c2159287d", - "zh:1c67ac51254ba2a2bb53a25e8ae7e4d076103483f55f39b426ec55e47d1fe211", - "zh:24a17bba7f6d679538ff51b3a2f378cedadede97af8a1db7dad4fd8d6d50f829", - "zh:30ffb297ffd1633175d6545d37c2217e2cef9545a6e03946e514c59c0859b77d", - "zh:454ce4b3dbc73e6775f2f6605d45cee6e16c3872a2e66a2c97993d6e5cbd7055", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:91df0a9fab329aff2ff4cf26797592eb7a3a90b4a0c04d64ce186654e0cc6e17", - "zh:aa57384b85622a9f7bfb5d4512ca88e61f22a9cea9f30febaa4c98c68ff0dc21", - "zh:c4a3e329ba786ffb6f2b694e1fd41d413a7010f3a53c20b432325a94fa71e839", - "zh:e2699bc9116447f96c53d55f2a00570f982e6f9935038c3810603572693712d0", - "zh:e747c0fd5d7684e5bfad8aa0ca441903f15ae7a98a737ff6aca24ba223207e2c", - "zh:f1ca75f417ce490368f047b63ec09fd003711ae48487fba90b4aba2ccf71920e", - ] -} diff --git a/examples/arm64/README.md b/examples/arm64/README.md deleted file mode 100644 index 3302e2e5c9..0000000000 --- a/examples/arm64/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Amazon Linux ARM64 - -This module shows how to create GitHub action runners using AWS Graviton instances which have ARM64 architecture. Lambda release will be downloaded from GitHub. - -## Usages - -Steps for the full setup, such as creating a GitHub app can be found in the root module's [README](https://github.com/philips-labs/terraform-aws-github-runner). First download the Lambda releases from GitHub. Alternatively you can build the lambdas locally with Node or Docker, there is a simple build script in `/.ci/build.sh`. In the `main.tf` you can simply remove the location of the lambda zip files, the default location will work in this case. - -> Ensure you have set the version in `lambdas-download/main.tf` for running the example. The version needs to be set to a GitHub release version, see https://github.com/philips-labs/terraform-aws-github-runner/releases - -```bash -cd ../lambdas-download -terraform init -terraform apply -var=module_version= -cd - -``` - -Before running Terraform, ensure the GitHub app is configured. See the [configuration details](https://github.com/philips-labs/terraform-aws-github-runner#usages) for more details. - -```bash -terraform init -terraform apply -``` - -The example will try to update the webhook of your GitHub. In case the update fails the apply will not fail. You can receive the webhook details by running: - -```bash -terraform output -raw webhook_secret -``` - - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.3.0 | -| [aws](#requirement\_aws) | ~> 5.27 | -| [local](#requirement\_local) | ~> 2.0 | -| [random](#requirement\_random) | ~> 3.0 | - -## Providers - -| Name | Version | -|------|---------| -| [random](#provider\_random) | 3.6.0 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [base](#module\_base) | ../base | n/a | -| [runners](#module\_runners) | ../../ | n/a | -| [webhook\_github\_app](#module\_webhook\_github\_app) | ../../modules/webhook-github-app | n/a | - -## Resources - -| Name | Type | -|------|------| -| [random_id.random](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [github\_app](#input\_github\_app) | GitHub App for API usages. |
object({
id = string
key_base64 = string
})
| n/a | yes | - -## Outputs - -| Name | Description | -|------|-------------| -| [runners](#output\_runners) | n/a | -| [webhook\_endpoint](#output\_webhook\_endpoint) | n/a | -| [webhook\_secret](#output\_webhook\_secret) | n/a | - diff --git a/examples/arm64/lambdas-download/README.md b/examples/arm64/lambdas-download/README.md deleted file mode 100644 index a9a0b890e9..0000000000 --- a/examples/arm64/lambdas-download/README.md +++ /dev/null @@ -1,31 +0,0 @@ - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1 | - -## Providers - -No providers. - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [lambdas](#module\_lambdas) | ../../../modules/download-lambda | n/a | - -## Resources - -No resources. - -## Inputs - -No inputs. - -## Outputs - -| Name | Description | -|------|-------------| -| [files](#output\_files) | n/a | - \ No newline at end of file diff --git a/examples/arm64/lambdas-download/main.tf b/examples/arm64/lambdas-download/main.tf deleted file mode 100644 index 87f31bd8a9..0000000000 --- a/examples/arm64/lambdas-download/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -locals { - version = "" -} - -module "lambdas" { - source = "../../../modules/download-lambda" - lambdas = [ - { - name = "webhook" - tag = local.version - }, - { - name = "runners" - tag = local.version - }, - { - name = "runner-binaries-syncer" - tag = local.version - } - ] -} - -output "files" { - value = module.lambdas.files -} diff --git a/examples/arm64/lambdas-download/versions.tf b/examples/arm64/lambdas-download/versions.tf deleted file mode 100644 index c934712b56..0000000000 --- a/examples/arm64/lambdas-download/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 1" -} diff --git a/examples/arm64/main.tf b/examples/arm64/main.tf deleted file mode 100644 index 56edcecbc9..0000000000 --- a/examples/arm64/main.tf +++ /dev/null @@ -1,96 +0,0 @@ -locals { - environment = "default" - aws_region = "eu-west-1" -} - -resource "random_id" "random" { - byte_length = 20 -} - - -################################################################################ -### Hybrid account -################################################################################ - -module "base" { - source = "../base" - - prefix = local.environment - aws_region = local.aws_region -} - - -module "runners" { - source = "../../" - create_service_linked_role_spot = true - aws_region = local.aws_region - vpc_id = module.base.vpc.vpc_id - subnet_ids = module.base.vpc.private_subnets - - prefix = local.environment - tags = { - Project = "ProjectX" - } - - github_app = { - key_base64 = var.github_app.key_base64 - id = var.github_app.id - webhook_secret = random_id.random.hex - } - - # Grab zip files via lambda_download, will automatically get the ARM64 build - webhook_lambda_zip = "../lambdas-download/webhook.zip" - runner_binaries_syncer_lambda_zip = "../lambdas-download/runner-binaries-syncer.zip" - runners_lambda_zip = "../lambdas-download/runners.zip" - - enable_organization_runners = false - # Runners will automatically get the "arm64" label - runner_extra_labels = ["default", "example"] - - # enable access to the runners via SSM - enable_ssm_on_runners = true - - # use S3 or KMS SSE to runners S3 bucket - # runner_binaries_s3_sse_configuration = { - # rule = { - # apply_server_side_encryption_by_default = { - # sse_algorithm = "AES256" - # } - # } - # } - - # enable S3 versioning for runners S3 bucket - # runner_binaries_s3_versioning = "Enabled" - - # Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam - # idle_config = [{ - # cron = "* * 9-17 * * *" - # timeZone = "Europe/Amsterdam" - # idleCount = 1 - # }] - - # Let the module manage the service linked role - # create_service_linked_role_spot = true - - runner_architecture = "arm64" - # Ensure all instance types have ARM64 architecture (ie. AWS Graviton processors) - instance_types = ["t4g.large", "c6g.large"] - - # override delay of events in seconds - delay_webhook_event = 5 - runners_maximum_count = 1 - - # override scaling down - scale_down_schedule_expression = "cron(* * * * ? *)" -} - -module "webhook_github_app" { - source = "../../modules/webhook-github-app" - - github_app = { - key_base64 = var.github_app.key_base64 - id = var.github_app.id - webhook_secret = random_id.random.hex - } - webhook_endpoint = module.runners.webhook.endpoint -} diff --git a/examples/arm64/outputs.tf b/examples/arm64/outputs.tf deleted file mode 100644 index c50214f566..0000000000 --- a/examples/arm64/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "runners" { - value = { - lambda_syncer_name = module.runners.binaries_syncer.lambda.function_name - } -} - -output "webhook_endpoint" { - value = module.runners.webhook.endpoint -} - -output "webhook_secret" { - sensitive = true - value = random_id.random.hex -} - diff --git a/examples/arm64/providers.tf b/examples/arm64/providers.tf deleted file mode 100644 index b6c81d5415..0000000000 --- a/examples/arm64/providers.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "aws" { - region = local.aws_region -} diff --git a/examples/arm64/variables.tf b/examples/arm64/variables.tf deleted file mode 100644 index 35a65dbd4a..0000000000 --- a/examples/arm64/variables.tf +++ /dev/null @@ -1,8 +0,0 @@ -variable "github_app" { - description = "GitHub App for API usages." - - type = object({ - id = string - key_base64 = string - }) -} diff --git a/examples/arm64/versions.tf b/examples/arm64/versions.tf deleted file mode 100644 index 349e8243a5..0000000000 --- a/examples/arm64/versions.tf +++ /dev/null @@ -1,17 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.27" - } - local = { - source = "hashicorp/local" - version = "~> 2.0" - } - random = { - source = "hashicorp/random" - version = "~> 3.0" - } - } - required_version = ">= 1.3.0" -} diff --git a/examples/ubuntu/.terraform.lock.hcl b/examples/ubuntu/.terraform.lock.hcl deleted file mode 100644 index 60a47db0b8..0000000000 --- a/examples/ubuntu/.terraform.lock.hcl +++ /dev/null @@ -1,85 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "5.31.0" - constraints = ">= 5.0.0, ~> 5.27" - hashes = [ - "h1:ltxyuBWIy9cq0kIKDJH1jeWJy/y7XJLjS4QrsQK4plA=", - "zh:0cdb9c2083bf0902442384f7309367791e4640581652dda456f2d6d7abf0de8d", - "zh:2fe4884cb9642f48a5889f8dff8f5f511418a18537a9dfa77ada3bcdad391e4e", - "zh:36d8bdd72fe61d816d0049c179f495bc6f1e54d8d7b07c45b62e5e1696882a89", - "zh:539dd156e3ec608818eb21191697b230117437a58587cbd02ce533202a4dd520", - "zh:6a53f4b57ac4eb3479fc0d8b6e301ca3a27efae4c55d9f8bd24071b12a03361c", - "zh:6faeb8ff6792ca7af1c025255755ad764667a300291cc10cea0c615479488c87", - "zh:7d9423149b323f6d0df5b90c4d9029e5455c670aea2a7eb6fef4684ba7eb2e0b", - "zh:8235badd8a5d0993421cacf5ead48fac73d3b5a25c8a68599706a404b1f70730", - "zh:860b4f60842b2879c5128b7e386c8b49adeda9287fed12c5cd74861bb659bbcd", - "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:b021fceaf9382c8fe3c6eb608c24d01dce3d11ba7e65bb443d51ca9b90e9b237", - "zh:b38b0bfc1c69e714e80cf1c9ea06e687ee86aa9f45694be28eb07adcebbe0489", - "zh:c972d155f6c01af9690a72adfb99cfc24ef5ef311ca92ce46b9b13c5c153f572", - "zh:e0dd29920ec84fdb6026acff44dcc1fb1a24a0caa093fa04cdbc713d384c651d", - "zh:e3127ebd2cb0374cd1808f911e6bffe2f4ac4d84317061381242353f3a7bc27d", - ] -} - -provider "registry.terraform.io/hashicorp/local" { - version = "2.4.1" - constraints = "~> 2.0" - hashes = [ - "h1:gpp25uNkYJYzJVnkyRr7RIBVfwLs9GSq2HNnFpTRBg0=", - "zh:244b445bf34ddbd167731cc6c6b95bbed231dc4493f8cc34bd6850cfe1f78528", - "zh:3c330bdb626123228a0d1b1daa6c741b4d5d484ab1c7ae5d2f48d4c9885cc5e9", - "zh:5ff5f9b791ddd7557e815449173f2db38d338e674d2d91800ac6e6d808de1d1d", - "zh:70206147104f4bf26ae67d730c995772f85bf23e28c2c2e7612c74f4dae3c46f", - "zh:75029676993accd6bef933c196b2fad51a9ec8a69a847dbbe96ec8ebf7926cdc", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7d48d5999fe1fcdae9295a7c3448ac1541f5a24c474bd82df6d4fa3732483f2b", - "zh:b766b38b027f0f84028244d1c2f990431a37d4fc3ac645962924554016507e77", - "zh:bfc7ad301dada204cf51c59d8bd6a9a87de5fddb42190b4d6ba157d6e08a1f10", - "zh:c902b527702a8c5e2c25a6637d07bbb1690cb6c1e63917a5f6dc460efd18d43f", - "zh:d68ae0e1070cf429c46586bc87580c3ed113f76241da2b6e4f1a8348126b3c46", - "zh:f4903fd89f7c92a346ae9e666c2d0b6884c4474ae109e9b4bd15e7efaa4bfc29", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = "~> 3.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "3.6.0" - constraints = "~> 3.0" - hashes = [ - "h1:I8MBeauYA8J8yheLJ8oSMWqB0kovn16dF/wKZ1QTdkk=", - "zh:03360ed3ecd31e8c5dac9c95fe0858be50f3e9a0d0c654b5e504109c2159287d", - "zh:1c67ac51254ba2a2bb53a25e8ae7e4d076103483f55f39b426ec55e47d1fe211", - "zh:24a17bba7f6d679538ff51b3a2f378cedadede97af8a1db7dad4fd8d6d50f829", - "zh:30ffb297ffd1633175d6545d37c2217e2cef9545a6e03946e514c59c0859b77d", - "zh:454ce4b3dbc73e6775f2f6605d45cee6e16c3872a2e66a2c97993d6e5cbd7055", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:91df0a9fab329aff2ff4cf26797592eb7a3a90b4a0c04d64ce186654e0cc6e17", - "zh:aa57384b85622a9f7bfb5d4512ca88e61f22a9cea9f30febaa4c98c68ff0dc21", - "zh:c4a3e329ba786ffb6f2b694e1fd41d413a7010f3a53c20b432325a94fa71e839", - "zh:e2699bc9116447f96c53d55f2a00570f982e6f9935038c3810603572693712d0", - "zh:e747c0fd5d7684e5bfad8aa0ca441903f15ae7a98a737ff6aca24ba223207e2c", - "zh:f1ca75f417ce490368f047b63ec09fd003711ae48487fba90b4aba2ccf71920e", - ] -} diff --git a/examples/ubuntu/README.md b/examples/ubuntu/README.md deleted file mode 100644 index 49c15fcda3..0000000000 --- a/examples/ubuntu/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Ubuntu example - -> This example will be removed soon. Please check the example for epehemeral runners to see how to setup ubuntu based runner. - -This module shows how to create GitHub action runners using an Ubuntu AMI. Lambda release will be downloaded from GitHub. - -## Usages - -Steps for the full setup, such as creating a GitHub app can be found in the [docs](https://philips-labs.github.io/terraform-aws-github-runner/getting-started/). First download the Lambda releases from GitHub. Alternatively you can build the lambdas locally with Node or Docker, there is a simple build script in `/.ci/build.sh`. In the `main.tf` you can simply remove the location of the lambda zip files, the default location will work in this case. - -> Ensure you have set the version in `lambdas-download/main.tf` for running the example. The version needs to be set to a GitHub release version, see https://github.com/philips-labs/terraform-aws-github-runner/releases - - -```bash -cd ../lambdas-download -terraform init -terraform apply -var=module_version= -cd - -``` - -Before running Terraform, ensure the GitHub app is configured. - -```bash -terraform init -terraform apply -``` - -The module will try to update the GitHub App webhook and secret (only linux/mac). You can receive the webhook details by running: - -```bash -terraform output webhook_secret -``` - - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.3.0 | -| [aws](#requirement\_aws) | ~> 5.27 | -| [local](#requirement\_local) | ~> 2.0 | -| [random](#requirement\_random) | ~> 3.0 | - -## Providers - -| Name | Version | -|------|---------| -| [random](#provider\_random) | 3.6.0 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [base](#module\_base) | ../base | n/a | -| [runners](#module\_runners) | ../../ | n/a | -| [webhook\_github\_app](#module\_webhook\_github\_app) | ../../modules/webhook-github-app | n/a | - -## Resources - -| Name | Type | -|------|------| -| [random_id.random](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [github\_app](#input\_github\_app) | GitHub for API usages. |
object({
id = string
key_base64 = string
})
| n/a | yes | - -## Outputs - -| Name | Description | -|------|-------------| -| [runners](#output\_runners) | n/a | -| [webhook\_endpoint](#output\_webhook\_endpoint) | n/a | -| [webhook\_secret](#output\_webhook\_secret) | n/a | - diff --git a/examples/ubuntu/main.tf b/examples/ubuntu/main.tf deleted file mode 100644 index ecdf5f473a..0000000000 --- a/examples/ubuntu/main.tf +++ /dev/null @@ -1,125 +0,0 @@ -locals { - environment = "ubuntu" - aws_region = "eu-west-1" -} - -resource "random_id" "random" { - byte_length = 20 -} - -module "base" { - source = "../base" - - prefix = local.environment - aws_region = local.aws_region -} - -module "runners" { - source = "../../" - - aws_region = local.aws_region - vpc_id = module.base.vpc.vpc_id - subnet_ids = module.base.vpc.private_subnets - - prefix = local.environment - tags = { - Project = "ProjectX" - } - - github_app = { - key_base64 = var.github_app.key_base64 - id = var.github_app.id - webhook_secret = random_id.random.hex - } - - # webhook_lambda_zip = "lambdas-download/webhook.zip" - # runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip" - # runners_lambda_zip = "lambdas-download/runners.zip" - - enable_organization_runners = false - runner_extra_labels = ["default", "example"] - - # enable access to the runners via SSM - enable_ssm_on_runners = true - - runner_run_as = "ubuntu" - - # AMI selection and userdata - # - # option 1. configure your pre-built AMI + userdata - userdata_template = "./templates/user-data.sh" - ami_owners = ["099720109477"] # Canonical's Amazon account ID - - ami_filter = { - name = ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"], - state = ["available"] - } - - # Custom build AMI, no custom userdata needed. - # option 2: Build custom AMI see ../../images/ubuntu-focal - # disable lines above (option 1) and enable the ones below - # ami_filter = { name = ["github-runner-ubuntu-focal-amd64-*"], state = ["available"] } - # data "aws_caller_identity" "current" {} - # ami_owners = [data.aws_caller_identity.current.account_id] - - block_device_mappings = [{ - # Set the block device name for Ubuntu root device - device_name = "/dev/sda1" - delete_on_termination = true - volume_type = "gp3" - volume_size = 30 - encrypted = true - iops = null - throughput = null - kms_key_id = null - snapshot_id = null - }] - - runner_log_files = [ - { - "log_group_name" : "syslog", - "prefix_log_group" : true, - "file_path" : "/var/log/syslog", - "log_stream_name" : "{instance_id}" - }, - { - "log_group_name" : "user_data", - "prefix_log_group" : true, - "file_path" : "/var/log/user-data.log", - "log_stream_name" : "{instance_id}/user_data" - }, - { - "log_group_name" : "runner", - "prefix_log_group" : true, - "file_path" : "/opt/actions-runner/_diag/Runner_**.log", - "log_stream_name" : "{instance_id}/runner" - } - ] - - # Uncomment to enable ephemeral runners - # delay_webhook_event = 0 - # enable_ephemeral_runners = true - # enable_userdata = true - - # Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam - # idle_config = [{ - # cron = "* * 9-17 * * *" - # timeZone = "Europe/Amsterdam" - # idleCount = 1 - # }] - - # Enable logging all commands of user_data, secrets will be logged!!! - # enable_user_data_debug_logging_runner = true -} - -module "webhook_github_app" { - source = "../../modules/webhook-github-app" - depends_on = [module.runners] - - github_app = { - key_base64 = var.github_app.key_base64 - id = var.github_app.id - webhook_secret = random_id.random.hex - } - webhook_endpoint = module.runners.webhook.endpoint -} diff --git a/examples/ubuntu/outputs.tf b/examples/ubuntu/outputs.tf deleted file mode 100644 index c50214f566..0000000000 --- a/examples/ubuntu/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "runners" { - value = { - lambda_syncer_name = module.runners.binaries_syncer.lambda.function_name - } -} - -output "webhook_endpoint" { - value = module.runners.webhook.endpoint -} - -output "webhook_secret" { - sensitive = true - value = random_id.random.hex -} - diff --git a/examples/ubuntu/providers.tf b/examples/ubuntu/providers.tf deleted file mode 100644 index 5e9cb34d29..0000000000 --- a/examples/ubuntu/providers.tf +++ /dev/null @@ -1,15 +0,0 @@ -provider "aws" { - region = local.aws_region - default_tags { - tags = { - Example = local.environment - } - } - # If you use roles with specific permissions please add your role - # assume_role { - # role_arn = "arn:aws:iam::123456789012:role/MyAdminRole" - # } -} - -provider "random" { -} diff --git a/examples/ubuntu/templates/user-data.sh b/examples/ubuntu/templates/user-data.sh deleted file mode 100644 index 752a0de0e3..0000000000 --- a/examples/ubuntu/templates/user-data.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -exec > >(tee /var/log/user-data.log | logger -t user-data -s 2>/dev/console) 2>&1 - - -# AWS suggest to create a log for debug purpose based on https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-log-user-data/ -# As side effect all command, set +x disable debugging explicitly. -# -# An alternative for masking tokens could be: exec > >(sed 's/--token\ [^ ]* /--token\ *** /g' > /var/log/user-data.log) 2>&1 -set +x - -%{ if enable_debug_logging } -set -x -%{ endif } - -${pre_install} - -# Install AWS CLI -apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install -y \ - awscli \ - build-essential \ - curl \ - git \ - iptables \ - jq \ - uidmap \ - unzip \ - wget - -user_name=ubuntu -user_id=$(id -ru $user_name) - -# install and configure cloudwatch logging agent -wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb -dpkg -i -E ./amazon-cloudwatch-agent.deb -amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c ssm:${ssm_key_cloudwatch_agent_config} - -# configure systemd for running service in users accounts -cat >/etc/systemd/user@UID.service <<-EOF - -[Unit] -Description=User Manager for UID %i -After=user-runtime-dir@%i.service -Wants=user-runtime-dir@%i.service - -[Service] -LimitNOFILE=infinity -LimitNPROC=infinity -User=%i -PAMName=systemd-user -Type=notify - -[Install] -WantedBy=default.target - -EOF - -echo export XDG_RUNTIME_DIR=/run/user/$user_id >>/home/$user_name/.bashrc - -systemctl daemon-reload -systemctl enable user@UID.service -systemctl start user@UID.service - -curl -fsSL https://get.docker.com/rootless >>/opt/rootless.sh && chmod 755 /opt/rootless.sh -su -l $user_name -c /opt/rootless.sh -echo export DOCKER_HOST=unix:///run/user/$user_id/docker.sock >>/home/$user_name/.bashrc -echo export PATH=/home/$user_name/bin:$PATH >>/home/$user_name/.bashrc - -# Run docker service by default -loginctl enable-linger $user_name -su -l $user_name -c "systemctl --user enable docker" - -${install_runner} - -# config runner for rootless docker -cd /opt/actions-runner/ -echo DOCKER_HOST=unix:///run/user/$user_id/docker.sock >>.env -echo PATH=/home/$user_name/bin:$PATH >>.env - -${post_install} - -cd /opt/actions-runner - -${start_runner} diff --git a/examples/ubuntu/variables.tf b/examples/ubuntu/variables.tf deleted file mode 100644 index d8b5356484..0000000000 --- a/examples/ubuntu/variables.tf +++ /dev/null @@ -1,8 +0,0 @@ -variable "github_app" { - description = "GitHub for API usages." - - type = object({ - id = string - key_base64 = string - }) -} diff --git a/examples/ubuntu/versions.tf b/examples/ubuntu/versions.tf deleted file mode 100644 index 349e8243a5..0000000000 --- a/examples/ubuntu/versions.tf +++ /dev/null @@ -1,17 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.27" - } - local = { - source = "hashicorp/local" - version = "~> 2.0" - } - random = { - source = "hashicorp/random" - version = "~> 3.0" - } - } - required_version = ">= 1.3.0" -} diff --git a/examples/windows/.terraform.lock.hcl b/examples/windows/.terraform.lock.hcl deleted file mode 100644 index 60a47db0b8..0000000000 --- a/examples/windows/.terraform.lock.hcl +++ /dev/null @@ -1,85 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "5.31.0" - constraints = ">= 5.0.0, ~> 5.27" - hashes = [ - "h1:ltxyuBWIy9cq0kIKDJH1jeWJy/y7XJLjS4QrsQK4plA=", - "zh:0cdb9c2083bf0902442384f7309367791e4640581652dda456f2d6d7abf0de8d", - "zh:2fe4884cb9642f48a5889f8dff8f5f511418a18537a9dfa77ada3bcdad391e4e", - "zh:36d8bdd72fe61d816d0049c179f495bc6f1e54d8d7b07c45b62e5e1696882a89", - "zh:539dd156e3ec608818eb21191697b230117437a58587cbd02ce533202a4dd520", - "zh:6a53f4b57ac4eb3479fc0d8b6e301ca3a27efae4c55d9f8bd24071b12a03361c", - "zh:6faeb8ff6792ca7af1c025255755ad764667a300291cc10cea0c615479488c87", - "zh:7d9423149b323f6d0df5b90c4d9029e5455c670aea2a7eb6fef4684ba7eb2e0b", - "zh:8235badd8a5d0993421cacf5ead48fac73d3b5a25c8a68599706a404b1f70730", - "zh:860b4f60842b2879c5128b7e386c8b49adeda9287fed12c5cd74861bb659bbcd", - "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:b021fceaf9382c8fe3c6eb608c24d01dce3d11ba7e65bb443d51ca9b90e9b237", - "zh:b38b0bfc1c69e714e80cf1c9ea06e687ee86aa9f45694be28eb07adcebbe0489", - "zh:c972d155f6c01af9690a72adfb99cfc24ef5ef311ca92ce46b9b13c5c153f572", - "zh:e0dd29920ec84fdb6026acff44dcc1fb1a24a0caa093fa04cdbc713d384c651d", - "zh:e3127ebd2cb0374cd1808f911e6bffe2f4ac4d84317061381242353f3a7bc27d", - ] -} - -provider "registry.terraform.io/hashicorp/local" { - version = "2.4.1" - constraints = "~> 2.0" - hashes = [ - "h1:gpp25uNkYJYzJVnkyRr7RIBVfwLs9GSq2HNnFpTRBg0=", - "zh:244b445bf34ddbd167731cc6c6b95bbed231dc4493f8cc34bd6850cfe1f78528", - "zh:3c330bdb626123228a0d1b1daa6c741b4d5d484ab1c7ae5d2f48d4c9885cc5e9", - "zh:5ff5f9b791ddd7557e815449173f2db38d338e674d2d91800ac6e6d808de1d1d", - "zh:70206147104f4bf26ae67d730c995772f85bf23e28c2c2e7612c74f4dae3c46f", - "zh:75029676993accd6bef933c196b2fad51a9ec8a69a847dbbe96ec8ebf7926cdc", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7d48d5999fe1fcdae9295a7c3448ac1541f5a24c474bd82df6d4fa3732483f2b", - "zh:b766b38b027f0f84028244d1c2f990431a37d4fc3ac645962924554016507e77", - "zh:bfc7ad301dada204cf51c59d8bd6a9a87de5fddb42190b4d6ba157d6e08a1f10", - "zh:c902b527702a8c5e2c25a6637d07bbb1690cb6c1e63917a5f6dc460efd18d43f", - "zh:d68ae0e1070cf429c46586bc87580c3ed113f76241da2b6e4f1a8348126b3c46", - "zh:f4903fd89f7c92a346ae9e666c2d0b6884c4474ae109e9b4bd15e7efaa4bfc29", - ] -} - -provider "registry.terraform.io/hashicorp/null" { - version = "3.2.2" - constraints = "~> 3.0" - hashes = [ - "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", - "zh:3248aae6a2198f3ec8394218d05bd5e42be59f43a3a7c0b71c66ec0df08b69e7", - "zh:32b1aaa1c3013d33c245493f4a65465eab9436b454d250102729321a44c8ab9a", - "zh:38eff7e470acb48f66380a73a5c7cdd76cc9b9c9ba9a7249c7991488abe22fe3", - "zh:4c2f1faee67af104f5f9e711c4574ff4d298afaa8a420680b0cb55d7bbc65606", - "zh:544b33b757c0b954dbb87db83a5ad921edd61f02f1dc86c6186a5ea86465b546", - "zh:696cf785090e1e8cf1587499516b0494f47413b43cb99877ad97f5d0de3dc539", - "zh:6e301f34757b5d265ae44467d95306d61bef5e41930be1365f5a8dcf80f59452", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:913a929070c819e59e94bb37a2a253c228f83921136ff4a7aa1a178c7cce5422", - "zh:aa9015926cd152425dbf86d1abdbc74bfe0e1ba3d26b3db35051d7b9ca9f72ae", - "zh:bb04798b016e1e1d49bcc76d62c53b56c88c63d6f2dfe38821afef17c416a0e1", - "zh:c23084e1b23577de22603cff752e59128d83cfecc2e6819edadd8cf7a10af11e", - ] -} - -provider "registry.terraform.io/hashicorp/random" { - version = "3.6.0" - constraints = "~> 3.0" - hashes = [ - "h1:I8MBeauYA8J8yheLJ8oSMWqB0kovn16dF/wKZ1QTdkk=", - "zh:03360ed3ecd31e8c5dac9c95fe0858be50f3e9a0d0c654b5e504109c2159287d", - "zh:1c67ac51254ba2a2bb53a25e8ae7e4d076103483f55f39b426ec55e47d1fe211", - "zh:24a17bba7f6d679538ff51b3a2f378cedadede97af8a1db7dad4fd8d6d50f829", - "zh:30ffb297ffd1633175d6545d37c2217e2cef9545a6e03946e514c59c0859b77d", - "zh:454ce4b3dbc73e6775f2f6605d45cee6e16c3872a2e66a2c97993d6e5cbd7055", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:91df0a9fab329aff2ff4cf26797592eb7a3a90b4a0c04d64ce186654e0cc6e17", - "zh:aa57384b85622a9f7bfb5d4512ca88e61f22a9cea9f30febaa4c98c68ff0dc21", - "zh:c4a3e329ba786ffb6f2b694e1fd41d413a7010f3a53c20b432325a94fa71e839", - "zh:e2699bc9116447f96c53d55f2a00570f982e6f9935038c3810603572693712d0", - "zh:e747c0fd5d7684e5bfad8aa0ca441903f15ae7a98a737ff6aca24ba223207e2c", - "zh:f1ca75f417ce490368f047b63ec09fd003711ae48487fba90b4aba2ccf71920e", - ] -} diff --git a/examples/windows/README.md b/examples/windows/README.md deleted file mode 100644 index 5a419f630d..0000000000 --- a/examples/windows/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Windows runners - - -> This example will be removed soon. Please check the example for epehemeral runners to see how to setup Windows based runner. - -This module shows how to create GitHub action runners using an Windows Runners. Lambda release will be downloaded from GitHub. - -## Usages - -Steps for the full setup, such as creating a GitHub app can be found in the [docs](https://philips-labs.github.io/terraform-aws-github-runner/getting-started/). First, download the Lambda releases from GitHub. Alternatively you can build the lambdas locally with Node or Docker, for which there is a build script available at `/.ci/build.sh`. In the `main.tf` you can remove the location of the lambda zip files, the default location will work in this case. - -> Ensure you have set the version in `lambdas-download/main.tf` for running the example. The version needs to be set to a GitHub release version, see - - -```pwsh -cd lambdas-download -terraform init -terraform apply -cd .. -``` - -Before running Terraform, ensure the GitHub app is configured. - -```bash -terraform init -terraform apply -``` - -_**Note**_: It can take upwards of ten minutes for a runner to start processing jobs, and about as long for logs to start showing up. It's recommend that scale the runners via a warm-up job and then keep them idled. - -The module will try to update the GitHub App webhook and secret (only linux/mac). You can receive the webhook details by running: - -```bash -terraform output webhook_secret -``` - - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.3.0 | -| [aws](#requirement\_aws) | ~> 5.27 | -| [local](#requirement\_local) | ~> 2.0 | -| [random](#requirement\_random) | ~> 3.0 | - -## Providers - -| Name | Version | -|------|---------| -| [random](#provider\_random) | 3.6.0 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [base](#module\_base) | ../base | n/a | -| [runners](#module\_runners) | ../../ | n/a | -| [webhook\_github\_app](#module\_webhook\_github\_app) | ../../modules/webhook-github-app | n/a | - -## Resources - -| Name | Type | -|------|------| -| [random_id.random](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [github\_app](#input\_github\_app) | GitHub for API usages. |
object({
id = string
key_base64 = string
})
| n/a | yes | - -## Outputs - -| Name | Description | -|------|-------------| -| [runners](#output\_runners) | n/a | -| [webhook\_endpoint](#output\_webhook\_endpoint) | n/a | -| [webhook\_secret](#output\_webhook\_secret) | n/a | - diff --git a/examples/windows/lambdas-download/README.md b/examples/windows/lambdas-download/README.md deleted file mode 100644 index a9a0b890e9..0000000000 --- a/examples/windows/lambdas-download/README.md +++ /dev/null @@ -1,31 +0,0 @@ - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1 | - -## Providers - -No providers. - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [lambdas](#module\_lambdas) | ../../../modules/download-lambda | n/a | - -## Resources - -No resources. - -## Inputs - -No inputs. - -## Outputs - -| Name | Description | -|------|-------------| -| [files](#output\_files) | n/a | - \ No newline at end of file diff --git a/examples/windows/lambdas-download/main.tf b/examples/windows/lambdas-download/main.tf deleted file mode 100644 index 87f31bd8a9..0000000000 --- a/examples/windows/lambdas-download/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -locals { - version = "" -} - -module "lambdas" { - source = "../../../modules/download-lambda" - lambdas = [ - { - name = "webhook" - tag = local.version - }, - { - name = "runners" - tag = local.version - }, - { - name = "runner-binaries-syncer" - tag = local.version - } - ] -} - -output "files" { - value = module.lambdas.files -} diff --git a/examples/windows/lambdas-download/versions.tf b/examples/windows/lambdas-download/versions.tf deleted file mode 100644 index c934712b56..0000000000 --- a/examples/windows/lambdas-download/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 1" -} diff --git a/examples/windows/main.tf b/examples/windows/main.tf deleted file mode 100644 index fea31e79e9..0000000000 --- a/examples/windows/main.tf +++ /dev/null @@ -1,67 +0,0 @@ -locals { - environment = "windows" - aws_region = "eu-west-1" -} - -resource "random_id" "random" { - byte_length = 20 -} - -module "base" { - source = "../base" - - prefix = local.environment - aws_region = local.aws_region -} - -module "runners" { - source = "../../" - - aws_region = local.aws_region - vpc_id = module.base.vpc.vpc_id - subnet_ids = module.base.vpc.private_subnets - prefix = local.environment - - github_app = { - key_base64 = var.github_app.key_base64 - id = var.github_app.id - webhook_secret = random_id.random.hex - } - - # Grab the lambda packages from local directory. Must run /.ci/build.sh first - webhook_lambda_zip = "../../lambda_output/webhook.zip" - runner_binaries_syncer_lambda_zip = "../../lambda_output/runner-binaries-syncer.zip" - runners_lambda_zip = "../../lambda_output/runners.zip" - - enable_organization_runners = false - # no need to add extra windows tag here as it is automatically added by GitHub - runner_extra_labels = ["default", "example"] - - # Set the OS to Windows - runner_os = "windows" - # we need to give the runner time to start because this is windows. - runner_boot_time_in_minutes = 20 - - # enable access to the runners via SSM - enable_ssm_on_runners = true - - instance_types = ["m5.large", "c5.large"] - - # override delay of events in seconds for testing - delay_webhook_event = 5 - - # override scaling down for testing - scale_down_schedule_expression = "cron(* * * * ? *)" -} - -module "webhook_github_app" { - source = "../../modules/webhook-github-app" - depends_on = [module.runners] - - github_app = { - key_base64 = var.github_app.key_base64 - id = var.github_app.id - webhook_secret = random_id.random.hex - } - webhook_endpoint = module.runners.webhook.endpoint -} diff --git a/examples/windows/outputs.tf b/examples/windows/outputs.tf deleted file mode 100644 index c50214f566..0000000000 --- a/examples/windows/outputs.tf +++ /dev/null @@ -1,15 +0,0 @@ -output "runners" { - value = { - lambda_syncer_name = module.runners.binaries_syncer.lambda.function_name - } -} - -output "webhook_endpoint" { - value = module.runners.webhook.endpoint -} - -output "webhook_secret" { - sensitive = true - value = random_id.random.hex -} - diff --git a/examples/windows/providers.tf b/examples/windows/providers.tf deleted file mode 100644 index ccdd0b1622..0000000000 --- a/examples/windows/providers.tf +++ /dev/null @@ -1,8 +0,0 @@ -provider "aws" { - region = local.aws_region - default_tags { - tags = { - Example = local.environment - } - } -} diff --git a/examples/windows/variables.tf b/examples/windows/variables.tf deleted file mode 100644 index d8b5356484..0000000000 --- a/examples/windows/variables.tf +++ /dev/null @@ -1,8 +0,0 @@ -variable "github_app" { - description = "GitHub for API usages." - - type = object({ - id = string - key_base64 = string - }) -} diff --git a/examples/windows/versions.tf b/examples/windows/versions.tf deleted file mode 100644 index 349e8243a5..0000000000 --- a/examples/windows/versions.tf +++ /dev/null @@ -1,17 +0,0 @@ -terraform { - required_providers { - aws = { - source = "hashicorp/aws" - version = "~> 5.27" - } - local = { - source = "hashicorp/local" - version = "~> 2.0" - } - random = { - source = "hashicorp/random" - version = "~> 3.0" - } - } - required_version = ">= 1.3.0" -}