Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/data-sources/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ data "stackit_loadbalancer" "example" {
- `name` (String) Load balancer name.
- `project_id` (String) STACKIT project ID to which the Load Balancer is associated.

### Optional

- `region` (String) The resource region. If not defined, the provider region is used.

### Read-Only

- `external_address` (String) External Load Balancer IP address where this Load Balancer is exposed.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","`name`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","region","`name`".
- `listeners` (Attributes List) List of all listeners which will accept traffic. Limited to 20. (see [below for nested schema](#nestedatt--listeners))
- `networks` (Attributes List) List of networks that listeners and targets reside in. (see [below for nested schema](#nestedatt--networks))
- `options` (Attributes) Defines any optional functionality you want to have enabled on your load balancer. (see [below for nested schema](#nestedatt--options))
Expand Down
17 changes: 10 additions & 7 deletions docs/resources/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ resource "stackit_network_interface" "nic" {
network_id = stackit_network.example_network.network_id
}

# Create a public IP and assign it to the network interface
# Create a public IP for the load balancer
resource "stackit_public_ip" "public-ip" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_interface_id = stackit_network_interface.nic.network_interface_id
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
lifecycle {
ignore_changes = [network_interface_id]
}
}

# Create a key pair for accessing the server instance
Expand All @@ -48,7 +50,7 @@ resource "stackit_key_pair" "keypair" {
}

# Create a server instance
resource "stackit_server" "boot-from-volume" {
resource "stackit_server" "boot-from-image" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-server"
boot_volume = {
Expand All @@ -64,7 +66,7 @@ resource "stackit_server" "boot-from-volume" {
# Attach the network interface to the server
resource "stackit_server_network_interface_attach" "nic-attachment" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
server_id = stackit_server.boot-from-volume.server_id
server_id = stackit_server.boot-from-image.server_id
network_interface_id = stackit_network_interface.nic.network_interface_id
}

Expand All @@ -78,7 +80,7 @@ resource "stackit_loadbalancer" "example" {
target_port = 80
targets = [
{
display_name = "example-target"
display_name = stackit_server.boot-from-image.name
ip = stackit_network_interface.nic.ipv4
}
]
Expand Down Expand Up @@ -127,10 +129,11 @@ resource "stackit_loadbalancer" "example" {

- `external_address` (String) External Load Balancer IP address where this Load Balancer is exposed.
- `options` (Attributes) Defines any optional functionality you want to have enabled on your load balancer. (see [below for nested schema](#nestedatt--options))
- `region` (String) The resource region. If not defined, the provider region is used.

### Read-Only

- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","`name`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","region","`name`".
- `private_address` (String) Transient private Load Balancer IP address. It can change any time.

<a id="nestedatt--listeners"></a>
Expand Down
40 changes: 0 additions & 40 deletions docs/resources/loadbalancer_credential.md

This file was deleted.

6 changes: 5 additions & 1 deletion docs/resources/loadbalancer_observability_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ resource "stackit_loadbalancer_observability_credential" "example" {
- `project_id` (String) STACKIT project ID to which the load balancer observability credential is associated.
- `username` (String) The password for the observability service (e.g. Argus) where the logs/metrics will be pushed into.

### Optional

- `region` (String) The resource region. If not defined, the provider region is used.

### Read-Only

- `credentials_ref` (String) The credentials reference is used by the Load Balancer to define which credentials it will use.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","`credentials_ref`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","region","`credentials_ref`".
14 changes: 8 additions & 6 deletions examples/resources/stackit_loadbalancer/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ resource "stackit_network_interface" "nic" {
network_id = stackit_network.example_network.network_id
}

# Create a public IP and assign it to the network interface
# Create a public IP for the load balancer
resource "stackit_public_ip" "public-ip" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_interface_id = stackit_network_interface.nic.network_interface_id
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
lifecycle {
ignore_changes = [network_interface_id]
}
}

# Create a key pair for accessing the server instance
Expand All @@ -29,7 +31,7 @@ resource "stackit_key_pair" "keypair" {
}

# Create a server instance
resource "stackit_server" "boot-from-volume" {
resource "stackit_server" "boot-from-image" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-server"
boot_volume = {
Expand All @@ -45,7 +47,7 @@ resource "stackit_server" "boot-from-volume" {
# Attach the network interface to the server
resource "stackit_server_network_interface_attach" "nic-attachment" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
server_id = stackit_server.boot-from-volume.server_id
server_id = stackit_server.boot-from-image.server_id
network_interface_id = stackit_network_interface.nic.network_interface_id
}

Expand All @@ -59,7 +61,7 @@ resource "stackit_loadbalancer" "example" {
target_port = 80
targets = [
{
display_name = "example-target"
display_name = stackit_server.boot-from-image.name
ip = stackit_network_interface.nic.ipv4
}
]
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.13.0
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.21.1
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.18.0
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.0
github.com/stackitcloud/stackit-sdk-go/services/logme v0.21.0
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.21.0
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.18.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ github.com/stackitcloud/stackit-sdk-go/services/iaas v0.21.1 h1:ZFFJr54FcYTUBjE+
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.21.1/go.mod h1:9p5IIdOKOM5/DIjbenKrWvz6GlSps4jsPJZkH7QJuRU=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.18.0 h1:7nNjIIcBQRDVnW4NL7+R8DaCKEqxxxsmVsgOVe50ZMU=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.18.0/go.mod h1:UFujBT+JlNvl6JNrY96UpLGqp+lZTD+JWL7siqhGPlw=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.0 h1:z2p0OobEAgSE5bQr+KR+4Y1QTvDbSC2a7w2eCV/oSp4=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.0/go.mod h1:x0jgrL+/K2cE4BvcIQByFUf0nOPVZRqq5Z074kjjr64=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.21.0 h1:P7bxaVzkZPGMWItLynKIvc88Xh6jCnK4dPTTT+L607o=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.21.0/go.mod h1:os4Kp2+jkMUJ2dZtgU9A91N3EJSw3MMh2slxgK1609g=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.21.0 h1:ks1i+cfD/YPRss//4aq6uvxbLvUwb5QvcUrOPeboLFY=
Expand Down
Loading