This is my variables.tf file
variable vpc-count { description = "Number of VPC to create" }
variable "vpc1" { description = "Enter the CIDR for vpc1" }
variable "vpc2" { description = "Enter the CIDR for vpc2" }
variable subnet-count { description ="Enter the number of subnets for vpc" }
variable "sub1vpc1" { description = "Enter the CIDR for subnet1 of vpc1" }
variable "sub2vpc1" { description = "Enter the CIDR for subnet2 of vpc1" }
variable "sub1vpc2" { description = "Enter the CIDR for subnet2 of vpc1" }
variable "sub2vpc2" { description = "Enter the CIDR for subnet2 of vpc2" }
The reason for not specifying the values is because of the need to be interactive and give an option to the user to enter the relevant values for vpc cidr , subnet cidr etc .
But while entering "terraform plan" . It prompts the Enter value: question but not in the order that is mentioned in the variables.tf file
For eg: First question asked is from
variable "sub1vpc1" { description = "Enter the CIDR for subnet1 of vpc1" }
even though it is 5th in line
Does Terraform does not do ordering of . Asking a question about subnet cidr even before VPC cidr is not proper way i think
Any remedies