diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index cd52c1e8d..4c4a46efe 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "7.5.0" + ".": "7.6.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b771866e..d84901c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [7.6.0](https://github.com/cattle-ops/terraform-aws-gitlab-runner/compare/7.5.0...7.6.0) (2024-05-01) + + +### Features + +* add option to use a pre-registered Runner ([#1115](https://github.com/cattle-ops/terraform-aws-gitlab-runner/issues/1115)) ([9153a3a](https://github.com/cattle-ops/terraform-aws-gitlab-runner/commit/9153a3ac74b6b83e5ef408ff81696eb1d8b88a4d)) + ## [7.5.0](https://github.com/cattle-ops/terraform-aws-gitlab-runner/compare/7.4.0...7.5.0) (2024-04-11) diff --git a/README.md b/README.md index 849573a11..ba458ff73 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.44.0 | +| [aws](#provider\_aws) | 5.47.0 | | [local](#provider\_local) | 2.5.1 | | [tls](#provider\_tls) | 4.0.5 | @@ -170,9 +170,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file | [runner\_ami\_owners](#input\_runner\_ami\_owners) | The list of owners used to select the AMI of the Runner instance. | `list(string)` |
[| no | | [runner\_cloudwatch](#input\_runner\_cloudwatch) | enable = Boolean used to enable or disable the CloudWatch logging.
"amazon"
]
object({| `{}` | no | | [runner\_enable\_asg\_recreation](#input\_runner\_enable\_asg\_recreation) | Enable automatic redeployment of the Runner's ASG when the Launch Configs change. | `bool` | `true` | no | -| [runner\_gitlab](#input\_runner\_gitlab) | ca\_certificate = Trusted CA certificate bundle (PEM format).
enable = optional(bool, true)
log_group_name = optional(string, null)
retention_days = optional(number, 0)
})
object({| n/a | yes | -| [runner\_gitlab\_registration\_config](#input\_runner\_gitlab\_registration\_config) | Configuration used to register the Runner. See the README for an example, or reference the examples in the examples directory of this repo. There is also a good GitLab documentation available at: https://docs.gitlab.com/ee/ci/runners/configure_runners.html |
ca_certificate = optional(string, "")
certificate = optional(string, "")
registration_token = optional(string, "__REPLACED_BY_USER_DATA__")
runner_version = optional(string, "15.8.2")
url = optional(string, "")
url_clone = optional(string, "")
access_token_secure_parameter_store_name = optional(string, "gitlab-runner-access-token")
})
object({| `{}` | no | -| [runner\_gitlab\_registration\_token\_secure\_parameter\_store\_name](#input\_runner\_gitlab\_registration\_token\_secure\_parameter\_store\_name) | The name of the SSM parameter to read the GitLab Runner registration token from. | `string` | `"gitlab-runner-registration-token"` | no | +| [runner\_gitlab](#input\_runner\_gitlab) | ca\_certificate = Trusted CA certificate bundle (PEM format).
registration_token = optional(string, "__GITLAB_REGISTRATION_TOKEN_FROM_SSM__")
tag_list = optional(string, "")
description = optional(string, "")
type = optional(string, "") # mandatory if gitlab_runner_version >= 16.0.0
group_id = optional(string, "") # mandatory if type is group
project_id = optional(string, "") # mandatory if type is project
locked_to_project = optional(string, "")
run_untagged = optional(string, "")
maximum_timeout = optional(string, "")
access_level = optional(string, "not_protected") # this is the only mandatory field calling the GitLab get token for executor operation
})
object({| n/a | yes | +| [runner\_gitlab\_registration\_config](#input\_runner\_gitlab\_registration\_config) | (deprecated, replaced by runner\_gitlab.preregistered\_runner\_token\_ssm\_parameter\_name) Configuration used to register the Runner. See the README for an example, or reference the examples in the examples directory of this repo. There is also a good GitLab documentation available at: https://docs.gitlab.com/ee/ci/runners/configure_runners.html |
ca_certificate = optional(string, "")
certificate = optional(string, "")
registration_token = optional(string, "__REPLACED_BY_USER_DATA__") # deprecated, removed in 8.0.0
runner_version = optional(string, "15.8.2")
url = optional(string, "")
url_clone = optional(string, "")
access_token_secure_parameter_store_name = optional(string, "gitlab-runner-access-token") # deprecated, removed in 8.0.0
preregistered_runner_token_ssm_parameter_name = optional(string, "")
})
object({| `{}` | no | +| [runner\_gitlab\_registration\_token\_secure\_parameter\_store\_name](#input\_runner\_gitlab\_registration\_token\_secure\_parameter\_store\_name) | (deprecated, replaced by runner\_gitlab.preregistered\_runner\_token\_ssm\_parameter\_name) The name of the SSM parameter to read the GitLab Runner registration token from. | `string` | `"gitlab-runner-registration-token"` | no | | [runner\_gitlab\_token\_secure\_parameter\_store](#input\_runner\_gitlab\_token\_secure\_parameter\_store) | Name of the Secure Parameter Store entry to hold the GitLab Runner token. | `string` | `"runner-token"` | no | | [runner\_install](#input\_runner\_install) | amazon\_ecr\_credentials\_helper = Install amazon-ecr-credential-helper inside `userdata_pre_install` script
registration_token = optional(string, "__GITLAB_REGISTRATION_TOKEN_FROM_SSM__") # deprecated, removed in 8.0.0
tag_list = optional(string, "") # deprecated, removed in 8.0.0
description = optional(string, "") # deprecated, removed in 8.0.0
type = optional(string, "") # mandatory if gitlab_runner_version >= 16.0.0 # deprecated, removed in 8.0.0
group_id = optional(string, "") # mandatory if type is group # deprecated, removed in 8.0.0
project_id = optional(string, "") # mandatory if type is project # deprecated, removed in 8.0.0
locked_to_project = optional(string, "") # deprecated, removed in 8.0.0
run_untagged = optional(string, "") # deprecated, removed in 8.0.0
maximum_timeout = optional(string, "") # deprecated, removed in 8.0.0
access_level = optional(string, "not_protected") # this is the only mandatory field calling the GitLab get token for executor operation # deprecated, removed in 8.0.0
})
object({| `{}` | no | | [runner\_instance](#input\_runner\_instance) | additional\_tags = Map of tags that will be added to the Runner instance.
amazon_ecr_credential_helper = optional(bool, false)
docker_machine_download_url = optional(string, "")
docker_machine_version = optional(string, "0.16.2-gitlab.19-cki.2")
pre_install_script = optional(string, "")
post_install_script = optional(string, "")
start_script = optional(string, "")
yum_update = optional(bool, true)
})
object({|
additional_tags = optional(map(string))
collect_autoscaling_metrics = optional(list(string), null)
ebs_optimized = optional(bool, true)
max_lifetime_seconds = optional(number, null)
monitoring = optional(bool, true)
name = string
name_prefix = optional(string)
private_address_only = optional(bool, true)
root_device_config = optional(map(string), {})
spot_price = optional(string, null)
ssm_access = optional(bool, false)
type = optional(string, "t3.micro")
use_eip = optional(bool, false)
})
{| no | diff --git a/examples/runner-certificates/README.md b/examples/runner-certificates/README.md index 2b9302a07..6dabd3ef8 100644 --- a/examples/runner-certificates/README.md +++ b/examples/runner-certificates/README.md @@ -139,31 +139,31 @@ For **user images**, you must: | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3 | -| [aws](#requirement\_aws) | 5.44.0 | +| [aws](#requirement\_aws) | 5.47.0 | | [local](#requirement\_local) | 2.5.1 | | [null](#requirement\_null) | 3.2.2 | -| [random](#requirement\_random) | 3.6.0 | +| [random](#requirement\_random) | 3.6.1 | | [tls](#requirement\_tls) | 4.0.5 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.44.0 | +| [aws](#provider\_aws) | 5.47.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [runner](#module\_runner) | ../../ | n/a | -| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.7.1 | -| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.7.1 | +| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.8.1 | +| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.8.1 | ## Resources | Name | Type | |------|------| -| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.44.0/docs/data-sources/availability_zones) | data source | +| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.47.0/docs/data-sources/availability_zones) | data source | ## Inputs @@ -172,7 +172,7 @@ For **user images**, you must: | [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no | | [environment](#input\_environment) | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-docker"` | no | | [gitlab\_url](#input\_gitlab\_url) | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no | -| [registration\_token](#input\_registration\_token) | Gitlab runner registration token | `string` | `"something"` | no | +| [preregistered\_runner\_token\_ssm\_parameter\_name](#input\_preregistered\_runner\_token\_ssm\_parameter\_name) | The name of the SSM parameter to read the preregistered GitLab Runner token from. | `string` | n/a | yes | | [runner\_name](#input\_runner\_name) | Name of the runner, will be used in the runner config.toml | `string` | `"docker"` | no | ## Outputs diff --git a/examples/runner-default/README.md b/examples/runner-default/README.md index 5dee2a1ac..804a2bf04 100644 --- a/examples/runner-default/README.md +++ b/examples/runner-default/README.md @@ -33,32 +33,32 @@ check `.terraform-version` for the tested version. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3 | -| [aws](#requirement\_aws) | 5.44.0 | +| [aws](#requirement\_aws) | 5.47.0 | | [local](#requirement\_local) | 2.5.1 | | [null](#requirement\_null) | 3.2.2 | -| [random](#requirement\_random) | 3.6.0 | +| [random](#requirement\_random) | 3.6.1 | | [tls](#requirement\_tls) | 4.0.5 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.44.0 | +| [aws](#provider\_aws) | 5.47.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [runner](#module\_runner) | ../../ | n/a | -| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.7.1 | -| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.7.1 | +| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.8.1 | +| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.8.1 | ## Resources | Name | Type | |------|------| -| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.44.0/docs/data-sources/availability_zones) | data source | -| [aws_security_group.default](https://registry.terraform.io/providers/hashicorp/aws/5.44.0/docs/data-sources/security_group) | data source | +| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.47.0/docs/data-sources/availability_zones) | data source | +| [aws_security_group.default](https://registry.terraform.io/providers/hashicorp/aws/5.47.0/docs/data-sources/security_group) | data source | ## Inputs @@ -67,7 +67,7 @@ check `.terraform-version` for the tested version. | [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no | | [environment](#input\_environment) | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-default"` | no | | [gitlab\_url](#input\_gitlab\_url) | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no | -| [registration\_token](#input\_registration\_token) | Registration token for the runner. | `string` | n/a | yes | +| [preregistered\_runner\_token\_ssm\_parameter\_name](#input\_preregistered\_runner\_token\_ssm\_parameter\_name) | The name of the SSM parameter to read the preregistered GitLab Runner token from. | `string` | n/a | yes | | [runner\_name](#input\_runner\_name) | Name of the runner, will be used in the runner config.toml | `string` | `"default-auto"` | no | | [timezone](#input\_timezone) | Name of the timezone that the runner will be used in. | `string` | `"Europe/Amsterdam"` | no | diff --git a/examples/runner-docker/README.md b/examples/runner-docker/README.md index 07e2dc7d3..a043b548c 100644 --- a/examples/runner-docker/README.md +++ b/examples/runner-docker/README.md @@ -36,31 +36,31 @@ check `.terraform-version` for the tested version. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3 | -| [aws](#requirement\_aws) | 5.44.0 | +| [aws](#requirement\_aws) | 5.47.0 | | [local](#requirement\_local) | 2.5.1 | | [null](#requirement\_null) | 3.2.2 | -| [random](#requirement\_random) | 3.6.0 | +| [random](#requirement\_random) | 3.6.1 | | [tls](#requirement\_tls) | 4.0.5 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.44.0 | +| [aws](#provider\_aws) | 5.47.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [runner](#module\_runner) | ../../ | n/a | -| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.7.1 | -| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.7.1 | +| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.8.1 | +| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.8.1 | ## Resources | Name | Type | |------|------| -| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.44.0/docs/data-sources/availability_zones) | data source | +| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.47.0/docs/data-sources/availability_zones) | data source | ## Inputs @@ -69,7 +69,7 @@ check `.terraform-version` for the tested version. | [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no | | [environment](#input\_environment) | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-docker"` | no | | [gitlab\_url](#input\_gitlab\_url) | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no | -| [registration\_token](#input\_registration\_token) | Registration token for the runner. | `string` | n/a | yes | +| [preregistered\_runner\_token\_ssm\_parameter\_name](#input\_preregistered\_runner\_token\_ssm\_parameter\_name) | The name of the SSM parameter to read the preregistered GitLab Runner token from. | `string` | n/a | yes | | [runner\_name](#input\_runner\_name) | Name of the runner, will be used in the runner config.toml | `string` | `"docker"` | no | ## Outputs diff --git a/examples/runner-pre-registered/README.md b/examples/runner-pre-registered/README.md index fe0807344..3d7132ffb 100644 --- a/examples/runner-pre-registered/README.md +++ b/examples/runner-pre-registered/README.md @@ -19,31 +19,31 @@ check `.terraform-version` for the tested version. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3 | -| [aws](#requirement\_aws) | 5.44.0 | +| [aws](#requirement\_aws) | 5.47.0 | | [local](#requirement\_local) | 2.5.1 | | [null](#requirement\_null) | 3.2.2 | -| [random](#requirement\_random) | 3.6.0 | +| [random](#requirement\_random) | 3.6.1 | | [tls](#requirement\_tls) | 4.0.5 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.44.0 | +| [aws](#provider\_aws) | 5.47.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [runner](#module\_runner) | ../../ | n/a | -| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.7.1 | -| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.7.1 | +| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.8.1 | +| [vpc\_endpoints](#module\_vpc\_endpoints) | terraform-aws-modules/vpc/aws//modules/vpc-endpoints | 5.8.1 | ## Resources | Name | Type | |------|------| -| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.44.0/docs/data-sources/availability_zones) | data source | +| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.47.0/docs/data-sources/availability_zones) | data source | ## Inputs @@ -52,8 +52,8 @@ check `.terraform-version` for the tested version. | [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no | | [environment](#input\_environment) | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"ci-runners"` | no | | [gitlab\_url](#input\_gitlab\_url) | URL of the gitlab instance to connect to. | `string` | n/a | yes | +| [preregistered\_runner\_token\_ssm\_parameter\_name](#input\_preregistered\_runner\_token\_ssm\_parameter\_name) | The name of the SSM parameter to read the preregistered GitLab Runner token from. | `string` | n/a | yes | | [runner\_name](#input\_runner\_name) | Name of the runner, will be used in the runner config.toml | `string` | n/a | yes | -| [runner\_token](#input\_runner\_token) | Token for the runner, will be used in the runner config.toml | `string` | n/a | yes | | [timezone](#input\_timezone) | Timezone that will be set for the runner. | `string` | `"Europe/Amsterdam"` | no | ## Outputs diff --git a/examples/runner-public/README.md b/examples/runner-public/README.md index e904946bb..f32131696 100644 --- a/examples/runner-public/README.md +++ b/examples/runner-public/README.md @@ -30,17 +30,17 @@ check `.terraform-version` for the tested version. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.3 | -| [aws](#requirement\_aws) | 5.44.0 | +| [aws](#requirement\_aws) | 5.47.0 | | [local](#requirement\_local) | 2.5.1 | | [null](#requirement\_null) | 3.2.2 | -| [random](#requirement\_random) | 3.6.0 | +| [random](#requirement\_random) | 3.6.1 | | [tls](#requirement\_tls) | 4.0.5 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.44.0 | +| [aws](#provider\_aws) | 5.47.0 | ## Modules @@ -49,13 +49,13 @@ check `.terraform-version` for the tested version. | [cache](#module\_cache) | ../../modules/cache | n/a | | [runner](#module\_runner) | ../../ | n/a | | [runner2](#module\_runner2) | ../../ | n/a | -| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.7.1 | +| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.8.1 | ## Resources | Name | Type | |------|------| -| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.44.0/docs/data-sources/availability_zones) | data source | +| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.47.0/docs/data-sources/availability_zones) | data source | ## Inputs @@ -64,7 +64,7 @@ check `.terraform-version` for the tested version. | [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no | | [environment](#input\_environment) | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runner-public"` | no | | [gitlab\_url](#input\_gitlab\_url) | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no | -| [registration\_token](#input\_registration\_token) | Registration token for the runner. | `string` | n/a | yes | +| [preregistered\_runner\_token\_ssm\_parameter\_name](#input\_preregistered\_runner\_token\_ssm\_parameter\_name) | The name of the SSM parameter to read the preregistered GitLab Runner token from. | `string` | n/a | yes | | [runner\_name](#input\_runner\_name) | Name of the runner, will be used in the runner config.toml | `string` | `"public-auto"` | no | ## Outputs diff --git a/tests/modules/setup/README.md b/tests/modules/setup/README.md index e7bc5c6e7..fcf21bbb7 100644 --- a/tests/modules/setup/README.md +++ b/tests/modules/setup/README.md @@ -13,7 +13,7 @@ No requirements. | Name | Source | Version | |------|--------|---------| -| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.7.1 | +| [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.8.1 | ## Resources
"name": "gitlab-runner"
}