Skip to content

Commit

Permalink
feat: Parametrize runner instance launch configuration metadata optio…
Browse files Browse the repository at this point in the history
…ns (#348)

* Parametrize runner instance launch configuration metadata options

* Parametrize runner instance launch configuration metadata options

* Update variables.tf

Co-authored-by: Niek Palm <[email protected]>

* Update variables.tf

Co-authored-by: Niek Palm <[email protected]>

Co-authored-by: Momir Nikolic <[email protected]>
Co-authored-by: Niek Palm <[email protected]>
  • Loading branch information
3 people committed Jul 22, 2021
1 parent e729ba0 commit 92204ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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

0 comments on commit 92204ee

Please sign in to comment.