From efcbbd53dc08574c9d7b67ded5a29a03024e4188 Mon Sep 17 00:00:00 2001 From: Tim Heckel Date: Sat, 29 Jan 2022 13:20:33 -0600 Subject: [PATCH 1/3] Allow for network_region to be specified This is to enable the creation of the hetzner network to be in `us-east` instead of `eu-central` when deploying to location `ash` --- terraform.tfvars.example | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/terraform.tfvars.example b/terraform.tfvars.example index a0d9e1a..6cf5b54 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -7,7 +7,8 @@ private_key = "/home/username/.ssh/id_ed25519" # These can be customized, or left with the default values # For Hetzner locations see https://docs.hetzner.com/general/others/data-centers-and-connection/ # For Hetzner server types see https://www.hetzner.com/cloud -location = "fsn1" +location = "fsn1" # change to `ash` for us-east Ashburn, Virginia location +network_region = "eu-central" # change to `us-east` if location is ash agent_server_type = "cpx21" control_plane_server_type = "cpx11" lb_server_type = "lb11" @@ -23,4 +24,4 @@ agents_num = 2 # If you choose to keep the default of "false", you can always use ArgoCD to monitor the CSI and CCM manifest for new releases, # that is probably the more "vanilla" option to keep these components always updated. # hetzner_ccm_containers_latest = true -# hetzner_csi_containers_latest = true \ No newline at end of file +# hetzner_csi_containers_latest = true From c72e212f2b84ccedb9ee953e42ea4917d82a09af Mon Sep 17 00:00:00 2001 From: Tim Heckel Date: Sat, 29 Jan 2022 13:21:30 -0600 Subject: [PATCH 2/3] Use a variable for `network_region` ..instead of hardcoding it to `eu-central` --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 4d12561..ed3591e 100644 --- a/main.tf +++ b/main.tf @@ -16,7 +16,7 @@ resource "hcloud_network" "k3s" { resource "hcloud_network_subnet" "k3s" { network_id = hcloud_network.k3s.id type = "cloud" - network_zone = "eu-central" + network_zone = var.network_region ip_range = "10.0.0.0/16" } From e77bc4d16116e078290f2a30929a1bfeddf11766 Mon Sep 17 00:00:00 2001 From: Tim Heckel Date: Sat, 29 Jan 2022 14:02:00 -0600 Subject: [PATCH 3/3] Update variables.tf Declare the `network_region` variable --- variables.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/variables.tf b/variables.tf index 81c7ea9..51dc3bd 100644 --- a/variables.tf +++ b/variables.tf @@ -19,6 +19,11 @@ variable "location" { type = string } +variable "network_region" { + description = "Default region for network" + type = string +} + variable "control_plane_server_type" { description = "Default control plane server type" type = string