Skip to content

Commit

Permalink
deploy cluster in zone not region
Browse files Browse the repository at this point in the history
  • Loading branch information
VERDOM committed Feb 15, 2024
1 parent 9ed7704 commit bcf2ef3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion terraform/cluster/cluster.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "google_container_cluster" "primary" {
name = var.cluster_name
location = var.gcp_region
location = var.gcp_zone

remove_default_node_pool = true
initial_node_count = 1
Expand Down
6 changes: 3 additions & 3 deletions terraform/cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ variable "gcp_zone" {
description = "The GCP zone to deploy the cluster."
}

variable "gcp_region" {
description = "The GCP region to deploy the cluster."
# variable "gcp_region" {
# description = "The GCP region to deploy the cluster."

}
# }

variable "pool_name" {
description = "The name of the node pool."
Expand Down
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module "cluster" {
source = "./cluster"
cluster_name = var.cluster_name
gcp_zone = var.gcp_zone
gcp_region = var.gcp_region
# gcp_region = var.gcp_region
sa_email = module.service_account.sa_email
pool_name = var.pool_name
}
2 changes: 1 addition & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variable "gcp_project" {
}
variable "gcp_zone" {
type = string
default = "europe-west1-a" # Change me if you need
default = "europe-west1-b" # Change me if you need
description = "The GCP zone to deploy the app."
}

Expand Down

0 comments on commit bcf2ef3

Please sign in to comment.