Property "static_ips" isn't use in compute instance
stefiix92 opened this issue · 2 comments
stefiix92 commented
TL;DR
The variable static_ips
which exists on the module level, isn't used inside the module at all.
Expected behavior
Either remove the variable (it's confusing) or make it work
Observed behavior
No response
Terraform Configuration
module "relay_instance" {
source = "terraform-google-modules/vm/google//modules/compute_instance"
hostname = "asd"
add_hostname_suffix = false
instance_template = module.template.self_link
zone = random_shuffle.zone.result[0]
deletion_protection = false
static_ips = [google_compute_address.ip_address.address]
}
Terraform Version
v1.5.7
Additional information
No response
fernandoiury commented
@stefiix92 I'm having another issue related to static_ips (because in my case I need two interfaces from different subnetworks) but for your case static ips should work if you pass var.netwok and var.subnetwork
See the following line, it's checking if you have these two vars and then it uses var.static_ips if they exist:
github-actions commented
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days