This module shows how to create GitHub action runners. Lambda release will be downloaded from GitHub.
The only difference compared to default
is that you need to create SSM parameters manually so their values are not stored in the state (see create_ssm_parameters_github_app
variable).
Before all, manually create the SSM parameters for the GitHub App ID, base64-encoded private key and webhook secret. Then refer their name and arn through the github_app_ssm_parameters
variable.
Steps for the full setup, such as creating a GitHub app can be found in the root module's README. 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 <root>/.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
cd ../lambdas-download
terraform init
terraform apply -var=module_version=<VERSION>
cd -
Before running Terraform, ensure the GitHub app is configured. See the configuration details for more details.
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:
terraform output -raw webhook_secret
Name | Version |
---|---|
terraform | >= 1.3.0 |
aws | ~> 5.27 |
local | ~> 2.0 |
random | ~> 3.0 |
No providers.
Name | Source | Version |
---|---|---|
base | ../base | n/a |
runners | ../../ | n/a |
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_region | AWS region. | string |
"eu-west-1" |
no |
environment | Environment name, used as prefix. | string |
null |
no |
github_app_ssm_parameters | SSM parameters details for the GitHub App, that you've created manually on AWS. | object({ |
{} |
no |
Name | Description |
---|---|
runners | n/a |
webhook_endpoint | n/a |
webhook_secret | n/a |