Skip to content

Add internal_ipv6_range to local.network variable in net-vpc module #2637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kaysalawu opened this issue Oct 23, 2024 · 0 comments · Fixed by #2638
Closed

Add internal_ipv6_range to local.network variable in net-vpc module #2637

kaysalawu opened this issue Oct 23, 2024 · 0 comments · Fixed by #2638
Assignees

Comments

@kaysalawu
Copy link

kaysalawu commented Oct 23, 2024

The output variable below does not work because the key internal_ipv6_range does not exist in local.network in main.tf

output "internal_ipv6_range" {
  description = "ULA range."
  value       = try(local.network.internal_ipv6_range, null)
}

The correct code should be:

locals {
  network = (
    var.vpc_create
    ? {
      id                  = try(google_compute_network.network[0].id, null)
      name                = try(google_compute_network.network[0].name, null)
      self_link           = try(google_compute_network.network[0].self_link, null)
      **internal_ipv6_range = try(google_compute_network.network[0].internal_ipv6_range, null)**
    }
...
}
@kaysalawu kaysalawu changed the title Add internal_ipv6_range to local.network variable to fix output variable internal_ipv6_range Add internal_ipv6_range to local.network variable in net-vpc module Oct 23, 2024
@ludoo ludoo self-assigned this Oct 24, 2024
ludoo added a commit that referenced this issue Oct 24, 2024
ludoo added a commit that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants