-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(vapp): enhancement 'cloudavenue_vapp_isolated_network_dataso…
…urce'
- Loading branch information
David MICHENEAU
committed
Apr 26, 2023
1 parent
5b51373
commit 09481b0
Showing
14 changed files
with
597 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
page_title: "cloudavenue_vapp_isolated_network Data Source - cloudavenue" | ||
subcategory: "vApp (Virtual Appliance)" | ||
description: |- | ||
--- | ||
|
||
# cloudavenue_vapp_isolated_network (Data Source) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "cloudavenue_vapp" "example" { | ||
name = "MyVapp" | ||
description = "This is an example vApp" | ||
} | ||
resource "cloudavenue_vapp_isolated_network" "example" { | ||
name = "MyVappNet" | ||
vapp_name = cloudavenue_vapp.example.name | ||
gateway = "192.168.10.1" | ||
netmask = "255.255.255.0" | ||
dns1 = "192.168.10.1" | ||
dns2 = "192.168.10.3" | ||
dns_suffix = "myvapp.biz" | ||
guest_vlan_allowed = true | ||
retain_ip_mac_enabled = true | ||
static_ip_pool = [{ | ||
start_address = "192.168.10.51" | ||
end_address = "192.168.10.101" | ||
}, | ||
{ | ||
start_address = "192.168.10.10" | ||
end_address = "192.168.10.30" | ||
}] | ||
} | ||
data "cloudavenue_vapp_isolated_network" "example" { | ||
vapp_name = cloudavenue_vapp.example.name | ||
name = cloudavenue_vapp_isolated_network.example.name | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the network. This value must be unique within the `VDC` or `VDC Group` that owns the network. | ||
|
||
### Optional | ||
|
||
- `vapp_id` (String) ID of the vApp. Ensure that one and only one attribute from this collection is set : `vapp_name`, `vapp_id`. | ||
- `vapp_name` (String) Name of the vApp. Ensure that one and only one attribute from this collection is set : `vapp_id`, `vapp_name`. | ||
- `vdc` (String) The name of vDC to use, optional if defined at provider level. | ||
|
||
### Read-Only | ||
|
||
- `description` (String) A description of the network. | ||
- `dns1` (String) The primary DNS server IP address for the network. | ||
- `dns2` (String) The secondary DNS server IP address for the network. | ||
- `dns_suffix` (String) The DNS suffix for the network. | ||
- `gateway` (String) The gateway IP address for the network. This value define also the network IP range with the prefix length. | ||
- `guest_vlan_allowed` (Boolean) Return True if Network allows guest VLAN. | ||
- `id` (String) The ID of the network. | ||
- `netmask` (String) The netmask of the network. | ||
- `retain_ip_mac_enabled` (Boolean) Return network resources such as IP/MAC of router will be retained across deployments. | ||
- `static_ip_pool` (Attributes Set) A set of static IP pools to be used for this network. (see [below for nested schema](#nestedatt--static_ip_pool)) | ||
|
||
<a id="nestedatt--static_ip_pool"></a> | ||
### Nested Schema for `static_ip_pool` | ||
|
||
Read-Only: | ||
|
||
- `end_address` (String) The end address of the IP pool. This value must be a valid IP address in the network IP range. | ||
- `start_address` (String) The start address of the IP pool. This value must be a valid IP address in the network IP range. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
page_title: "cloudavenue_vapp_org_network Data Source - cloudavenue" | ||
subcategory: "vApp (Virtual Appliance)" | ||
description: |- | ||
Provides a Cloud Avenue routed vAPP Org Network data source to read data or reference existing network. | ||
--- | ||
|
||
# cloudavenue_vapp_org_network (Data Source) | ||
|
||
Provides a Cloud Avenue routed vAPP Org Network data source to read data or reference existing network. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "cloudavenue_tier0_vrfs" "example" {} | ||
|
||
resource "cloudavenue_edgegateway" "example" { | ||
owner_name = "MyVDC" | ||
tier0_vrf_name = data.cloudavenue_tier0_vrfs.example.names.0 | ||
owner_type = "vdc" | ||
} | ||
|
||
resource "cloudavenue_network_routed" "example" { | ||
name = "MyOrgNet" | ||
description = "This is an example Net" | ||
|
||
edge_gateway_id = cloudavenue_edgegateway.example.id | ||
|
||
gateway = "192.168.1.254" | ||
prefix_length = 24 | ||
|
||
dns1 = "1.1.1.1" | ||
dns2 = "8.8.8.8" | ||
|
||
dns_suffix = "example" | ||
|
||
static_ip_pool = [ | ||
{ | ||
start_address = "192.168.1.10" | ||
end_address = "192.168.1.20" | ||
} | ||
] | ||
} | ||
|
||
resource "cloudavenue_vapp" "example" { | ||
name = "MyVapp" | ||
vdc = "MyVDC" | ||
description = "This is an example vApp" | ||
} | ||
|
||
resource "cloudavenue_vapp_org_network" "example" { | ||
vapp_name = cloudavenue_vapp.example.name | ||
vdc = cloudavenue_vapp.example.vdc | ||
network_name = cloudavenue_network_routed.example.name | ||
} | ||
|
||
data "cloudavenue_vapp_org_network" "example" { | ||
vapp_name = cloudavenue_vapp.example.name | ||
network_name = cloudavenue_network_routed.example.name | ||
vdc = cloudavenue_vapp.example.vdc | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `network_name` (String) Organization network name to which vApp network is connected to. | ||
|
||
### Optional | ||
|
||
- `vapp_id` (String) ID of the vApp. Ensure that one and only one attribute from this collection is set : `vapp_name`, `vapp_id`. | ||
- `vapp_name` (String) Name of the vApp. Ensure that one and only one attribute from this collection is set : `vapp_id`, `vapp_name`. | ||
- `vdc` (String) The name of vDC to use, optional if defined at provider level. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of the network. | ||
- `is_fenced` (Boolean) Defines if the network is fenced. Fencing allows identical virtual machines in different vApp networks connect to organization VDC networks that are accessed in this vApp. | ||
- `retain_ip_mac_enabled` (Boolean) Specifies whether the network resources such as IP/MAC of router will be retained across deployments. | ||
|
30 changes: 30 additions & 0 deletions
30
examples/data-sources/cloudavenue_vapp_isolated_network/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
resource "cloudavenue_vapp" "example" { | ||
name = "MyVapp" | ||
description = "This is an example vApp" | ||
} | ||
|
||
resource "cloudavenue_vapp_isolated_network" "example" { | ||
name = "MyVappNet" | ||
vapp_name = cloudavenue_vapp.example.name | ||
gateway = "192.168.10.1" | ||
netmask = "255.255.255.0" | ||
dns1 = "192.168.10.1" | ||
dns2 = "192.168.10.3" | ||
dns_suffix = "myvapp.biz" | ||
guest_vlan_allowed = true | ||
retain_ip_mac_enabled = true | ||
|
||
static_ip_pool = [{ | ||
start_address = "192.168.10.51" | ||
end_address = "192.168.10.101" | ||
}, | ||
{ | ||
start_address = "192.168.10.10" | ||
end_address = "192.168.10.30" | ||
}] | ||
} | ||
|
||
data "cloudavenue_vapp_isolated_network" "example" { | ||
vapp_name = cloudavenue_vapp.example.name | ||
name = cloudavenue_vapp_isolated_network.example.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
data "cloudavenue_vdc_group" "example" { | ||
name = "MyVDCGroup" | ||
resource "cloudavenue_vapp" "example" { | ||
name = "MyVapp" | ||
description = "This is an example vApp" | ||
} | ||
|
||
resource "cloudavenue_vapp_isolated_network" "example" { | ||
name = "MyVappNet" | ||
vapp_name = cloudavenue_vapp.example.name | ||
gateway = "192.168.10.1" | ||
netmask = "255.255.255.0" | ||
dns1 = "192.168.10.1" | ||
dns2 = "192.168.10.3" | ||
dns_suffix = "myvapp.biz" | ||
guest_vlan_allowed = true | ||
retain_ip_mac_enabled = true | ||
|
||
static_ip_pool = [{ | ||
start_address = "192.168.10.51" | ||
end_address = "192.168.10.101" | ||
}, | ||
{ | ||
start_address = "192.168.10.10" | ||
end_address = "192.168.10.30" | ||
}] | ||
} | ||
|
||
data "cloudavenue_vapp_isolated_network" "example" { | ||
vapp_name = cloudavenue_vapp.example.name | ||
name = cloudavenue_vapp_isolated_network.example.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.