Hello folks,
I am facing an issue while I run terraform plan
on the below code:
I have the following code in gke-nodes.tf
resource "google_container_node_pool" "gke_cluster_pool_green_v122" {
count = var.node_green_max_count > 0 ? 1 : 0
name = substr(join("", [var.name, "-pool-green-v122"]), 0, 40)
cluster = google_container_cluster.gke_cluster.name
location = var.location
max_pods_per_node = var.node_green_max_pods_per_node
initial_node_count = 1 - var.legacy_nodepool_bootstrap
management {
auto_repair = true
auto_upgrade = false
}
upgrade_settings {
max_unavailable = 0
max_surge = 1
}
autoscaling {
min_node_count = var.node_green_min_count
max_node_count = var.node_green_max_count
}
lifecycle {
ignore_changes = [
initial_node_count
]
}
node_config {
preemptible = false
machine_type = var.node_green_machine_type
disk_type = "pd-ssd"
tags = [
var.gke_node_tag,
var.gke_node_general_tag,
]
labels = {
"node.pubnative.io/role" = "general",
"node.pubnative.io/tier" = "1",
"node.pubnative.io/color" = "green",
}
}
version = var.nodepool_version
}
I am running terraform init
, terraform plan
and terraform apply
from a folder gcp/vgi-pn/us-east4/staging-cluster/tf/
which has a file call cluster.tf
The error I get is
[1me[31mError: e[0me[0me[1mUnsupported Terraform Core versione[0m
e[0mThis configuration does not support Terraform version `0.12.29`. To proceed,
either choose another supported Terraform version or update the root module's
version constraint. Version constraints are normally set for good reason, so
updating the constraint may lead to other errors or unexpected behavior.
e[0me[0m
My backend.tf
has the following code
terraform {
# Please don't change this, use https://github.com/asdf-vm/asdf
required_version = "0.12.31"
required_providers {
google = {
version = "~> 4"
}
google-beta = {
version = "~> 4"
}
kubernetes = {
version = "~> 2.7.1"
}
helm = {
version = "~> 2.4.1"
}
}
Could someone help me in pointing out what the issue here is? Any help here would be much appreciated
Thanks,
Sahaj