Skip to content

Commit

Permalink
Added service group and address group in documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-nutanix committed Feb 16, 2022
1 parent 1d3afc2 commit 0c372d6
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 0 deletions.
51 changes: 51 additions & 0 deletions website/docs/d/address_group.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
layout: "nutanix"
page_title: "NUTANIX: nutanix_address_group"
sidebar_current: "docs-nutanix-datasource-address-group"
description: |-
This operation retrieves an address_group.
---

# nutanix_address_group

Provides a datasource to retrieve a address group.

## Example Usage

``` hcl
resource "nutanix_address_group" "test_address" {
name = "test"
description = "test address groups resource"
ip_address_block_list {
ip = "10.0.0.0"
prefix_length = 24
}
}
data "nutanix_address_group" "addr_group" {
uuid = nutanix_address_group.test_address.id
}
```


## Attribute Reference

The following attributes are exported:

* `uuid`:- (Required) UUID of the address group
* `name`:- (ReadOnly) Name of the address group
* `description`:- (ReadOnly) Description of the address group
* `ip_address_block_list`: - (ReadOnly) list of IP address blocks with their prefix length
* `address_group_string`: - (ReadOnly) Address Group string


### IP Address Block List

The ip_address_block_list argument supports the following:

* `ip`: - (ReadOnly) IP of the address block
* `prefix_length`: - (ReadOnly) Prefix length of address block in int


