Skip to content

Commit

Permalink
Add vkcs_dc_conntrack_helper and vkcs_dc_ip_port_forwarding resources
Browse files Browse the repository at this point in the history
  • Loading branch information
schirevko committed Jun 18, 2024
1 parent bef85fa commit f393d3a
Show file tree
Hide file tree
Showing 80 changed files with 1,641 additions and 188 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ description: |-

# VKCS Provider's changelog

### v0.7.5 (unreleased)
#### v0.8.0 (unreleased)
- Add vkcs_dc_conntrack_helper resource
- Add vkcs_dc_ip_port_forwarding resource
- Added waiting for roles to be assigned to instance when creating a db cluster.

#### v0.7.4
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/dc_bgp_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Manages a direct connect BGP instance resource.
## Example Usage
```terraform
resource "vkcs_dc_bgp_instance" "dc_bgp_instance" {
name = "tf-example"
description = "tf-example-description"
dc_router_id = vkcs_dc_router.dc_router.id
bgp_router_id = "192.168.1.2"
asn = 12345
ecmp_enabled = true
graceful_restart = true
name = "tf-example"
description = "tf-example-description"
dc_router_id = vkcs_dc_router.dc_router.id
bgp_router_id = "192.168.1.2"
asn = 12345
ecmp_enabled = true
graceful_restart = true
}
```

Expand Down Expand Up @@ -61,7 +61,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect BGP instance can be imported using the `name`, e.g.
Direct connect BGP instance can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_bgp_instance.mydcbgpinstance e73496b2-e476-4536-9167-af24d18e1486
```
14 changes: 7 additions & 7 deletions docs/resources/dc_bgp_neighbor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Manages a direct connect BGP neighbor resource.
## Example Usage
```terraform
resource "vkcs_dc_bgp_neighbor" "dc_bgp_neighbor" {
name = "tf-example"
add_paths = "on"
description = "tf-example-description"
dc_bgp_id = vkcs_dc_bgp_instance.dc_bgp_instance.id
remote_asn = 1
remote_ip = "192.168.1.3"
name = "tf-example"
add_paths = "on"
description = "tf-example-description"
dc_bgp_id = vkcs_dc_bgp_instance.dc_bgp_instance.id
remote_asn = 1
remote_ip = "192.168.1.3"
}
```

Expand Down Expand Up @@ -64,7 +64,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect BGP neighbor can be imported using the `name`, e.g.
Direct connect BGP neighbor can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_bgp_neighbor.mydcbgpneighbor 73096185-f200-4790-8095-962617b755f8
```
12 changes: 6 additions & 6 deletions docs/resources/dc_bgp_static_announce.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Manages a direct connect BGP Static Announce resource.
## Example Usage
```terraform
resource "vkcs_dc_bgp_static_announce" "dc_bgp_static_announce" {
name = "tf-example"
description = "tf-example-description"
dc_bgp_id = vkcs_dc_bgp_instance.dc_bgp_instance.id
network = "192.168.1.0/24"
gateway = "192.168.1.3"
name = "tf-example"
description = "tf-example-description"
dc_bgp_id = vkcs_dc_bgp_instance.dc_bgp_instance.id
network = "192.168.1.0/24"
gateway = "192.168.1.3"
}
```

