Skip to content

Commit 2cbe243

Browse files
ernishEryk Smiech
andauthored
add cidr block for eu-central-1 internal tools (#61)
Co-authored-by: Eryk Smiech <eryk.smiech@toolsforhumanity.com>
1 parent 9d65f04 commit 2cbe243

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

sg.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,6 @@ resource "aws_security_group_rule" "tfe_and_gha_cluster_ingress" {
176176
from_port = 443
177177
to_port = 443
178178
protocol = "tcp"
179-
cidr_blocks = [var.tfe_cidr, var.gha_cidr]
179+
cidr_blocks = [var.tfe_cidr, var.gha_cidr_us_east_1, var.gha_cidr_eu_central_1]
180180
description = "Allow TFE and GHA to communicate with the cluster API Server"
181181
}

variables.tf

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,24 @@ variable "tfe_cidr" {
577577
}
578578
}
579579

580-
variable "gha_cidr" {
581-
description = "GitHub Actions CIDR block"
580+
variable "gha_cidr_us_east_1" {
581+
description = "GitHub Actions CIDR block for us-east-1"
582582
type = string
583583
default = "10.0.96.0/20"
584584

585585
validation {
586-
condition = can(regex("^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.gha_cidr))
586+
condition = can(regex("^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.gha_cidr_us_east_1))
587+
error_message = "GitHub Actions CIDR must be a valid CIDR block."
588+
}
589+
}
590+
591+
variable "gha_cidr_eu_central_1" {
592+
description = "GitHub Actions CIDR block for eu-central-1"
593+
type = string
594+
default = "10.52.0.0/20"
595+
596+
validation {
597+
condition = can(regex("^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$", var.gha_cidr_eu_central_1))
587598
error_message = "GitHub Actions CIDR must be a valid CIDR block."
588599
}
589600
}

0 commit comments

Comments
 (0)