Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/network/gpu-rdma-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ limitations under the License.
| ---- | ----------- |
| <a name="output_network_id"></a> [network\_id](#output\_network\_id) | ID of the new VPC network |
| <a name="output_network_name"></a> [network\_name](#output\_network\_name) | Name of the new VPC network |
| <a name="output_network_project_id"></a> [network\_project\_id](#output\_network\_project\_id) | Project ID of the new VPC network |
| <a name="output_network_self_link"></a> [network\_self\_link](#output\_network\_self\_link) | Self link of the new VPC network |
| <a name="output_subnetwork_interfaces"></a> [subnetwork\_interfaces](#output\_subnetwork\_interfaces) | Full list of subnetwork objects belonging to the new VPC network (compatible with vm-instance and Slurm modules) |
| <a name="output_subnetwork_interfaces_gke"></a> [subnetwork\_interfaces\_gke](#output\_subnetwork\_interfaces\_gke) | Full list of subnetwork objects belonging to the new VPC network (compatible with gke-node-pool) |
| <a name="output_subnetwork_name_prefix"></a> [subnetwork\_name\_prefix](#output\_subnetwork\_name\_prefix) | Prefix of the RDMA subnetwork names |
| <a name="output_subnetwork_project_id"></a> [subnetwork\_project\_id](#output\_subnetwork\_project\_id) | Project ID of the primary subnetwork |
| <a name="output_subnetworks"></a> [subnetworks](#output\_subnetworks) | Full list of subnetwork objects belonging to the new VPC network |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
12 changes: 12 additions & 0 deletions modules/network/gpu-rdma-vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ output "network_id" {
depends_on = [module.vpc]
}

output "network_project_id" {
description = "Project ID of the new VPC network"
value = module.vpc.project_id
depends_on = [module.vpc]
}

output "network_self_link" {
description = "Self link of the new VPC network"
value = module.vpc.network_self_link
Expand All @@ -38,6 +44,12 @@ output "subnetworks" {
depends_on = [module.vpc]
}

output "subnetwork_project_id" {
description = "Project ID of the primary subnetwork"
value = module.vpc.project_id
depends_on = [module.vpc]
}

output "subnetwork_interfaces" {
description = "Full list of subnetwork objects belonging to the new VPC network (compatible with vm-instance and Slurm modules)"
value = local.output_subnets
Expand Down
2 changes: 2 additions & 0 deletions modules/network/multivpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ limitations under the License.
| <a name="output_additional_networks"></a> [additional\_networks](#output\_additional\_networks) | Network interfaces for each subnetwork created by this module |
| <a name="output_network_ids"></a> [network\_ids](#output\_network\_ids) | IDs of the new VPC network |
| <a name="output_network_names"></a> [network\_names](#output\_network\_names) | Names of the new VPC networks |
| <a name="output_network_project_ids"></a> [network\_project\_ids](#output\_network\_project\_ids) | Project IDs of the new VPC networks |
| <a name="output_network_self_links"></a> [network\_self\_links](#output\_network\_self\_links) | Self link of the new VPC network |
| <a name="output_subnetwork_addresses"></a> [subnetwork\_addresses](#output\_subnetwork\_addresses) | IP address range of the primary subnetwork |
| <a name="output_subnetwork_names"></a> [subnetwork\_names](#output\_subnetwork\_names) | Names of the subnetwork created in each network |
| <a name="output_subnetwork_project_ids"></a> [subnetwork\_project\_ids](#output\_subnetwork\_project\_ids) | Project IDs of the subnetworks |
| <a name="output_subnetwork_self_links"></a> [subnetwork\_self\_links](#output\_subnetwork\_self\_links) | Self link of the primary subnetwork |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10 changes: 10 additions & 0 deletions modules/network/multivpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ output "network_ids" {
value = module.vpcs[*].network_id
}

output "network_project_ids" {
description = "Project IDs of the new VPC networks"
value = module.vpcs[*].network_project_id
}

output "network_self_links" {
description = "Self link of the new VPC network"
value = module.vpcs[*].network_self_link
Expand All @@ -39,6 +44,11 @@ output "subnetwork_names" {
value = module.vpcs[*].subnetwork_name
}

output "subnetwork_project_ids" {
description = "Project IDs of the subnetworks"
value = module.vpcs[*].subnetwork_project_id
}

output "subnetwork_self_links" {
description = "Self link of the primary subnetwork"
value = module.vpcs[*].subnetwork_self_link
Expand Down
1 change: 1 addition & 0 deletions modules/network/pre-existing-subnetwork/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,6 @@ No modules.
| <a name="output_subnetwork"></a> [subnetwork](#output\_subnetwork) | Full subnetwork object in the primary region |
| <a name="output_subnetwork_address"></a> [subnetwork\_address](#output\_subnetwork\_address) | Subnetwork IP range in the primary region |
| <a name="output_subnetwork_name"></a> [subnetwork\_name](#output\_subnetwork\_name) | Name of the subnetwork in the primary region |
| <a name="output_subnetwork_project_id"></a> [subnetwork\_project\_id](#output\_subnetwork\_project\_id) | Project ID of the subnetwork |
| <a name="output_subnetwork_self_link"></a> [subnetwork\_self\_link](#output\_subnetwork\_self\_link) | Subnetwork self-link in the primary region |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
5 changes: 5 additions & 0 deletions modules/network/pre-existing-subnetwork/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ output "subnetwork_name" {
value = data.google_compute_subnetwork.primary_subnetwork.name
}

output "subnetwork_project_id" {
description = "Project ID of the subnetwork"
value = data.google_compute_subnetwork.primary_subnetwork.project
}

output "subnetwork_self_link" {
description = "Subnetwork self-link in the primary region"
value = data.google_compute_subnetwork.primary_subnetwork.self_link
Expand Down
2 changes: 2 additions & 0 deletions modules/network/pre-existing-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ No modules.
| ---- | ----------- |
| <a name="output_network_id"></a> [network\_id](#output\_network\_id) | ID of the existing VPC network |
| <a name="output_network_name"></a> [network\_name](#output\_network\_name) | Name of the existing VPC network |
| <a name="output_network_project_id"></a> [network\_project\_id](#output\_network\_project\_id) | Project ID of the existing VPC network |
| <a name="output_network_self_link"></a> [network\_self\_link](#output\_network\_self\_link) | Self link of the existing VPC network |
| <a name="output_subnetwork"></a> [subnetwork](#output\_subnetwork) | Full subnetwork object in the primary region |
| <a name="output_subnetwork_address"></a> [subnetwork\_address](#output\_subnetwork\_address) | Subnetwork IP range in the primary region |
| <a name="output_subnetwork_name"></a> [subnetwork\_name](#output\_subnetwork\_name) | Name of the subnetwork in the primary region |
| <a name="output_subnetwork_project_id"></a> [subnetwork\_project\_id](#output\_subnetwork\_project\_id) | Project ID of the subnetwork in the primary region |
| <a name="output_subnetwork_self_link"></a> [subnetwork\_self\_link](#output\_subnetwork\_self\_link) | Subnetwork self-link in the primary region |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10 changes: 10 additions & 0 deletions modules/network/pre-existing-vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ output "network_id" {
value = data.google_compute_network.vpc.id
}

output "network_project_id" {
description = "Project ID of the existing VPC network"
value = data.google_compute_network.vpc.project
}

output "network_self_link" {
description = "Self link of the existing VPC network"
value = data.google_compute_network.vpc.self_link
Expand All @@ -39,6 +44,11 @@ output "subnetwork_name" {
value = data.google_compute_subnetwork.primary_subnetwork.name
}

output "subnetwork_project_id" {
description = "Project ID of the subnetwork in the primary region"
value = data.google_compute_subnetwork.primary_subnetwork.project
}

output "subnetwork_self_link" {
description = "Subnetwork self-link in the primary region"
value = data.google_compute_subnetwork.primary_subnetwork.self_link
Expand Down
2 changes: 2 additions & 0 deletions modules/network/vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,12 @@ limitations under the License.
| <a name="output_nat_ips"></a> [nat\_ips](#output\_nat\_ips) | External IPs of the Cloud NAT from which outbound internet traffic will arrive (empty list if no NAT is used) |
| <a name="output_network_id"></a> [network\_id](#output\_network\_id) | ID of the new VPC network |
| <a name="output_network_name"></a> [network\_name](#output\_network\_name) | Name of the new VPC network |
| <a name="output_network_project_id"></a> [network\_project\_id](#output\_network\_project\_id) | Project ID of the new VPC network |
| <a name="output_network_self_link"></a> [network\_self\_link](#output\_network\_self\_link) | Self link of the new VPC network |
| <a name="output_subnetwork"></a> [subnetwork](#output\_subnetwork) | Primary subnetwork object |
| <a name="output_subnetwork_address"></a> [subnetwork\_address](#output\_subnetwork\_address) | IP address range of the primary subnetwork |
| <a name="output_subnetwork_name"></a> [subnetwork\_name](#output\_subnetwork\_name) | Name of the primary subnetwork |
| <a name="output_subnetwork_project_id"></a> [subnetwork\_project\_id](#output\_subnetwork\_project\_id) | Project ID of the primary subnetwork |
| <a name="output_subnetwork_self_link"></a> [subnetwork\_self\_link](#output\_subnetwork\_self\_link) | Self link of the primary subnetwork |
| <a name="output_subnetwork_stack_type"></a> [subnetwork\_stack\_type](#output\_subnetwork\_stack\_type) | Stack type of the primary subnetwork |
| <a name="output_subnetworks"></a> [subnetworks](#output\_subnetworks) | Full list of subnetwork objects belonging to the new VPC network |
Expand Down
12 changes: 12 additions & 0 deletions modules/network/vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ output "network_id" {
depends_on = [module.vpc, module.cloud_router]
}

output "network_project_id" {
description = "Project ID of the new VPC network"
value = module.vpc.project_id
depends_on = [module.vpc, module.cloud_router]
}

output "network_self_link" {
description = "Self link of the new VPC network"
value = module.vpc.network_self_link
Expand All @@ -50,6 +56,12 @@ output "subnetwork_name" {
depends_on = [module.vpc, module.cloud_router]
}

output "subnetwork_project_id" {
description = "Project ID of the primary subnetwork"
value = module.vpc.project_id
depends_on = [module.vpc, module.cloud_router]
}

output "subnetwork_self_link" {
description = "Self link of the primary subnetwork"
value = local.output_primary_subnetwork_self_link
Expand Down
1 change: 1 addition & 0 deletions modules/packer/custom-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ No resources.
| <a name="input_startup_script_file"></a> [startup\_script\_file](#input\_startup\_script\_file) | File path to local shell script that will be used to customize the Linux VM image (overrides var.startup\_script) | `string` | `null` | no |
| <a name="input_state_timeout"></a> [state\_timeout](#input\_state\_timeout) | The time to wait for instance state changes, including image creation | `string` | `"10m"` | no |
| <a name="input_subnetwork_name"></a> [subnetwork\_name](#input\_subnetwork\_name) | Name of subnetwork in which to provision image building VM | `string` | n/a | yes |
| <a name="input_subnetwork_project_id"></a> [subnetwork\_project\_id](#input\_subnetwork\_project\_id) | Project ID of the subnetwork | `string` | `null` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Assign network tags to apply firewall rules to VM instance | `list(string)` | `null` | no |
| <a name="input_use_iap"></a> [use\_iap](#input\_use\_iap) | Use IAP proxy when connecting by SSH | `bool` | `true` | no |
| <a name="input_use_os_login"></a> [use\_os\_login](#input\_use\_os\_login) | Use OS Login when connecting by SSH | `bool` | `false` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/packer/custom-image/image.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ source "googlecompute" "toolkit_image" {
omit_external_ip = var.omit_external_ip
use_internal_ip = var.omit_external_ip
subnetwork = var.subnetwork_name
network_project_id = var.network_project_id
network_project_id = var.network_project_id != null ? var.network_project_id : var.subnetwork_project_id
service_account_email = var.service_account_email
scopes = var.service_account_scopes
source_image = var.source_image
Expand Down
6 changes: 6 additions & 0 deletions modules/packer/custom-image/variables.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ variable "subnetwork_name" {
type = string
}

variable "subnetwork_project_id" {
description = "Project ID of the subnetwork"
type = string
default = null
}

variable "omit_external_ip" {
description = "Provision the image building VM without a public IP address"
type = bool
Expand Down
Loading