Release 3.0.0
As of this release the runner will be registered automatically by providing the registration token. The previous way of registering the runner via the the runners_token
is still supported. Thanks to @PatrickWolleb and @JeroenKnoops
Migration directions
The variable runners_token
will become obsolete and replace it by a runner configuration which will be used to register the runner.
Define in the module the runner configuration as follow:
gitlab_runner_registration_config = {
registration_token = "<registration token>"
tag_list = "<your tags, comma separated"
description = "<some description>"
locked_to_project = "true"
run_untagged = "false"
maximum_timeout = "3600"
}
And DO NOT specify the runners_token
. The runner will then be created if there is not one registered before. Registered runners will be stored in the AWS parameter store.
For migration to the new setup simply add the runner token to the parameter store. Once the runner is started it will lookup required values in the parameter store. If the value is null a new runner will be created.
# set the following variables, look up the variables in your Terraform config.
# see your Terraform variables to fill in the vars below.
aws-region=<${var.aws_region}>
token=<runner-token-see-your-gitlab-runner>
parameter-name=<${var.environment}>-<${var.secure_parameter_store_runner_token_key}>
aws ssm put-parameter --overwrite --type SecureString --name "${parameter-name}" --value ${token} --region "${aws-region}"
Once you have created the parameter, you have to remove the variable runners_token
from your config. Then next time your gitlab runner instance is created it look up the token from the parameter store.
See also the README and examples for more details.