I am using Google Cloud Provider version 3.37.0
Terraform version 0.13.4
I am trying to deploy a google compute instance resource with some “alias_ip_range” configuration.
Here is my code sample:
resource "google_compute_instance" "default" {
name = "test"
machine_type = "n1-standard-1"
zone = "europe-west2-b"
tags = concat(var.tags,["loo"])
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
network_interface {
network = "default"
subnetwork = "default"
# access_config {
# // Ephemeral IP
# }
alias_ip_range = [
{
ip_cidr_range = "/32"
},
{
ip_cidr_range = "/32"
}
]
}
metadata = {
foo = "bar"
}
service_account {
scopes = [ "compute-ro", "storage-ro"]
}
}
I am getting this error during the deployment:
An argument named “alias_ip_range” is not expected here. Did you mean to
define a block of type “alias_ip_range”?
Any help why is this format declaration wrong?