diff --git a/gcp/net-vpc.tf b/gcp/net-vpc.tf index 8f76c00..68b4c52 100644 --- a/gcp/net-vpc.tf +++ b/gcp/net-vpc.tf @@ -7,7 +7,7 @@ module "vpc-github-runners" { description = "VPC for GitHub Actions Runners (Terraform-managed)" subnets = [ { - ip_cidr_range = "100.64.0.0/16" # https://en.wikipedia.org/wiki/Carrier-grade_NAT + ip_cidr_range = coalesce(var.github_runners_internal_cidr, "100.64.0.0/16") # https://en.wikipedia.org/wiki/Carrier-grade_NAT name = "subnet-github-runners-${local.region_shortnames[var.region]}" region = var.region description = "Subnet for GitHub Actions Runners in ${var.region} (Terraform-managed)" diff --git a/gcp/variables.tf b/gcp/variables.tf index cb60a62..bfcb01a 100644 --- a/gcp/variables.tf +++ b/gcp/variables.tf @@ -60,6 +60,13 @@ variable "zone" { } } +variable "github_runners_internal_cidr" { + description = "The Internal IP Range used for the GitHub Actions Runners" + type = string + default = null + nullable = true +} + # Minimum number of Cloud Run instances for the GitHub Actions Runners manager application # Unfortunately, the Cloud Run cold start time is slow and often exceeds 30 seconds. # GitHub expects a response to webhook requests in under 10 seconds!