Expand Down Expand Up @@ -53,7 +53,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect BGP instance can be imported using the `name`, e.g.
Direct connect BGP instance can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_bgp_static_announce.mydcbgpstaticannounce 8a1d9812-305b-468f-8ae5-833e181b01a8
```
58 changes: 58 additions & 0 deletions docs/resources/dc_conntrack_helper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
subcategory: "Direct Connect"
layout: "vkcs"
page_title: "vkcs: vkcs_dc_conntrack_helper"
description: |-
Manages a direct connect conntrack helper resource within VKCS.
---

# vkcs_dc_conntrack_helper

Manages a direct connect conntrack helper resource.

~> **Note:** This resource requires Sprut SDN to be enabled in your project.

## Example Usage
```terraform
resource "vkcs_dc_conntrack_helper" "dc-conntrack-helper" {
dc_router_id = vkcs_dc_router.dc_router.id
name = "tf-example"
description = "tf-example-description"
helper = "ftp"
protocol = "tcp"
port = 21
}
```

## Argument Reference
- `dc_router_id` **required** *string* → Direct Connect Router ID. Changing this creates a new resource

- `helper` **required** *string* → Helper type. Must be one of: "ftp".

- `port` **required** *number* → Network port for conntrack target rule.

- `protocol` **required** *string* → Protocol. Must be one of: "tcp".

- `description` optional *string* → Description of the conntrack helper

- `name` optional *string* → Name of the conntrack helper

- `region` optional *string* → The `region` to fetch availability zones from, defaults to the provider's `region`.


## Attributes Reference
In addition to all arguments above, the following attributes are exported:
- `created_at` *string* → Creation timestamp

- `id` *string* → ID of the resource

- `updated_at` *string* → Update timestamp



## Import

Direct connect conntrack helper can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_conntrack_helper.mydcconntrackhelper 52a0a638-0a75-4a15-b3f3-d5c9f953e93f
```
2 changes: 1 addition & 1 deletion docs/resources/dc_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect interface can be imported using the `name`, e.g.
Direct connect interface can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_interface.mydcinterface 438d7479-d95f-4afc-b85e-eb8cd130a99f
```
63 changes: 63 additions & 0 deletions docs/resources/dc_ip_port_forwarding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
subcategory: "Direct Connect"
layout: "vkcs"
page_title: "vkcs: vkcs_dc_ip_port_forwarding"
description: |-
Manages a direct connect IP port forwarding resource within VKCS.
---

# vkcs_dc_ip_port_forwarding

Manages a direct connect ip port forwarding resource.

~> **Note:** This resource requires Sprut SDN to be enabled in your project.

## Example Usage
```terraform
resource "vkcs_dc_ip_port_forwarding" "dc-ip-port-forwarding" {
dc_interface_id = vkcs_dc_interface.dc_interface.id
name = "tf-example"
description = "tf-example-description"
protocol = "udp"
to_destination = "172.17.20.30"
}
```

## Argument Reference
- `dc_interface_id` **required** *string* → Direct Connect Interface ID. Changing this creates a new resource

- `protocol` **required** *string* → Protocol. Must be one of: "tcp", "udp", "any".

- `to_destination` **required** *string* → IP Address of forwarding's destination.

- `description` optional *string* → Description of the conntrack helper

- `destination` optional *string* → Destination address selector.

- `name` optional *string* → Name of the conntrack helper

- `port` optional *number* → Port selector.

- `region` optional *string* → The `region` to fetch availability zones from, defaults to the provider's `region`.

- `source` optional *string* → Source address selector.

- `to_port` optional *number* → Destination port selector.


## Attributes Reference
In addition to all arguments above, the following attributes are exported:
- `created_at` *string* → Creation timestamp

- `id` *string* → ID of the resource

- `updated_at` *string* → Update timestamp



## Import

Direct connect IP port forwarding can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_ip_port_forwarding.mydcipportforwarding 659be09e-a10e-4762-b729-7a003af40f29
```
8 changes: 4 additions & 4 deletions docs/resources/dc_router.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Manages a direct connect router resource.
```terraform
resource "vkcs_dc_router" "dc_router" {
availability_zone = "GZ1"
flavor = "standard"
name = "tf-example"
description = "tf-example-description"
flavor = "standard"
name = "tf-example"
description = "tf-example-description"
}
```

