feat: add minimal PROD VM example
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Allocate organization-level public IP capacity after the VDC and Edge exist.
|
||||
resource "nubes_vc_org_ip_allocation" "org_ip" {
|
||||
# Existing organization used by the VDC.
|
||||
organization = var.organization
|
||||
|
||||
# Configure the selected IP space with the tested minimum count of 3.
|
||||
# The API expects count as a string inside the vIPConfigure JSON array.
|
||||
vip_configure = jsonencode([
|
||||
{
|
||||
name = var.ip_space_name
|
||||
count = tostring(var.org_vip_count)
|
||||
}
|
||||
])
|
||||
|
||||
# Keep the organization allocation when this Terraform resource is destroyed.
|
||||
keep_on_destroy = true
|
||||
|
||||
# PROD exposes the organization's usable IP spaces after the VDC and Edge exist.
|
||||
depends_on = [nubes_vc_nsxt.edge]
|
||||
}
|
||||
|
||||
# Enable the tested SNAT configuration on the Edge using the same IP space.
|
||||
resource "nubes_vc_nsxt_snat" "snat" {
|
||||
# UUID of the Edge created above.
|
||||
nsxt_uid = nubes_vc_nsxt.edge.id
|
||||
|
||||
# IP space allocated to the organization in the resource above.
|
||||
ip_space_name = var.ip_space_name
|
||||
|
||||
# Leave SNAT enabled when this Terraform resource is destroyed.
|
||||
keep_on_destroy = true
|
||||
|
||||
# The IP space must be allocated before SNAT is configured.
|
||||
depends_on = [nubes_vc_org_ip_allocation.org_ip]
|
||||
}
|
||||
Reference in New Issue
Block a user