Skip to content

Commit

Permalink
Merge pull request #41 from OpenVPN/update_documentation_and_example
Browse files Browse the repository at this point in the history
Update examples and documentation
  • Loading branch information
sahaqaa authored Aug 5, 2024
2 parents d3c6d61 + eac7aa7 commit 30ce046
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 20 deletions.
12 changes: 11 additions & 1 deletion docs/data-sources/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ description: |-
- `id` (String) The ID of this resource.
- `network_item_id` (String)
- `network_item_type` (String)
- `routes` (List of String)
- `routes` (List of Object) (see [below for nested schema](#nestedatt--routes))

<a id="nestedatt--config"></a>
### Nested Schema for `config`
Expand All @@ -44,3 +44,13 @@ Read-Only:
- `from_port` (Number)
- `protocol` (String)
- `to_port` (Number)



<a id="nestedatt--routes"></a>
### Nested Schema for `routes`

Read-Only:

- `allow_embedded_ip` (Boolean)
- `domain` (String)
2 changes: 2 additions & 0 deletions docs/data-sources/connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ Use an `cloudconnexa_connector` data source to read an existing CloudConnexa con

### Read-Only

- `description` (String) The description of the connector.
- `id` (String) The ID of this resource.
- `ip_v4_address` (String) The IPV4 address of the connector.
- `ip_v6_address` (String) The IPV6 address of the connector.
- `network_item_id` (String) The id of the network or host with which the connector is associated.
- `network_item_type` (String) The network object type of the connector. This typically will be set to either `NETWORK` or `HOST`.
- `profile` (String) OpenVPN profile
- `token` (String) Connector token
- `vpn_region_id` (String) The id of the region where the connector is deployed.
4 changes: 0 additions & 4 deletions docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Use a `cloudconnexa_user` data source to read a specific CloudConnexa user.


<!-- schema generated by tfplugindocs -->

## Schema

### Required
Expand All @@ -32,11 +31,8 @@ Use a `cloudconnexa_user` data source to read a specific CloudConnexa user.
- `last_name` (String) The user's last name.
- `status` (String) The user's status.
- `user_id` (String) The ID of this resource.
- `connection_status` (String) The user's connection status. Valid values are `OFFLINE`, `ONLINE`,
or `ONLINE_WITH_ISSUES`.

<a id="nestedatt--devices"></a>

### Nested Schema for `devices`

Read-Only:
Expand Down
5 changes: 2 additions & 3 deletions docs/data-sources/user_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ Use an `cloudconnexa_user_group` data source to read an CloudConnexa user group.

### Read-Only

- `id` (String) The ID of this resource.
- `connect_auth` (String) The type of connection authentication. Valid values are `AUTH`, `AUTO`, or `STRICT_AUTH`.
- `id` (String) The user group ID.
- `internet_access` (String) The type of internet access provided. Valid values are `BLOCKED`, `GLOBAL_INTERNET`, or `LOCAL`. Defaults to `LOCAL`.
- `max_device` (Number) The maximum number of devices per user.
- `system_subnets` (List of String) The IPV4 and IPV6 addresses of the subnets associated with this user group.
- `user_group_id` (String) The user group ID.
- `vpn_region_ids` (List of String) The list of VPN region IDs this user group is associated with.
- `connect_auth` (String) The type of connection authentication. Valid values are `AUTH`, `AUTO`, or `STRICT_AUTH`.
3 changes: 1 addition & 2 deletions docs/data-sources/vpn_region.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ Use a `cloudconnexa_vpn_region` data source to read an CloudConnexa VPN region.

### Required

- `region_id` (String) The id of the region.
- `id` (String) The id of the region.

### Read-Only

- `continent` (String) The continent of the region.
- `country` (String) The country of the region.
- `country_iso` (String) The ISO code of the country of the region.
- `id` (String) The ID of this resource.
- `region_name` (String) The name of the region.
2 changes: 1 addition & 1 deletion docs/resources/ip_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ description: |-
- `name` (String)
- `network_item_id` (String)
- `network_item_type` (String)
- `routes` (List of String)
- `type` (String)

### Optional

- `config` (Block List, Max: 1) (see [below for nested schema](#nestedblock--config))
- `description` (String)
- `routes` (List of String)

### Read-Only

Expand Down
4 changes: 2 additions & 2 deletions example/applications.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "cloudconnexa_application" "application_full_access" {
network_item_type = "NETWORK"
network_item_id = data.cloudconnexa_network.test-net.id
routes {
domain = "example-application-1.com"
domain = "example-application-1.com"
allow_embedded_ip = false
}

Expand All @@ -22,7 +22,7 @@ resource "cloudconnexa_application" "application_custom_access" {
network_item_id = data.cloudconnexa_network.test-net.id

routes {
domain = "example-application-2.com"
domain = "example-application-2.com"
allow_embedded_ip = false
}

Expand Down
2 changes: 1 addition & 1 deletion example/networks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "cloudconnexa_network" "test-network" {
name = "test-network"
egress = false
default_route {
value = "192.168.0.0/24"
subnet = "192.168.0.0/24"
}
default_connector {
name = "test-connector"
Expand Down
2 changes: 1 addition & 1 deletion example/routes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ resource "cloudconnexa_route" "this" {
}
network_item_id = var.networks["example-network"]
type = "IP_V4"
subnet = each.value.subnet
subnet = each.value.subnet
description = each.value.description
}
10 changes: 5 additions & 5 deletions example/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ variable "users" {
})
)
default = {
"Username1" = {
"John_Doe" = {
username = "Username1"
email = "[email protected]"
group = "Default"
role = "ADMIN"
}
"Username2" = {
"Jane_Doe" = {
username = "Username2"
email = "[email protected]"
group = "Developer"
Expand Down Expand Up @@ -55,15 +55,15 @@ variable "routes" {
type = list(map(string))
default = [
{
subnet = "10.0.0.0/18"
subnet = "10.0.0.0/18"
description = "Example Route with subnet /18"
},
{
subnet = "10.10.0.0/20"
subnet = "10.10.0.0/20"
description = "Example Route with subnet /20"
},
{
subnet = "10.20.0.0/24"
subnet = "10.20.0.0/24"
description = "Example Route with subnet /24"
},
]
Expand Down

0 comments on commit 30ce046

Please sign in to comment.