See detailed information in [Nutanix Address Group](https://www.nutanix.dev/reference/prism_central/v3/api/address-groups/getaddressgroupsuuid).
67 changes: 67 additions & 0 deletions website/docs/d/address_groups.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
layout: "nutanix"
page_title: "NUTANIX: nutanix_address_groups"
sidebar_current: "docs-nutanix-datasource-address-groups"
description: |-
This operation retrieves list of address_groups.
---

# nutanix_address_group

Provides a datasource to retrieve list of address groups.

## Example Usage

``` hcl
data "nutanix_address_groups" "addr_groups" {}
```


## Attribute Reference

The following attributes are exported:

* `entities`:- (ReadOnly) List of address groups
* `metadata`:- (Optional) Use metadata to specify filters

### Metadata

The following arguments are supported:
* `filter`: (Optional) Filter in FIQL Syntax
* `sort_order`: (Optional) order of sorting
* `offset`: (Optional) Integer
* `length`: (Optional) Integer
* `sort_attribute`: (Optional) attribute to sort

### Entities

The following attributes are exported as list:

* `address_group`: Information about address_group
* `associated_policies_list`: List of associated policies to address group

#### Address Group

The following attributes are exported:

* `uuid`:- (ReadOnly) UUID of the address group
* `name`:- (ReadOnly) Name of the address group
* `description`:- (ReadOnly) Description of the address group
* `ip_address_block_list`: - (ReadOnly) list of IP address blocks with their prefix length
* `address_group_string`: - (ReadOnly) Address Group string

##### IP Address Block List

The ip_address_block_list argument supports the following:

* `ip`: - (ReadOnly) IP of the address block
* `prefix_length`: - (ReadOnly) Prefix length of address block in int

#### Associated policies

The following attributes are exported as list:
* `name`: - (ReadOnly) Name of associated policy
* `uuid`: - (ReadOnly) UUID of associated policy


See detailed information in [Nutanix Address Group List](https://www.nutanix.dev/reference/prism_central/v3/api/address-groups/postaddressgroupslist).
44 changes: 44 additions & 0 deletions website/docs/r/address_group.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: "nutanix"
page_title: "NUTANIX: nutanix_address_group"
sidebar_current: "docs-nutanix-resource-address-group"
description: |-
This operation submits a request to create a address group based on the input parameters.
---

# nutanix_service_group

Provides a resource to create a address group based on the input parameters.

## Example Usage

``` hcl
resource "nutanix_address_group" "test_address" {
name = "test"
description = "test address groups resource"
ip_address_block_list {
ip = "10.0.0.0"
prefix_length = 24
}
}
```


## Argument Reference

The following arguments are supported:

* `name`: - (Required) Name of the service group
* `description`: - (Optional) Description of the service group
* `ip_address_block_list`: - (Required) list of IP address blocks with their prefix length
* `address_group_string`: - (ReadOnly) Address Group string

### IP Address List

The ip_address_block_list argument supports the following:

* `ip`: - (Required) IP of the address block
* `prefix_length`: - (Required) Prefix length of address block in int

See detailed information in [Nutanix Address Groups](https://www.nutanix.dev/reference/prism_central/v3/api/address-groups/postaddressgroups).
74 changes: 74 additions & 0 deletions website/docs/r/service_group.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
layout: "nutanix"
page_title: "NUTANIX: nutanix_service_group"
sidebar_current: "docs-nutanix-resource-service-group"
description: |-
This operation submits a request to create a service group based on the input parameters.
---

# nutanix_service_group

Provides a resource to create a service group based on the input parameters.

## Example Usage

``` hcl
resource "nutanix_service_group" "test" {
name = "test_service_gp"
description = "this is service group"
service_list {
protocol = "TCP"
tcp_port_range_list {
start_port = 22
end_port = 22
}
tcp_port_range_list {
start_port = 2222
end_port = 2222
}
}
}
```


## Argument Reference

The following arguments are supported:

* `name`: - (Required) Name of the service group
* `description`: - (Optional) Description of the service group
* `service_list`: - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
* `system_defined`: - (ReadOnly) boolean value to denote if the service group is system defined

### Service List

The service_list argument supports the following:

* `protocol`: - (Optional) The UserPrincipalName of the user from the directory service.
* `icmp_type_code_list`: - (Optional) ICMP type code list
* `tcp_port_range_list`: - (Optional) TCP Port range list
* `udp_port_range_list`: - (Optional) UDP port range list

#### ICMP Port range list

The icmp_type_code_list argument supports the following:

* `code`: - (Optional) Code as text
* `type`: - (Optional) Type as text

#### TCP Port Range

The tcp_port_range_list attribute supports the following:

* `start_port`: - (Optional) Start Port (Int)
* `end_port` - (Optional) End Port (Int)

#### UDP Port Range

The udp_port_range_list attribute supports the following:

* `start_port`: - (Optional) Start Port (Int)
* `end_port` - (Optional) End Port (Int)

See detailed information in [Nutanix Service Groups](https://www.nutanix.dev/reference/prism_central/v3/api/service-groups/postservicegroups).
12 changes: 12 additions & 0 deletions website/nutanix.erb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
<li<%= sidebar_current("docs-nutanix-datasource-recovery-plan") %>>
<a href="/docs/providers/nutanix/d/recovery_plan.html">nutanix_recovery_plan</a>
</li>
<li<%= sidebar_current("docs-nutanix-datasource-address-groups") %>>
<a href="/docs/providers/nutanix/d/address_groups.html">nutanix_address_groups</a>
</li>
<li<%= sidebar_current("docs-nutanix-datasource-address-group") %>>
<a href="/docs/providers/nutanix/d/address_group.html">nutanix_address_group</a>
</li>
</ul>
</li>

Expand Down Expand Up @@ -154,6 +160,12 @@
<li<%= sidebar_current("docs-nutanix-resource-nutanix-virtual-machine") %>>
<a href="/docs/providers/nutanix/r/virtual_machine.html">nutanix_virtual_machine</a>
</li>
<li<%= sidebar_current("docs-nutanix-resource-address-group") %>>
<a href="/docs/providers/nutanix/r/address_group.html">nutanix_address_group</a>
</li>
<li<%= sidebar_current("docs-nutanix-resource-service-group") %>>
<a href="/docs/providers/nutanix/r/service_group.html">nutanix_service_group</a>
</li>
</ul>
</li>
</ul>
Expand Down

0 comments on commit 0c372d6

Please sign in to comment.