Skip to content

Commit

Permalink
PR review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cdunbar13 committed Dec 12, 2024
1 parent bca3956 commit 7a4d256
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ This snippet uses the gpu-vpc module to create a new VPC network named

```yaml
- id: rdma-net
source: modules/network/gpu-vpc
source: modules/network/gpu-rdma-vpc
settings:
network_name: test-rdma-net
network_profile: https://www.googleapis.com/compute/beta/projects/$(vars.project_id)/global/networkProfiles/$(vars.zone)-vpc-roce
network_routing_mode: REGIONAL
nic_type: MRDMA
subnetworks_template:
name_prefix: test-mrdma-sub
count: 8
Expand Down Expand Up @@ -122,7 +121,7 @@ No resources.
| <a name="input_mtu"></a> [mtu](#input\_mtu) | The network MTU (default: 8896). Recommended values: 0 (use Compute Engine default), 1460 (default outside HPC environments), 1500 (Internet default), or 8896 (for Jumbo packets). Allowed are all values in the range 1300 to 8896, inclusively. | `number` | `8896` | no |
| <a name="input_network_description"></a> [network\_description](#input\_network\_description) | An optional description of this resource (changes will trigger resource destroy/create) | `string` | `""` | no |
| <a name="input_network_name"></a> [network\_name](#input\_network\_name) | The name of the network to be created (if unsupplied, will default to "{deployment\_name}-net") | `string` | `null` | no |
| <a name="input_network_profile"></a> [network\_profile](#input\_network\_profile) | A full or partial URL of the network profile to apply to this network.<br/>This field can be set only at resource creation time. For example, the<br/>following are valid URLs:<br/>- https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}<br/>- projects/{projectId}/global/networkProfiles/{network\_profile\_name}} | `string` | `null` | no |
| <a name="input_network_profile"></a> [network\_profile](#input\_network\_profile) | A full or partial URL of the network profile to apply to this network.<br/>This field can be set only at resource creation time. For example, the<br/>following are valid URLs:<br/>- https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}<br/>- projects/{projectId}/global/networkProfiles/{network\_profile\_name}} | `string` | n/a | yes |
| <a name="input_network_routing_mode"></a> [network\_routing\_mode](#input\_network\_routing\_mode) | The network routing mode (default "REGIONAL") | `string` | `"REGIONAL"` | no |
| <a name="input_nic_type"></a> [nic\_type](#input\_nic\_type) | NIC type for use in modules that use the output | `string` | `"MRDMA"` | no |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Project in which the HPC deployment will be created | `string` | n/a | yes |
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ variable "network_profile" {
- projects/{projectId}/global/networkProfiles/{network_profile_name}}
EOT
type = string
default = null
nullable = false

validation {
condition = can(coalesce(var.network_profile))
error_message = "var.network_profile must be specified and not an empty string"
}
}

variable "nic_type" {
Expand All @@ -151,7 +156,7 @@ variable "nic_type" {
default = "MRDMA"

validation {
condition = contains(["GVNIC", "VIRTIO", "MRDMA", "IRDMA", null], var.nic_type)
error_message = "The nic_type must be \"GVNIC\", \"VIRTIO\", \"MRDMA\", or \"IRDMA\"."
condition = contains(["MRDMA"], var.nic_type)
error_message = "The nic_type must be \"MRDMA\"."
}
}
File renamed without changes.

0 comments on commit 7a4d256

Please sign in to comment.