Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Parametrize runner instance launch configuration metadata options #348

Merged
merged 4 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ resource "aws_launch_configuration" "gitlab_runner_instance" {
iops = lookup(root_block_device.value, "iops", null)
}
}
metadata_options {
http_endpoint = var.runner_instance_metadata_options_http_endpoint
http_tokens = var.runner_instance_metadata_options_http_tokens
}

associate_public_ip_address = false == var.runners_use_private_address

Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ variable "runner_instance_spot_price" {
default = null
}

variable "runner_instance_metadata_options_http_endpoint" {
description = "Enable the Gitlab runner agent instance metadata service. The allowed values are enabled, disabled."
type = string
default = "enabled"
}

variable "runner_instance_metadata_options_http_tokens" {
description = "Set if Gitlab runner agent instance metadata service session tokens are required. The allowed values are optional, required."
type = string
default = "optional"
}

variable "ssh_key_pair" {
description = "Set this to use existing AWS key pair"
type = string
Expand Down