I have a subnetwork module that I call from in my main.tf.
resource "google_compute_subnetwork" "vpc_sub_network" {
for_each = var.subnet_info
ip_cidr_range = each.value["subnet_ip_range"]
name = each.value["subnet_name"]
network = each.value["vpc_name"]
region = each.value["region"]
purpose = "INTERNAL_HTTPS_LOAD_BALANCER" --> unable to mention
role = "ACTIVE" --> unable to mention
}
I have checked in the documentations of terraform that we can mention Purpose and role when we create a subnetwork
in my main.tf
Provider "google"{
creds.....
}
module "vpc_sub_network" {
source = "./modular_approach/modules/general_network/"
}
Error
on modular_approach\modules\general_network\main.tf line 5, in resource "google_compute_subnetwork"
"vpc_sub_network":
5: role = "ACTIVE"
An argument named "role" is not expected here.