Skip to content

Commit

Permalink
updated docs and examples for vpn gateway and gateway connections
Browse files Browse the repository at this point in the history
  • Loading branch information
uibm authored and hkantare committed Nov 3, 2021
1 parent 2e1406a commit 1767847
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
20 changes: 16 additions & 4 deletions website/docs/r/is_vpn_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,22 @@ Create, update, or delete a VPN gateway. For more information, about VPN gateway
The following example creates a VPN gateway:

```terraform
resource "ibm_is_vpn_gateway" "testacc_vpn_gateway" {
name = "test"
subnet = "a4ce411d-e118-4802-95ad-525e6ea0cfc9"
mode="route"
resource "ibm_is_vpc" "example" {
name = "example-vpc"
}
resource "ibm_is_subnet" "example" {
name = "example-subnet"
vpc = ibm_is_vpc.example.id
zone = "us-south-1"
ipv4_cidr_block = "10.240.0.0/24"
}
resource "ibm_is_vpn_gateway" "example" {
name = "example-vpn-gateway"
subnet = ibm_is_subnet.example.id
mode = "route"
}
```
Expand Down
42 changes: 33 additions & 9 deletions website/docs/r/is_vpn_gateway_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,37 @@ Create, update, or delete a VPN gateway connection. For more information, about
The following example creates a VPN gateway:

```terraform
resource "ibm_is_vpn_gateway_connection" "VPNGatewayConnection" {
name = "test2"
vpn_gateway = ibm_is_vpn_gateway.testacc_VPNGateway2.id
peer_address = ibm_is_vpn_gateway.testacc_VPNGateway2.public_ip_address
resource "ibm_is_vpc" "example" {
name = "example-vpc"
}
resource "ibm_is_subnet" "example" {
name = "example-subnet"
vpc = ibm_is_vpc.example.id
zone = "us-south-1"
ipv4_cidr_block = "10.240.0.0/24"
}
resource "ibm_is_subnet" "example2" {
name = "example-subnet2"
vpc = ibm_is_vpc.example.id
zone = "us-south-2"
ipv4_cidr_block = "10.240.68.0/24"
}
resource "ibm_is_vpn_gateway" "example" {
name = "example-vpn-gateway"
subnet = ibm_is_subnet.example.id
mode = "route"
}
resource "ibm_is_vpn_gateway_connection" "example" {
name = "example-vpn-gateway-connection"
vpn_gateway = ibm_is_vpn_gateway.example.id
peer_address = ibm_is_vpn_gateway.example.public_ip_address
preshared_key = "VPNDemoPassword"
local_cidrs = [ibm_is_subnet.testacc_subnet2.ipv4_cidr_block]
peer_cidrs = [ibm_is_subnet.testacc_subnet1.ipv4_cidr_block]
local_cidrs = [ibm_is_subnet.example.ipv4_cidr_block]
peer_cidrs = [ibm_is_subnet.example2.ipv4_cidr_block]
}
```
Expand All @@ -35,17 +59,17 @@ The `ibm_is_vpn_gateway_connection` resource provides the following [Timeouts](h
## Argument reference
Review the argument references that you can specify for your resource.

- `action` - (Optional, String) Dead peer detection actions. Supported values are **restart**, **clear**, **hold**, or **none**. Default value is `none`.
- `action` - (Optional, String) Dead peer detection actions. Supported values are **restart**, **clear**, **hold**, or **none**. Default value is `restart`.
- `admin_state_up` - (Optional, Bool) The VPN gateway connection status. Default value is **false**. If set to false, the VPN gateway connection is shut down.
- `ike_policy` - (Optional, String) The ID of the IKE policy.
- `interval` - (Optional, Integer) Dead peer detection interval in seconds. Default value is 30.
- `interval` - (Optional, Integer) Dead peer detection interval in seconds. Default value is 2.
- `ipsec_policy` - (Optional, String) The ID of the IPSec policy.
- `local_cidrs` - (Optional, Forces new resource, List) List of local CIDRs for this resource.
- `name` - (Required, String) The name of the VPN gateway connection.
- `peer_cidrs` - (Optional, Forces new resource, List) List of peer CIDRs for this resource.
- `peer_address` - (Required, String) The IP address of the peer VPN gateway.
- `preshared_key` - (Required, Forces new resource, String) The preshared key.
- `timeout` - (Optional, Integer) Dead peer detection timeout in seconds. Default value is 120.
- `timeout` - (Optional, Integer) Dead peer detection timeout in seconds. Default value is 10.
- `vpn_gateway` - (Required, Forces new resource, String) The unique identifier of the VPN gateway.

## Attribute reference
Expand Down

0 comments on commit 1767847

Please sign in to comment.