k8ssandra / k8ssandra-terraform

Apache License 2.0
17 stars 16 forks source link

[GCP] TF_* vars don't seem to be taken into account #30

Closed adejanovski closed 3 years ago

adejanovski commented 3 years ago

Despite setting the required env variables using the GCP_module branch, they do not seem to be taken into account:

% env
...
...
TF_VAR_environment=dev
TF_VAR_name=k8ssandra
TF_VAR_region=us-east1
TF_VAR_project_id=community-ecosystem

The generated variables.tf file contains the following values:

variable "name" {
  description = "Name of the cluster resources"
  default     = "k8ssandra"
}

variable "environment" {
  description = "The environment of the infrastructure being built."
}

variable "region" {
  description = "The region in which to create the VPC network"
  type        = string
  default     = "us-central1"
}

variable "project_id" {
  description = "The GCP project in which the components are created."
  type        = string
  default     = "k8ssandra-testing"
}

variable "zone" {
  description = "The zone in which to create the Kubernetes cluster. Must match the region"
  type        = string
  default     = "us-central-1a"
}

Are those supposed to be set automatically based on the env variables?

┆Issue is synchronized with this Jiraserver Task by Unito ┆Issue Number: K8SSAND-498 ┆Priority: Medium

chaitu6022 commented 3 years ago

@adejanovski removed the defaults from the variables and updated the code.