Skip to content

Commit

Permalink
Merge branch 'master' into net-vlan-attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
apichick authored Jun 12, 2023
2 parents c0d3f47 + 6e4efda commit 6f975d2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 34 deletions.
8 changes: 4 additions & 4 deletions modules/net-address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ module "addresses" {
| name | description | sensitive |
|---|---|:---:|
| [external_addresses](outputs.tf#L17) | Allocated external addresses. | |
| [global_addresses](outputs.tf#L28) | Allocated global external addresses. | |
| [internal_addresses](outputs.tf#L39) | Allocated internal addresses. | |
| [psa_addresses](outputs.tf#L50) | Allocated internal addresses for PSA endpoints. | |
| [psc_addresses](outputs.tf#L62) | Allocated internal addresses for PSC endpoints. | |
| [global_addresses](outputs.tf#L25) | Allocated global external addresses. | |
| [internal_addresses](outputs.tf#L33) | Allocated internal addresses. | |
| [psa_addresses](outputs.tf#L41) | Allocated internal addresses for PSA endpoints. | |
| [psc_addresses](outputs.tf#L49) | Allocated internal addresses for PSC endpoints. | |

<!-- END TFDOC -->
28 changes: 6 additions & 22 deletions modules/net-address/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,54 +18,38 @@ output "external_addresses" {
description = "Allocated external addresses."
value = {
for address in google_compute_address.external :
address.name => {
address = address.address
self_link = address.self_link
}
address.name => address
}
}

output "global_addresses" {
description = "Allocated global external addresses."
value = {
for address in google_compute_global_address.global :
address.name => {
address = address.address
self_link = address.self_link
}
address.name => address
}
}

output "internal_addresses" {
description = "Allocated internal addresses."
value = {
for address in google_compute_address.internal :
address.name => {
address = address.address
self_link = address.self_link
}
address.name => address
}
}

output "psa_addresses" {
description = "Allocated internal addresses for PSA endpoints."
value = {
for address in google_compute_global_address.psa :
address.name => {
address = address.address
prefix_length = address.prefix_length
self_link = address.self_link
}
address.name => address
}
}

output "psc_addresses" {
description = "Allocated internal addresses for PSC endpoints."
value = {
for address in google_compute_global_address.psc :
address.name => {
address = address.address
self_link = address.self_link
}
address.name => address
}
}
15 changes: 8 additions & 7 deletions modules/net-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,13 @@ module "vpc" {
| [network](outputs.tf#L46) | Network resource. | |
| [project_id](outputs.tf#L58) | Project ID containing the network. Use this when you need to create resources *after* the VPC is fully set up (e.g. subnets created, shared VPC service projects attached, Private Service Networking configured). | |
| [self_link](outputs.tf#L71) | Network self link. | |
| [subnet_ips](outputs.tf#L83) | Map of subnet address ranges keyed by name. | |
| [subnet_regions](outputs.tf#L90) | Map of subnet regions keyed by name. | |
| [subnet_secondary_ranges](outputs.tf#L97) | Map of subnet secondary ranges keyed by name. | |
| [subnet_self_links](outputs.tf#L108) | Map of subnet self links keyed by name. | |
| [subnets](outputs.tf#L113) | Subnet resources. | |
| [subnets_proxy_only](outputs.tf#L118) | L7 ILB or L7 Regional LB subnet resources. | |
| [subnets_psc](outputs.tf#L123) | Private Service Connect subnet resources. | |
| [subnet_ids](outputs.tf#L83) | Map of subnet IDs keyed by name. | |
| [subnet_ips](outputs.tf#L88) | Map of subnet address ranges keyed by name. | |
| [subnet_regions](outputs.tf#L95) | Map of subnet regions keyed by name. | |
| [subnet_secondary_ranges](outputs.tf#L102) | Map of subnet secondary ranges keyed by name. | |
| [subnet_self_links](outputs.tf#L113) | Map of subnet self links keyed by name. | |
| [subnets](outputs.tf#L118) | Subnet resources. | |
| [subnets_proxy_only](outputs.tf#L123) | L7 ILB or L7 Regional LB subnet resources. | |
| [subnets_psc](outputs.tf#L128) | Private Service Connect subnet resources. | |

<!-- END TFDOC -->
7 changes: 6 additions & 1 deletion modules/net-vpc/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,6 +80,11 @@ output "self_link" {
]
}

output "subnet_ids" {
description = "Map of subnet IDs keyed by name."
value = { for k, v in google_compute_subnetwork.subnetwork : k => v.id }
}

output "subnet_ips" {
description = "Map of subnet address ranges keyed by name."
value = {
Expand Down

0 comments on commit 6f975d2

Please sign in to comment.