Skip to content

Commit b7bf33e

Browse files
apply PR suggestions
1 parent 363e809 commit b7bf33e

File tree

9 files changed

+112
-86
lines changed

9 files changed

+112
-86
lines changed

docs/data-sources/application_load_balancer.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ data "stackit_application_load_balancer" "example" {
5151
Read-Only:
5252

5353
- `description` (String) The error description contains additional helpful user information to fix the error state of the Application Load Balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP "45.135.247.139" could not be found.
54-
- `type` (String) Enum: "TYPE_UNSPECIFIED" "TYPE_INTERNAL" "TYPE_QUOTA_SECGROUP_EXCEEDED" "TYPE_QUOTA_SECGROUPRULE_EXCEEDED" "TYPE_PORT_NOT_CONFIGURED" "TYPE_FIP_NOT_CONFIGURED" "TYPE_TARGET_NOT_ACTIVE" "TYPE_METRICS_MISCONFIGURED" "TYPE_LOGS_MISCONFIGURED"
55-
The error type specifies which part of the Application Load Balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the Application Load Balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error.
54+
- `type` (String) The error type specifies which part of the Application Load Balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the Application Load Balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. Possible values are: `TYPE_UNSPECIFIED`, `TYPE_INTERNAL`, `TYPE_QUOTA_SECGROUP_EXCEEDED`, `TYPE_QUOTA_SECGROUPRULE_EXCEEDED`, `TYPE_PORT_NOT_CONFIGURED`, `TYPE_FIP_NOT_CONFIGURED`, `TYPE_TARGET_NOT_ACTIVE`, `TYPE_METRICS_MISCONFIGURED`, `TYPE_LOGS_MISCONFIGURED`.
5655

5756

5857
<a id="nestedatt--listeners"></a>

docs/resources/application_load_balancer.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ resource "stackit_application_load_balancer" "example" {
127127
(var.label_key) = var.label_value
128128
}
129129
listeners = [{
130+
name = "my-listener"
130131
port = 443
131132
http = {
132133
hosts = [{
@@ -228,7 +229,7 @@ resource "stackit_application_load_balancer" "example" {
228229
- `listeners` (Attributes List) List of all listeners which will accept traffic. Limited to 20. (see [below for nested schema](#nestedatt--listeners))
229230
- `name` (String) Application Load balancer name.
230231
- `networks` (Attributes Set) List of networks that listeners and targets reside in. (see [below for nested schema](#nestedatt--networks))
231-
- `plan_id` (String) Service Plan configures the size of the Application Load Balancer. Possible values are: `p10`.. This list can change in the future. Therefore, this is not an enum.
232+
- `plan_id` (String) Service Plan configures the size of the Application Load Balancer e.g. 'p10'. See available plans via STACKIT CLI 'stackit beta alb plans' or API https://docs.api.stackit.cloud/documentation/alb/version/v2#tag/Project/operation/APIService_ListPlans
232233
- `project_id` (String) STACKIT project ID to which the Application Load Balancer is associated.
233234
- `target_pools` (Attributes List) List of all target pools which will be used in the Application Load Balancer. Limited to 20. (see [below for nested schema](#nestedatt--target_pools))
234235

@@ -255,6 +256,7 @@ resource "stackit_application_load_balancer" "example" {
255256
Required:
256257

257258
- `http` (Attributes) Configuration for HTTP traffic. (see [below for nested schema](#nestedatt--listeners--http))
259+
- `name` (String) Unique name for the listener
258260
- `port` (Number) Port number on which the listener receives incoming traffic.
259261
- `protocol` (String) Protocol is the highest network protocol we understand to load balance. Possible values are: `PROTOCOL_UNSPECIFIED`, `PROTOCOL_HTTP`, `PROTOCOL_HTTPS`.
260262

@@ -263,10 +265,6 @@ Optional:
263265
- `https` (Attributes) Configuration for handling HTTPS traffic on this listener. (see [below for nested schema](#nestedatt--listeners--https))
264266
- `waf_config_name` (String) Enable Web Application Firewall (WAF), referenced by name. See "Application Load Balancer - Web Application Firewall API" for more information.
265267

266-
Read-Only:
267-
268-
- `name` (String) Unique name for the listener
269-
270268
<a id="nestedatt--listeners--http"></a>
271269
### Nested Schema for `listeners.http`
272270

@@ -482,8 +480,7 @@ Required:
482480
Read-Only:
483481

484482
- `description` (String) The error description contains additional helpful user information to fix the error state of the Application Load Balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP "45.135.247.139" could not be found.
485-
- `type` (String) Enum: Possible values are: `TYPE_UNSPECIFIED`, `TYPE_INTERNAL`, `TYPE_QUOTA_SECGROUP_EXCEEDED`, `TYPE_QUOTA_SECGROUPRULE_EXCEEDED`, `TYPE_PORT_NOT_CONFIGURED`, `TYPE_FIP_NOT_CONFIGURED`, `TYPE_TARGET_NOT_ACTIVE`, `TYPE_METRICS_MISCONFIGURED`, `TYPE_LOGS_MISCONFIGURED`.
486-
The error type specifies which part of the Application Load Balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the Application Load Balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error.
483+
- `type` (String) The error type specifies which part of the Application Load Balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the Application Load Balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. Possible values are: `TYPE_UNSPECIFIED`, `TYPE_INTERNAL`, `TYPE_QUOTA_SECGROUP_EXCEEDED`, `TYPE_QUOTA_SECGROUPRULE_EXCEEDED`, `TYPE_PORT_NOT_CONFIGURED`, `TYPE_FIP_NOT_CONFIGURED`, `TYPE_TARGET_NOT_ACTIVE`, `TYPE_METRICS_MISCONFIGURED`, `TYPE_LOGS_MISCONFIGURED`.
487484

488485

489486
<a id="nestedatt--load_balancer_security_group"></a>

examples/resources/stackit_application_load_balancer/resource.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ resource "stackit_application_load_balancer" "example" {
108108
(var.label_key) = var.label_value
109109
}
110110
listeners = [{
111+
name = "my-listener"
111112
port = 443
112113
http = {
113114
hosts = [{

stackit/internal/services/alb/alb_acc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ func testAccCheckALBDestroy(s *terraform.State) error {
643643
if rs.Type != "stackit_loadbalancer" {
644644
continue
645645
}
646-
// loadbalancer terraform ID: = "[project_id],[name]"
646+
// loadbalancer terraform ID: = "[project_id],[region],[name]"
647647
loadbalancerName := strings.Split(rs.Primary.ID, core.Separator)[1]
648648
loadbalancersToDestroy = append(loadbalancersToDestroy, loadbalancerName)
649649
}

stackit/internal/services/alb/applicationloadbalancer/datasource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (r *albDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, re
6868
"region": "The resource region. If not defined, the provider region is used.",
6969
"disable_target_security_group_assignment": "Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.",
7070
"errors": "Reports all errors a Application Load Balancer has.",
71-
"errors.type": "Enum: " + utils.FormatPossibleValues(errorOptions...) + "\nThe error type specifies which part of the Application Load Balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the Application Load Balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error.",
71+
"errors.type": "The error type specifies which part of the Application Load Balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the Application Load Balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error. " + utils.FormatPossibleValues(errorOptions...),
7272
"errors.description": "The error description contains additional helpful user information to fix the error state of the Application Load Balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP \"45.135.247.139\" could not be found.",
7373
"external_address": "The external IP address where this Application Load Balancer is exposed. Not changeable after creation.",
7474
"labels": "Labels represent user-defined metadata as key-value pairs. Label count cannot exceed 64 per ALB.",

0 commit comments

Comments
 (0)