-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add examples and generate docs
- Loading branch information
Showing
7 changed files
with
208 additions
and
4 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,40 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_virtual_ip Data Source - stackit" | ||
subcategory: "" | ||
description: |- | ||
Virtual IP data source schema. Must have a region specified in the provider configuration. | ||
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources. | ||
--- | ||
|
||
# stackit_virtual_ip (Data Source) | ||
|
||
Virtual IP data source schema. Must have a `region` specified in the provider configuration. | ||
|
||
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "stackit_virtual_ip" "virtual_ip" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
virtual_ip_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `network_id` (String) The network area ID to which the virtual IP is associated. | ||
- `project_id` (String) STACKIT organization ID to which the network area is associated. | ||
- `virtual_ip_id` (String) The virtual IP ID. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Terraform's internal data source ID. It is structured as "`project_id`,`network_id`,`virtual_ip_id`". | ||
- `ip` (String) The IP address of the virtual IP. | ||
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container | ||
- `name` (String) The name of virtual IP. |
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,53 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_virtual_ip Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
Virtual IP resource schema. Must have a region specified in the provider configuration. | ||
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources. | ||
--- | ||
|
||
# stackit_virtual_ip (Resource) | ||
|
||
Virtual IP resource schema. Must have a `region` specified in the provider configuration. | ||
|
||
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
// Create a network | ||
resource "stackit_network" "network" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
name = "example-network" | ||
} | ||
// Create a virtual IP on the network | ||
resource "stackit_virtual_ip" "virtual_ip" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
name = "example-virtual-ip" | ||
labels = { | ||
"key" = "value" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `network_id` (String) The network ID to which the virtual IP is associated. | ||
- `project_id` (String) STACKIT project ID to which the virtual IP is associated. | ||
|
||
### Optional | ||
|
||
- `ip` (String) The IP address of the virtual IP. | ||
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container | ||
- `name` (String) The name of virtual IP. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`network_id`,`virtual_ip_id`". | ||
- `virtual_ip_id` (String) The virtual IP ID. |
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,63 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "stackit_virtual_ip_member Resource - stackit" | ||
subcategory: "" | ||
description: |- | ||
Virtual IP member resource schema. This resource allows you to add a network interface as a member of a virtual IP. Must have a region specified in the provider configuration. | ||
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources. | ||
--- | ||
|
||
# stackit_virtual_ip_member (Resource) | ||
|
||
Virtual IP member resource schema. This resource allows you to add a network interface as a member of a virtual IP. Must have a `region` specified in the provider configuration. | ||
|
||
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
// Create a network | ||
resource "stackit_network" "network" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
name = "example-network" | ||
} | ||
// Create a network interface | ||
resource "stackit_network_interface" "network_interface" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
name = "example-network-interface" | ||
} | ||
// Create a virtual IP on the network | ||
resource "stackit_virtual_ip" "virtual_ip" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
name = "example-virtual-ip" | ||
labels = { | ||
"key" = "value" | ||
} | ||
} | ||
// Add a network interface as a member of the virtual IP | ||
resource "stackit_virtual_ip_member" "virtual_ip_member" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
virtual_ip_id = stackit_virtual_ip.vip.virtual_ip_id | ||
network_interface_id = stackit_network_interface.nic_1.network_interface_id | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `network_id` (String) The network ID to which the virtual IP is associated. | ||
- `network_interface_id` (String) The ID of the network interface to add as a member of the virtual IP. | ||
- `project_id` (String) STACKIT project ID to which the virtual IP is associated. | ||
- `virtual_ip_id` (String) The virtual IP ID. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`network_id`,`virtual_ip_id`". |
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,5 @@ | ||
data "stackit_virtual_ip" "virtual_ip" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
virtual_ip_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
} |
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,15 @@ | ||
// Create a network | ||
resource "stackit_network" "network" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
name = "example-network" | ||
} | ||
|
||
// Create a virtual IP on the network | ||
resource "stackit_virtual_ip" "virtual_ip" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
name = "example-virtual-ip" | ||
labels = { | ||
"key" = "value" | ||
} | ||
} |
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 @@ | ||
// Create a network | ||
resource "stackit_network" "network" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
name = "example-network" | ||
} | ||
|
||
// Create a network interface | ||
resource "stackit_network_interface" "network_interface" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
name = "example-network-interface" | ||
} | ||
|
||
// Create a virtual IP on the network | ||
resource "stackit_virtual_ip" "virtual_ip" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
name = "example-virtual-ip" | ||
labels = { | ||
"key" = "value" | ||
} | ||
} | ||
|
||
// Add a network interface as a member of the virtual IP | ||
resource "stackit_virtual_ip_member" "virtual_ip_member" { | ||
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
network_id = stackit_network.network.network_id | ||
virtual_ip_id = stackit_virtual_ip.vip.virtual_ip_id | ||
network_interface_id = stackit_network_interface.nic_1.network_interface_id | ||
} |