Expand Down Expand Up @@ -48,7 +48,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect router can be imported using the `name`, e.g.
Direct connect router can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_router.mydcrouter b50b32fc-16e2-4cb0-acdb-638c865c4242
```
14 changes: 7 additions & 7 deletions docs/resources/dc_static_route.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Manages a direct connect BGP Static Announce resource.
## Example Usage
```terraform
resource "vkcs_dc_static_route" "dc_static_route" {
name = "tf-example"
description = "tf-example-description"
dc_router_id = vkcs_dc_router.dc_router.id
network = "192.168.1.0/24"
gateway = "192.168.1.3"
metric = 1
name = "tf-example"
description = "tf-example-description"
dc_router_id = vkcs_dc_router.dc_router.id
network = "192.168.1.0/24"
gateway = "192.168.1.3"
metric = 1
}
```

Expand Down Expand Up @@ -54,7 +54,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect BGP instance can be imported using the `name`, e.g.
Direct connect BGP instance can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_static_route.mydcstaticroute 2ee73dd1-d52a-4c3f-9041-c60900c154a4
```
14 changes: 7 additions & 7 deletions docs/resources/dc_vrrp.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Manages a direct connect VRRP resource.
## Example Usage
```terraform
resource "vkcs_dc_vrrp" "dc_vrrp" {
name = "tf-example"
description = "tf-example-description"
group_id = 100
network_id = vkcs_networking_network.app.id
subnet_id = vkcs_networking_subnet.app.id
advert_interval = 1
name = "tf-example"
description = "tf-example-description"
group_id = 100
network_id = vkcs_networking_network.app.id
subnet_id = vkcs_networking_subnet.app.id
advert_interval = 1
}
```

Expand Down Expand Up @@ -58,7 +58,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect vrrp can be imported using the `name`, e.g.
Direct connect vrrp can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_vrrp.mydcvrrp f6149e79-b441-4327-90fc-7653acbc204c
```
10 changes: 5 additions & 5 deletions docs/resources/dc_vrrp_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Manages a direct connect VRRP address resource.
## Example Usage
```terraform
resource "vkcs_dc_vrrp_address" "dc_vrrp_address" {
name = "tf-example"
description = "tf-example-description"
dc_vrrp_id = vkcs_dc_vrrp.dc_vrrp.id
ip_address = "192.168.199.42"
name = "tf-example"
description = "tf-example-description"
dc_vrrp_id = vkcs_dc_vrrp.dc_vrrp.id
ip_address = "192.168.199.42"
}
```

Expand Down Expand Up @@ -50,7 +50,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect vrrp address can be imported using the `name`, e.g.
Direct connect vrrp address can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_vrrp_address.mydcvrrpaddress aa00d2a9-db9c-4976-898b-fcabb9f49505
```
16 changes: 8 additions & 8 deletions docs/resources/dc_vrrp_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Manages a direct connect VRRP interface resource.
## Example Usage
```terraform
resource "vkcs_dc_vrrp_interface" "dc_vrrp_interface" {
name = "tf-example"
description = "tf-example-description"
dc_vrrp_id = vkcs_dc_vrrp.dc_vrrp.id
dc_interface_id = vkcs_dc_interface.dc_interface.id
priority = 100
preempt = true
master = true
name = "tf-example"
description = "tf-example-description"
dc_vrrp_id = vkcs_dc_vrrp.dc_vrrp.id
dc_interface_id = vkcs_dc_interface.dc_interface.id
priority = 100
preempt = true
master = true
}
```

Expand Down Expand Up @@ -57,7 +57,7 @@ In addition to all arguments above, the following attributes are exported:

## Import

Direct connect vrrp interface can be imported using the `name`, e.g.
Direct connect vrrp interface can be imported using the `id`, e.g.
```shell
terraform import vkcs_dc_vrrp_interface.mydcvrrpinterface 3f071a6d-3d21-435c-83f7-11b276f318f0
```
6 changes: 3 additions & 3 deletions examples/dc/bgp_instance/base-router.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "vkcs_dc_router" "dc_router" {
availability_zone = "GZ1"
flavor = "standard"
name = "tf-example"
description = "tf-example-description"
flavor = "standard"
name = "tf-example"
description = "tf-example-description"
}
14 changes: 7 additions & 7 deletions examples/dc/bgp_instance/main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
resource "vkcs_dc_bgp_instance" "dc_bgp_instance" {
name = "tf-example"
description = "tf-example-description"
dc_router_id = vkcs_dc_router.dc_router.id
bgp_router_id = "192.168.1.2"
asn = 12345
ecmp_enabled = true
graceful_restart = true
name = "tf-example"
description = "tf-example-description"
dc_router_id = vkcs_dc_router.dc_router.id
bgp_router_id = "192.168.1.2"
asn = 12345
ecmp_enabled = true
graceful_restart = true
}
Loading

0 comments on commit f393d3a

Please sign in to comment.