From 00e785167aae137039f34529c656a8d371238823 Mon Sep 17 00:00:00 2001 From: Igor Mishchuk Date: Fri, 20 Oct 2023 11:28:38 +0300 Subject: [PATCH] add ipv6 support --- modules/multi-runner/README.md | 1 + modules/multi-runner/runners.tf | 1 + modules/multi-runner/variables.tf | 6 ++++++ modules/runners/README.md | 1 + modules/runners/main.tf | 1 + modules/runners/variables.tf | 6 ++++++ 6 files changed, 16 insertions(+) diff --git a/modules/multi-runner/README.md b/modules/multi-runner/README.md index 7e0832222f..904becc194 100644 --- a/modules/multi-runner/README.md +++ b/modules/multi-runner/README.md @@ -127,6 +127,7 @@ module "multi-runner" { | [ghes\_url](#input\_ghes\_url) | GitHub Enterprise Server URL. Example: https://github.internal.co - DO NOT SET IF USING PUBLIC GITHUB | `string` | `null` | no | | [github\_app](#input\_github\_app) | GitHub app parameters, see your github app. Ensure the key is the base64-encoded `.pem` file (the output of `base64 app.private-key.pem`, not the content of `private-key.pem`). |
object({
key_base64 = string
id = string
webhook_secret = string
})
| n/a | yes | | [instance\_profile\_path](#input\_instance\_profile\_path) | The path that will be added to the instance\_profile, if not set the environment name will be used. | `string` | `null` | no | +| [ipv6\_address\_count](#input\_ipv6\_address\_count) | The number of IPv6 addresses to assign to a network interface | `number` | `0` | no | | [key\_name](#input\_key\_name) | Key pair name | `string` | `null` | no | | [kms\_key\_arn](#input\_kms\_key\_arn) | Optional CMK Key ARN to be used for Parameter Store. | `string` | `null` | no | | [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no | diff --git a/modules/multi-runner/runners.tf b/modules/multi-runner/runners.tf index fb342364cd..8a78fd06b0 100644 --- a/modules/multi-runner/runners.tf +++ b/modules/multi-runner/runners.tf @@ -104,4 +104,5 @@ module "runners" { pool_runner_owner = each.value.runner_config.pool_runner_owner pool_lambda_reserved_concurrent_executions = var.pool_lambda_reserved_concurrent_executions associate_public_ip_address = var.associate_public_ip_address + ipv6_address_count = var.ipv6_address_count } diff --git a/modules/multi-runner/variables.tf b/modules/multi-runner/variables.tf index fbc2d9d4ff..66f988f55c 100644 --- a/modules/multi-runner/variables.tf +++ b/modules/multi-runner/variables.tf @@ -562,3 +562,9 @@ variable "associate_public_ip_address" { type = bool default = false } + +variable "ipv6_address_count" { + description = "The number of IPv6 addresses to assign to a network interface" + type = number + default = 0 +} diff --git a/modules/runners/README.md b/modules/runners/README.md index 6f1dcc562a..a0ba7e3a4d 100644 --- a/modules/runners/README.md +++ b/modules/runners/README.md @@ -158,6 +158,7 @@ yarn run dist | [instance\_target\_capacity\_type](#input\_instance\_target\_capacity\_type) | Default lifecyle used runner instances, can be either `spot` or `on-demand`. | `string` | `"spot"` | no | | [instance\_type](#input\_instance\_type) | [DEPRECATED] See instance\_types. | `string` | `"m5.large"` | no | | [instance\_types](#input\_instance\_types) | List of instance types for the action runner. Defaults are based on runner\_os (amzn2 for linux and Windows Server Core for win). | `list(string)` | `null` | no | +| [ipv6\_address\_count](#input\_ipv6\_address\_count) | The number of IPv6 addresses to assign to a network interface | `number` | `0` | no | | [key\_name](#input\_key\_name) | Key pair name | `string` | `null` | no | | [kms\_key\_arn](#input\_kms\_key\_arn) | Optional CMK Key ARN to be used for Parameter Store. | `string` | `null` | no | | [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no | diff --git a/modules/runners/main.tf b/modules/runners/main.tf index c44770473c..cc338aaf3a 100644 --- a/modules/runners/main.tf +++ b/modules/runners/main.tf @@ -182,6 +182,7 @@ resource "aws_launch_template" "runner" { iterator = associate_public_ip_address content { associate_public_ip_address = associate_public_ip_address.value + ipv6_address_count = var.ipv6_address_count security_groups = compact(concat( var.enable_managed_runner_security_group ? [aws_security_group.runner_sg[0].id] : [], var.runner_additional_security_group_ids, diff --git a/modules/runners/variables.tf b/modules/runners/variables.tf index b5b6f49eac..bf2d98bb90 100644 --- a/modules/runners/variables.tf +++ b/modules/runners/variables.tf @@ -628,3 +628,9 @@ variable "associate_public_ip_address" { type = bool default = false } + +variable "ipv6_address_count" { + description = "The number of IPv6 addresses to assign to a network interface" + type = number + default = 0 +}