diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index f4226c4270..7fc69e2f48 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -113,7 +113,7 @@ jobs: key: tflint-${{ hashFiles('.tflint.hcl') }} - if: contains(matrix.terraform, '1.3.') name: Setup TFLint - uses: terraform-linters/setup-tflint@v4 + uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 with: github_token: ${{ secrets.GITHUB_TOKEN }} - if: contains(matrix.terraform, '1.3.') @@ -171,7 +171,7 @@ jobs: key: tflint-${{ hashFiles('.tflint.hcl') }} - if: contains(matrix.terraform, '1.5.') name: Setup TFLint - uses: terraform-linters/setup-tflint@v4 + uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 with: github_token: ${{ secrets.GITHUB_TOKEN }} - if: contains(matrix.terraform, '1.5.') diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..1a2f5bd204 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* \ No newline at end of file diff --git a/examples/base/variables.tf b/examples/base/variables.tf index 895e80ab5e..0c69421223 100644 --- a/examples/base/variables.tf +++ b/examples/base/variables.tf @@ -1,9 +1,11 @@ variable "prefix" { description = "Prefix used for resource naming." type = string + default = "terraform-gha" } variable "aws_region" { description = "AWS region to create the VPC, assuming zones `a` and `b` exists." type = string + default = "us-east-2" } diff --git a/examples/base/vpc.tf b/examples/base/vpc.tf index cc6a3b7649..266dfa0d3f 100644 --- a/examples/base/vpc.tf +++ b/examples/base/vpc.tf @@ -3,11 +3,11 @@ module "vpc" { version = "5.0.0" name = "${var.prefix}-vpc" - cidr = "10.0.0.0/16" + cidr = "10.100.0.0/16" azs = ["${var.aws_region}a", "${var.aws_region}b"] - private_subnets = ["10.0.1.0/24", "10.0.2.0/24"] - public_subnets = ["10.0.101.0/24", "10.0.102.0/24"] + private_subnets = ["10.100.1.0/24", "10.100.2.0/24"] + public_subnets = ["10.100.101.0/24", "10.100.102.0/24"] enable_dns_hostnames = true enable_nat_gateway = true diff --git a/examples/marklap-test/.terraform.lock.hcl b/examples/marklap-test/.terraform.lock.hcl new file mode 100644 index 0000000000..0724a2ee34 --- /dev/null +++ b/examples/marklap-test/.terraform.lock.hcl @@ -0,0 +1,89 @@ +# 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.0, ~> 5.27" + hashes = [ + "h1:WwgMbMOhZblxZTdjHeJf9XB2/hcSHHmpuywLxuTWYw0=", + "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:FzraUapGrJoH3ZOWiUT2m6QpZAD+HmU+JmqZgM4/o2Y=", + "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, ~> 3.2" + hashes = [ + "h1:IMVAUHKoydFrlPrl9OzasDnw/8ntZFerCC9iXw1rXQY=", + "h1:zT1ZbegaAYHwQa+QwIFugArWikRJI9dqohj8xb0GY88=", + "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=", + "h1:R5Ucn26riKIEijcsiOMBR3uOAjuOMfI1x7XvH4P6B1w=", + "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/marklap-test/README.md b/examples/marklap-test/README.md new file mode 100644 index 0000000000..a3d057bb04 --- /dev/null +++ b/examples/marklap-test/README.md @@ -0,0 +1,76 @@ +# Amazon Linux X64 (default) + +This module shows how to create GitHub action 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 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. + +> The default example assumes local built lambda's available. Ensure you have built the lambda's. Alternativly you can downlowd the lambda's. 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 | +|------|-------------|------|---------|:--------:| +| [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no | +| [environment](#input\_environment) | Environment name, used as prefix. | `string` | `null` | no | +| [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/marklap-test/main.tf b/examples/marklap-test/main.tf new file mode 100644 index 0000000000..be669464ea --- /dev/null +++ b/examples/marklap-test/main.tf @@ -0,0 +1,176 @@ +locals { + environment = var.environment != null ? var.environment : "default" + aws_region = var.aws_region +} + +resource "random_id" "random" { + byte_length = 20 +} + +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 + } + + # configure the block device mappings, default for Amazon Linux2 + # block_device_mappings = [{ + # device_name = "/dev/xvda" + # delete_on_termination = true + # volume_type = "gp3" + # volume_size = 10 + # encrypted = true + # iops = null + # }] + + # When not explicitly set lambda zip files are grapped from the module requiring lambda build. + # Alternatively you can set the path to the lambda zip files here. + # + # For example grab zip files via lambda_download + # 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" + webhook_lambda_zip = "./webhook.zip" + runners_lambda_zip = "./runners.zip" + runner_binaries_syncer_lambda_zip = "./runner-binaries-syncer.zip" + ami_housekeeper_lambda_zip = "./ami-housekeeper.zip" + + enable_organization_runners = true + runner_extra_labels = ["terraformgha"] + + # 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 + + instance_types = ["m7a.large", "m5.large"] + + # override delay of events in seconds + delay_webhook_event = 5 + runners_maximum_count = 2 + + # set up a fifo queue to remain order + enable_fifo_build_queue = true + + # override scaling down + scale_down_schedule_expression = "cron(* * * * ? *)" + + enable_user_data_debug_logging_runner = true + + # prefix GitHub runners with the environment name + runner_name_prefix = "${local.environment}_" + + # webhook supports two modes, either direct or via the eventbridge, uncomment to enable eventbridge + # eventbridge = { + # enable = true + # # adjust the allow events to only allow specific events, like workflow_job + # # allowed_events = ['workflow_job'] + # } + + # Enable debug logging for the lambda functions + # log_level = "debug" + + # tracing_config = { + # mode = "Active" + # capture_error = true + # capture_http_requests = true + # } + + enable_ami_housekeeper = true + ami_housekeeper_cleanup_config = { + ssmParameterNames = ["*/ami-id"] + minimumDaysOld = 10 + amiFilters = [ + { + Name = "name" + Values = ["*al2023*"] + } + ] + } + + instance_termination_watcher = { + enable = true + zip = "./termination-watcher.zip" + } + + # enable metric creation (experimental) + # metrics = { + # enable = true + # metric = { + # enable_spot_termination_warning = true + # enable_job_retry = false + # enable_github_app_rate_limit = false + # } + # } + + # enable job_retry feature. Be careful with this feature, it can lead to you hitting API rate limits. + # job_retry = { + # enable = true + # max_attempts = 1 + # delay_in_seconds = 180 + # } + + # enable CMK instead of aws managed key for encryptions + # kms_key_arn = aws_kms_key.github.arn +} + +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 +} + +# enable CMK instead of aws managed key for encryptions +# resource "aws_kms_key" "github" { +# is_enabled = true +# } + +# resource "aws_kms_alias" "github" { +# name = "alias/github/action-runners" +# target_key_id = aws_kms_key.github.key_id +# } diff --git a/examples/marklap-test/outputs.tf b/examples/marklap-test/outputs.tf new file mode 100644 index 0000000000..c50214f566 --- /dev/null +++ b/examples/marklap-test/outputs.tf @@ -0,0 +1,15 @@ +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/marklap-test/providers.tf b/examples/marklap-test/providers.tf new file mode 100644 index 0000000000..904d93cfbb --- /dev/null +++ b/examples/marklap-test/providers.tf @@ -0,0 +1,10 @@ +provider "aws" { + region = local.aws_region + profile = "pesandbox-admin" + + default_tags { + tags = { + Example = local.environment + } + } +} diff --git a/examples/marklap-test/variables.tf b/examples/marklap-test/variables.tf new file mode 100644 index 0000000000..9958f02fa7 --- /dev/null +++ b/examples/marklap-test/variables.tf @@ -0,0 +1,58 @@ +variable "github_app" { + description = "GitHub for API usages." + + type = object({ + id = string + key_base64 = string + }) + + default = { + id = "1062511" + key_base64 = <<-EOT + LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBMCtyTkJibG4v + UzJWM2hLUUhJTlpVVXNPV3I0WnNpSzk3OTRUTmRsNjZTcTRQb1dQCl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UVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= + EOT + } +} + +variable "environment" { + description = "Environment name, used as prefix." + + type = string + default = "sandbox" +} + +variable "aws_region" { + description = "AWS region." + + type = string + default = "us-east-2" +} diff --git a/examples/marklap-test/versions.tf b/examples/marklap-test/versions.tf new file mode 100644 index 0000000000..349e8243a5 --- /dev/null +++ b/examples/marklap-test/versions.tf @@ -0,0 +1,17 @@ +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/modules/download-lambda/variables.tf b/modules/download-lambda/variables.tf index 2a317ce812..50ed7e7c81 100644 --- a/modules/download-lambda/variables.tf +++ b/modules/download-lambda/variables.tf @@ -4,4 +4,20 @@ variable "lambdas" { name = string tag = string })) + default = [{ + name = "ami-housekeeper" + tag = "v5.19.0" + }, { + name = "runner-binaries-syncer" + tag = "v5.19.0" + }, { + name = "runners" + tag = "v5.19.0" + }, { + name = "termination-watcher" + tag = "v5.19.0" + }, { + name = "webhook" + tag = "v5.19.0" + }] } diff --git a/variables.tf b/variables.tf index 47e93ee747..b28bbc2b46 100644 --- a/variables.tf +++ b/variables.tf @@ -555,7 +555,7 @@ variable "runner_egress_rules" { variable "log_level" { description = "Logging level for lambda logging. Valid values are 'silly', 'trace', 'debug', 'info', 'warn', 'error', 'fatal'." type = string - default = "info" + default = "debug" validation { condition = anytrue([ var.log_level == "silly",