Below is the apigee_instances code and running it gives below error:
from variables.tf:
variable "apigee_instances" {
description = "Apigee Instances (only one instance for EVAL)."
type = map(object({
region = string
ip_range = string
environments = list(string)
}))
default = {
region = "us-central1"
ip_range = "10.x.x.x/24"
environments = [ "terraform-env1" ]
}
}
error:
Error: Invalid default value for variable
│
│ on variables.tf line 86, in variable "apigee_instances":
│ 86: default = {
│ 87: region = "us-central1"
│ 88: ip_range = "10.x.x.x/24"
│ 89: environments = [ "terraform-env1" ]
│ 90: }
│
│ This default value is not compatible with the variable's type constraint: element "region": object required.
╵
Below is the apigee_instances code and running it gives below error:
from variables.tf:
variable "apigee_instances" { description = "Apigee Instances (only one instance for EVAL)." type = map(object({ region = string ip_range = string environments = list(string) })) default = { region = "us-central1" ip_range = "10.x.x.x/24" environments = [ "terraform-env1" ] } }
error:
Error: Invalid default value for variable │ │ on variables.tf line 86, in variable "apigee_instances": │ 86: default = { │ 87: region = "us-central1" │ 88: ip_range = "10.x.x.x/24" │ 89: environments = [ "terraform-env1" ] │ 90: } │ │ This default value is not compatible with the variable's type constraint: element "region": object required. ╵