diff --git a/docs/data-sources/ske_cluster.md b/docs/data-sources/ske_cluster.md
index c0ead7d66..d04e765f2 100644
--- a/docs/data-sources/ske_cluster.md
+++ b/docs/data-sources/ske_cluster.md
@@ -69,6 +69,7 @@ Read-Only:
Read-Only:
- `acl` (Attributes) Cluster access control configuration (see [below for nested schema](#nestedatt--extensions--acl))
+- `application_load_balancer` (Attributes) Application Load Balancer extension. (see [below for nested schema](#nestedatt--extensions--application_load_balancer))
- `argus` (Attributes, Deprecated) A single argus block as defined below. This field is deprecated and will be removed 06 January 2026. (see [below for nested schema](#nestedatt--extensions--argus))
- `dns` (Attributes) DNS extension configuration (see [below for nested schema](#nestedatt--extensions--dns))
- `observability` (Attributes) A single observability block as defined below. (see [below for nested schema](#nestedatt--extensions--observability))
@@ -82,6 +83,14 @@ Read-Only:
- `enabled` (Boolean) Is ACL enabled?
+
+### Nested Schema for `extensions.application_load_balancer`
+
+Read-Only:
+
+- `enabled` (Boolean) Enables the application load balancer extension.
+
+
### Nested Schema for `extensions.argus`
diff --git a/docs/resources/ske_cluster.md b/docs/resources/ske_cluster.md
index b1fc8176a..218be5e4c 100644
--- a/docs/resources/ske_cluster.md
+++ b/docs/resources/ske_cluster.md
@@ -135,6 +135,7 @@ Optional:
Optional:
- `acl` (Attributes) Cluster access control configuration. (see [below for nested schema](#nestedatt--extensions--acl))
+- `application_load_balancer` (Attributes) Application Load Balancer extension. (see [below for nested schema](#nestedatt--extensions--application_load_balancer))
- `argus` (Attributes, Deprecated) A single argus block as defined below. This field is deprecated and will be removed 06 January 2026. (see [below for nested schema](#nestedatt--extensions--argus))
- `dns` (Attributes) DNS extension configuration (see [below for nested schema](#nestedatt--extensions--dns))
- `observability` (Attributes) A single observability block as defined below. (see [below for nested schema](#nestedatt--extensions--observability))
@@ -148,6 +149,14 @@ Required:
- `enabled` (Boolean) Is ACL enabled?
+
+### Nested Schema for `extensions.application_load_balancer`
+
+Required:
+
+- `enabled` (Boolean) Enables the application load balancer extension. Note: This feature is in private preview. Enabling application load balancer extension is only possible for enabled accounts. Otherwise the request will be rejected.
+
+
### Nested Schema for `extensions.argus`
@@ -222,7 +231,7 @@ Optional:
Optional:
-- `access_scope` (String) Access scope of the control plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area.Possible values are: `PUBLIC`, `SNA`. The field is immutable!
+- `access_scope` (String) Access scope of the control plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.Possible values are: `PUBLIC`, `SNA`. The field is immutable!
## Import
diff --git a/go.mod b/go.mod
index e78461d68..725de0ac7 100644
--- a/go.mod
+++ b/go.mod
@@ -44,7 +44,7 @@ require (
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.20.0
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.11.0
- github.com/stackitcloud/stackit-sdk-go/services/ske v1.20.0
+ github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1
github.com/stackitcloud/stackit-sdk-go/services/telemetrylink v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/telemetryrouter v0.4.0
diff --git a/go.sum b/go.sum
index be2ed0801..bebe9b5d1 100644
--- a/go.sum
+++ b/go.sum
@@ -734,8 +734,8 @@ github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0 h1:TNZH
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0/go.mod h1:fXq3TmVLb4JMSve989NFFViMFoYa83s7M3hJWgN6mdQ=
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.11.0 h1:YhQ2GF+AyHVUps1iEjLj7z6OlzBzMGyD5nwHaZ0pXus=
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.11.0/go.mod h1:jMlBoXqrPNX5nXbo6oT7exalqilw1jiLPoIp4Cn0CdI=
-github.com/stackitcloud/stackit-sdk-go/services/ske v1.20.0 h1:ZgXPfaGRFYFpMSFhW+sVBfUyxY6Va1Cx0Py1nOivCLc=
-github.com/stackitcloud/stackit-sdk-go/services/ske v1.20.0/go.mod h1:TbqmZhLMofmfl+HhVl6oHYcI3zvXTm1vRjN3A/fOkM4=
+github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0 h1:eu9PhRdL2GkXpHtf4NN9YBCUYcARdvAwq+g/FW4hmi4=
+github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0/go.mod h1:TbqmZhLMofmfl+HhVl6oHYcI3zvXTm1vRjN3A/fOkM4=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1 h1:pjFVw2Tc0cSfAzmyZRiLknuKSADs7nPXNUyrM216CwQ=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
github.com/stackitcloud/stackit-sdk-go/services/telemetrylink v0.4.0 h1:RG+cZzvIb+NoVNYemvwG5UHR9qEqea6IuHVYtojeBbQ=
diff --git a/stackit/internal/services/ske/cluster/datasource.go b/stackit/internal/services/ske/cluster/datasource.go
index bd3013815..51ce810d6 100644
--- a/stackit/internal/services/ske/cluster/datasource.go
+++ b/stackit/internal/services/ske/cluster/datasource.go
@@ -327,6 +327,16 @@ func (r *clusterDataSource) Schema(_ context.Context, _ datasource.SchemaRequest
},
},
},
+ "application_load_balancer": schema.SingleNestedAttribute{
+ Description: "Application Load Balancer extension.",
+ Computed: true,
+ Attributes: map[string]schema.Attribute{
+ "enabled": schema.BoolAttribute{
+ Description: "Enables the application load balancer extension.",
+ Computed: true,
+ },
+ },
+ },
},
},
"region": schema.StringAttribute{
diff --git a/stackit/internal/services/ske/cluster/resource.go b/stackit/internal/services/ske/cluster/resource.go
index 3d4e9a594..50fd05255 100644
--- a/stackit/internal/services/ske/cluster/resource.go
+++ b/stackit/internal/services/ske/cluster/resource.go
@@ -208,18 +208,20 @@ var hibernationTypes = map[string]attr.Type{
// Struct corresponding to Model.Extensions
type extensions struct {
- Argus types.Object `tfsdk:"argus"`
- Observability types.Object `tfsdk:"observability"`
- ACL types.Object `tfsdk:"acl"`
- DNS types.Object `tfsdk:"dns"`
+ Argus types.Object `tfsdk:"argus"`
+ Observability types.Object `tfsdk:"observability"`
+ ApplicationLoadBalancer types.Object `tfsdk:"application_load_balancer"`
+ ACL types.Object `tfsdk:"acl"`
+ DNS types.Object `tfsdk:"dns"`
}
// Types corresponding to extensions
var extensionsTypes = map[string]attr.Type{
- "argus": basetypes.ObjectType{AttrTypes: argusTypes},
- "observability": basetypes.ObjectType{AttrTypes: observabilityTypes},
- "acl": basetypes.ObjectType{AttrTypes: aclTypes},
- "dns": basetypes.ObjectType{AttrTypes: dnsTypes},
+ "argus": basetypes.ObjectType{AttrTypes: argusTypes},
+ "observability": basetypes.ObjectType{AttrTypes: observabilityTypes},
+ "application_load_balancer": basetypes.ObjectType{AttrTypes: applicationLoadBalancerTypes},
+ "acl": basetypes.ObjectType{AttrTypes: aclTypes},
+ "dns": basetypes.ObjectType{AttrTypes: dnsTypes},
}
// Struct corresponding to extensions.ACL
@@ -246,6 +248,16 @@ var argusTypes = map[string]attr.Type{
"argus_instance_id": basetypes.StringType{},
}
+// Struct corresponding to extensions.applicationLoadBalancer
+type applicationLoadBalancer struct {
+ Enabled types.Bool `tfsdk:"enabled"`
+}
+
+// Types corresponding to applicationLoadBalancer
+var applicationLoadBalancerTypes = map[string]attr.Type{
+ "enabled": basetypes.BoolType{},
+}
+
// Struct corresponding to extensions.Observability
type observability struct {
Enabled types.Bool `tfsdk:"enabled"`
@@ -701,7 +713,7 @@ func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, re
},
Attributes: map[string]schema.Attribute{
"access_scope": schema.StringAttribute{
- Description: "Access scope of the control plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area." + utils.FormatPossibleValues(sdkUtils.EnumSliceToStringSlice(ske.AllowedAccessScopeEnumValues)...) + " The field is immutable!",
+ Description: "Access scope of the control plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected." + utils.FormatPossibleValues(sdkUtils.EnumSliceToStringSlice(ske.AllowedAccessScopeEnumValues)...) + " The field is immutable!",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.String{
@@ -815,6 +827,16 @@ func (r *clusterResource) Schema(_ context.Context, _ resource.SchemaRequest, re
},
},
},
+ "application_load_balancer": schema.SingleNestedAttribute{
+ Description: "Application Load Balancer extension.",
+ Optional: true,
+ Attributes: map[string]schema.Attribute{
+ "enabled": schema.BoolAttribute{
+ Description: "Enables the application load balancer extension. Note: This feature is in private preview. Enabling application load balancer extension is only possible for enabled accounts. Otherwise the request will be rejected.",
+ Required: true,
+ },
+ },
+ },
},
},
"region": schema.StringAttribute{
@@ -1448,6 +1470,19 @@ func toExtensionsPayload(ctx context.Context, m *Model) (*ske.Extension, error)
}
}
+ var skeApplicationLoadBalancer *ske.ApplicationLoadBalancer
+ if !(ex.ApplicationLoadBalancer.IsNull() || ex.ApplicationLoadBalancer.IsUnknown()) {
+ applicationLoadBalancer := applicationLoadBalancer{}
+ diags = ex.ApplicationLoadBalancer.As(ctx, &applicationLoadBalancer, basetypes.ObjectAsOptions{})
+ if diags.HasError() {
+ return nil, fmt.Errorf("converting extensions.applicationLoadBalancer object: %v", diags.Errors())
+ }
+
+ skeApplicationLoadBalancer = &ske.ApplicationLoadBalancer{
+ Enabled: applicationLoadBalancer.Enabled.ValueBool(),
+ }
+ }
+
var skeDNS *ske.DNS
if !(ex.DNS.IsNull() || ex.DNS.IsUnknown()) {
dns := dns{}
@@ -1469,9 +1504,10 @@ func toExtensionsPayload(ctx context.Context, m *Model) (*ske.Extension, error)
}
return &ske.Extension{
- Acl: skeAcl,
- Observability: skeObservability,
- Dns: skeDNS,
+ Acl: skeAcl,
+ Observability: skeObservability,
+ ApplicationLoadBalancer: skeApplicationLoadBalancer,
+ Dns: skeDNS,
}, nil
}
@@ -1943,7 +1979,7 @@ func getMaintenanceTimes(ctx context.Context, cl *ske.Cluster, m *Model) (startT
return startTime, endTime, nil
}
-func checkDisabledExtensions(ctx context.Context, ex *extensions) (aclDisabled, observabilityDisabled, dnsDisabled bool, err error) {
+func checkDisabledExtensions(ctx context.Context, ex *extensions) (aclDisabled, observabilityDisabled, dnsDisabled, applicationLoadBalancerDisabled bool, err error) {
var diags diag.Diagnostics
acl := acl{}
if ex.ACL.IsNull() {
@@ -1951,7 +1987,7 @@ func checkDisabledExtensions(ctx context.Context, ex *extensions) (aclDisabled,
} else {
diags = ex.ACL.As(ctx, &acl, basetypes.ObjectAsOptions{})
if diags.HasError() {
- return false, false, false, fmt.Errorf("converting extensions.acl object: %v", diags.Errors())
+ return false, false, false, false, fmt.Errorf("converting extensions.acl object: %v", diags.Errors())
}
}
@@ -1962,14 +1998,14 @@ func checkDisabledExtensions(ctx context.Context, ex *extensions) (aclDisabled,
argus := argus{}
diags = ex.Argus.As(ctx, &argus, basetypes.ObjectAsOptions{})
if diags.HasError() {
- return false, false, false, fmt.Errorf("converting extensions.argus object: %v", diags.Errors())
+ return false, false, false, false, fmt.Errorf("converting extensions.argus object: %v", diags.Errors())
}
observability.Enabled = argus.Enabled
observability.InstanceId = argus.ArgusInstanceId
} else {
diags = ex.Observability.As(ctx, &observability, basetypes.ObjectAsOptions{})
if diags.HasError() {
- return false, false, false, fmt.Errorf("converting extensions.observability object: %v", diags.Errors())
+ return false, false, false, false, fmt.Errorf("converting extensions.observability object: %v", diags.Errors())
}
}
@@ -1979,11 +2015,21 @@ func checkDisabledExtensions(ctx context.Context, ex *extensions) (aclDisabled,
} else {
diags = ex.DNS.As(ctx, &dns, basetypes.ObjectAsOptions{})
if diags.HasError() {
- return false, false, false, fmt.Errorf("converting extensions.dns object: %v", diags.Errors())
+ return false, false, false, false, fmt.Errorf("converting extensions.dns object: %v", diags.Errors())
}
}
- return !acl.Enabled.ValueBool(), !observability.Enabled.ValueBool(), !dns.Enabled.ValueBool(), nil
+ applicationLoadBalancer := applicationLoadBalancer{}
+ if ex.ApplicationLoadBalancer.IsNull() {
+ applicationLoadBalancer.Enabled = types.BoolValue(false)
+ } else {
+ diags = ex.ApplicationLoadBalancer.As(ctx, &applicationLoadBalancer, basetypes.ObjectAsOptions{})
+ if diags.HasError() {
+ return false, false, false, false, fmt.Errorf("converting extensions.applicationLoadBalancer object: %v", diags.Errors())
+ }
+ }
+
+ return !acl.Enabled.ValueBool(), !observability.Enabled.ValueBool(), !dns.Enabled.ValueBool(), !applicationLoadBalancer.Enabled.ValueBool(), nil
}
func mapExtensions(ctx context.Context, cl *ske.Cluster, m *Model) error {
@@ -2010,11 +2056,11 @@ func mapExtensions(ctx context.Context, cl *ske.Cluster, m *Model) error {
// If we parse that object into the terraform model, it will produce an inconsistent result after apply
// error
- aclDisabled, observabilityDisabled, dnsDisabled, err := checkDisabledExtensions(ctx, &ex)
+ aclDisabled, observabilityDisabled, dnsDisabled, applicationLoadBalancerDisabled, err := checkDisabledExtensions(ctx, &ex)
if err != nil {
return fmt.Errorf("checking if extensions are disabled: %w", err)
}
- disabledExtensions := aclDisabled && observabilityDisabled && dnsDisabled
+ disabledExtensions := aclDisabled && observabilityDisabled && dnsDisabled && applicationLoadBalancerDisabled
if skeUtils.IsEmptyExtension(cl.Extensions) && (disabledExtensions || m.Extensions.IsNull()) {
if m.Extensions.Attributes() == nil {
@@ -2089,6 +2135,20 @@ func mapExtensions(ctx context.Context, cl *ske.Cluster, m *Model) error {
}
}
+ applicationLoadBalancerExtension := types.ObjectNull(applicationLoadBalancerTypes)
+ if cl.Extensions.ApplicationLoadBalancer != nil {
+ applicationLoadBalancerValues := map[string]attr.Value{
+ "enabled": types.BoolValue(cl.Extensions.ApplicationLoadBalancer.Enabled),
+ }
+
+ applicationLoadBalancerExtension, diags = types.ObjectValue(applicationLoadBalancerTypes, applicationLoadBalancerValues)
+ if diags.HasError() {
+ return fmt.Errorf("creating applicationLoadBalancer: %w", core.DiagsToError(diags))
+ }
+ } else if applicationLoadBalancerDisabled && !ex.ApplicationLoadBalancer.IsNull() {
+ applicationLoadBalancerExtension = ex.ApplicationLoadBalancer
+ }
+
dnsExtension := types.ObjectNull(dnsTypes)
if cl.Extensions.Dns != nil {
enabled := types.BoolValue(cl.Extensions.Dns.Enabled)
@@ -2116,17 +2176,19 @@ func mapExtensions(ctx context.Context, cl *ske.Cluster, m *Model) error {
var extensionsValues map[string]attr.Value
if utils.IsUndefined(ex.Argus) {
extensionsValues = map[string]attr.Value{
- "acl": aclExtension,
- "argus": types.ObjectNull(argusTypes),
- "observability": observabilityExtension,
- "dns": dnsExtension,
+ "acl": aclExtension,
+ "argus": types.ObjectNull(argusTypes),
+ "observability": observabilityExtension,
+ "application_load_balancer": applicationLoadBalancerExtension,
+ "dns": dnsExtension,
}
} else {
extensionsValues = map[string]attr.Value{
- "acl": aclExtension,
- "argus": argusExtension,
- "observability": types.ObjectNull(observabilityTypes),
- "dns": dnsExtension,
+ "acl": aclExtension,
+ "argus": argusExtension,
+ "observability": types.ObjectNull(observabilityTypes),
+ "application_load_balancer": applicationLoadBalancerExtension,
+ "dns": dnsExtension,
}
}
diff --git a/stackit/internal/services/ske/cluster/resource_test.go b/stackit/internal/services/ske/cluster/resource_test.go
index f277522ac..81add8be3 100644
--- a/stackit/internal/services/ske/cluster/resource_test.go
+++ b/stackit/internal/services/ske/cluster/resource_test.go
@@ -83,6 +83,9 @@ func TestMapFields(t *testing.T) {
Zones: []string{"foo.onstackit.cloud"},
Enabled: true,
},
+ ApplicationLoadBalancer: &ske.ApplicationLoadBalancer{
+ Enabled: true,
+ },
},
Hibernation: &ske.Hibernation{
Schedules: []ske.HibernationSchedule{
@@ -275,6 +278,9 @@ func TestMapFields(t *testing.T) {
types.StringValue("foo.onstackit.cloud"),
}),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(true),
+ }),
}),
Region: types.StringValue(testRegion),
Access: types.ObjectValueMust(accessTypes, map[string]attr.Value{
@@ -337,6 +343,9 @@ func TestMapFields(t *testing.T) {
Zones: nil,
Enabled: true,
},
+ ApplicationLoadBalancer: &ske.ApplicationLoadBalancer{
+ Enabled: true,
+ },
},
Name: new("name"),
Access: &ske.Access{
@@ -371,6 +380,9 @@ func TestMapFields(t *testing.T) {
"enabled": types.BoolValue(true),
"zones": types.ListNull(types.StringType),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(true),
+ }),
}),
KubernetesVersionUsed: types.StringValue(""),
Region: types.StringValue(testRegion),
@@ -394,6 +406,9 @@ func TestMapFields(t *testing.T) {
"enabled": types.BoolValue(false),
"zones": types.ListNull(types.StringType),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(false),
+ }),
}),
types.ListNull(types.ObjectType{AttrTypes: nodePoolTypes}),
&ske.Cluster{
@@ -431,6 +446,9 @@ func TestMapFields(t *testing.T) {
"enabled": types.BoolValue(false),
"zones": types.ListNull(types.StringType),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(false),
+ }),
}),
KubernetesVersionUsed: types.StringValue(""),
Region: types.StringValue(testRegion),
@@ -456,6 +474,9 @@ func TestMapFields(t *testing.T) {
"enabled": types.BoolValue(true),
"zones": types.ListNull(types.StringType),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(false),
+ }),
}),
types.ListNull(types.ObjectType{AttrTypes: nodePoolTypes}),
&ske.Cluster{
@@ -504,6 +525,9 @@ func TestMapFields(t *testing.T) {
"enabled": types.BoolValue(true),
"zones": types.ListNull(types.StringType),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(false),
+ }),
}),
KubernetesVersionUsed: types.StringValue(""),
Region: types.StringValue(testRegion),
@@ -598,6 +622,9 @@ func TestMapFields(t *testing.T) {
Zones: []string{"zone1"},
Enabled: true,
},
+ ApplicationLoadBalancer: &ske.ApplicationLoadBalancer{
+ Enabled: true,
+ },
},
Hibernation: &ske.Hibernation{
Schedules: []ske.HibernationSchedule{
@@ -756,6 +783,9 @@ func TestMapFields(t *testing.T) {
types.StringValue("zone1"),
}),
}),
+ "application_load_balancer": types.ObjectValueMust(applicationLoadBalancerTypes, map[string]attr.Value{
+ "enabled": types.BoolValue(true),
+ }),
}),
Region: types.StringValue(testRegion),
Access: defaultAccess,
@@ -2618,10 +2648,11 @@ func TestValidateConfig(t *testing.T) {
name: "argus and observability null",
model: &Model{
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
- "acl": types.ObjectNull(aclTypes),
- "dns": types.ObjectNull(dnsTypes),
- "argus": types.ObjectNull(argusTypes),
- "observability": types.ObjectNull(observabilityTypes),
+ "acl": types.ObjectNull(aclTypes),
+ "dns": types.ObjectNull(dnsTypes),
+ "argus": types.ObjectNull(argusTypes),
+ "observability": types.ObjectNull(observabilityTypes),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2630,10 +2661,11 @@ func TestValidateConfig(t *testing.T) {
name: "argus and observability unknown",
model: &Model{
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
- "acl": types.ObjectNull(aclTypes),
- "dns": types.ObjectNull(dnsTypes),
- "argus": types.ObjectUnknown(argusTypes),
- "observability": types.ObjectUnknown(observabilityTypes),
+ "acl": types.ObjectNull(aclTypes),
+ "dns": types.ObjectNull(dnsTypes),
+ "argus": types.ObjectUnknown(argusTypes),
+ "observability": types.ObjectUnknown(observabilityTypes),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2649,6 +2681,7 @@ func TestValidateConfig(t *testing.T) {
"enabled": types.BoolValue(true),
"instance_id": types.StringValue("aid"),
}),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2657,10 +2690,11 @@ func TestValidateConfig(t *testing.T) {
name: "argus null and observability unknown",
model: &Model{
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
- "acl": types.ObjectNull(aclTypes),
- "dns": types.ObjectNull(dnsTypes),
- "argus": types.ObjectNull(argusTypes),
- "observability": types.ObjectUnknown(observabilityTypes),
+ "acl": types.ObjectNull(aclTypes),
+ "dns": types.ObjectNull(dnsTypes),
+ "argus": types.ObjectNull(argusTypes),
+ "observability": types.ObjectUnknown(observabilityTypes),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2675,7 +2709,8 @@ func TestValidateConfig(t *testing.T) {
"enabled": types.BoolValue(true),
"argus_instance_id": types.StringValue("aid"),
}),
- "observability": types.ObjectNull(observabilityTypes),
+ "observability": types.ObjectNull(observabilityTypes),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2690,7 +2725,8 @@ func TestValidateConfig(t *testing.T) {
"enabled": types.BoolValue(true),
"argus_instance_id": types.StringValue("aid"),
}),
- "observability": types.ObjectUnknown(observabilityTypes),
+ "observability": types.ObjectUnknown(observabilityTypes),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2709,6 +2745,7 @@ func TestValidateConfig(t *testing.T) {
"enabled": types.BoolValue(true),
"instance_id": types.StringValue("aid"),
}),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: true,
@@ -2717,10 +2754,11 @@ func TestValidateConfig(t *testing.T) {
name: "argus unknown observability null",
model: &Model{
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
- "acl": types.ObjectNull(aclTypes),
- "dns": types.ObjectNull(dnsTypes),
- "argus": types.ObjectUnknown(argusTypes),
- "observability": types.ObjectNull(observabilityTypes),
+ "acl": types.ObjectNull(aclTypes),
+ "dns": types.ObjectNull(dnsTypes),
+ "argus": types.ObjectUnknown(argusTypes),
+ "observability": types.ObjectNull(observabilityTypes),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
}),
},
wantErr: false,
@@ -2736,6 +2774,20 @@ func TestValidateConfig(t *testing.T) {
"enabled": types.BoolValue(true),
"instance_id": types.StringValue("aid"),
}),
+ "application_load_balancer": types.ObjectNull(applicationLoadBalancerTypes),
+ }),
+ },
+ wantErr: false,
+ },
+ {
+ name: "application_load_balancer unknown",
+ model: &Model{
+ Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
+ "acl": types.ObjectNull(aclTypes),
+ "dns": types.ObjectNull(dnsTypes),
+ "argus": types.ObjectNull(argusTypes),
+ "observability": types.ObjectNull(observabilityTypes),
+ "application_load_balancer": types.ObjectUnknown(applicationLoadBalancerTypes),
}),
},
wantErr: false,
diff --git a/stackit/internal/services/ske/ske_acc_test.go b/stackit/internal/services/ske/ske_acc_test.go
index 2776c133b..f6a745227 100644
--- a/stackit/internal/services/ske/ske_acc_test.go
+++ b/stackit/internal/services/ske/ske_acc_test.go
@@ -78,6 +78,7 @@ var testConfigVarsMax = config.Variables{
"ext_acl_allowed_cidr1": config.StringVariable("10.0.100.0/24"),
"ext_observability_enabled": config.StringVariable("false"),
"ext_dns_enabled": config.StringVariable("true"),
+ "ext_application_load_balancer_enabled": config.StringVariable("true"),
"nodepool_hibernations1_start": config.StringVariable("0 18 * * *"),
"nodepool_hibernations1_end": config.StringVariable("59 23 * * *"),
"nodepool_hibernations1_timezone": config.StringVariable("Europe/Berlin"),
@@ -113,6 +114,7 @@ func configVarsMaxUpdated() config.Variables {
updatedConfig["nodepool_os_version_min"] = config.StringVariable(skeProviderOptions.GetUpdateMachineVersion())
updatedConfig["maintenance_end"] = config.StringVariable("03:03:03+00:00")
updatedConfig["access_idp_enabled"] = config.BoolVariable(false)
+ updatedConfig["ext_application_load_balancer_enabled"] = config.BoolVariable(false)
return updatedConfig
}
@@ -308,6 +310,7 @@ func TestAccSKEMax(t *testing.T) {
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.dns.enabled", testutil.ConvertConfigVariable(testConfigVarsMax["ext_dns_enabled"])),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.dns.zones.#", "1"),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.dns.zones.0", testutil.ConvertConfigVariable(testConfigVarsMax["dns_name"])),
+ resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.application_load_balancer.enabled", testutil.ConvertConfigVariable(testConfigVarsMax["ext_application_load_balancer_enabled"])),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "hibernations.#", "1"),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "hibernations.0.start", testutil.ConvertConfigVariable(testConfigVarsMax["nodepool_hibernations1_start"])),
@@ -388,6 +391,7 @@ func TestAccSKEMax(t *testing.T) {
resource.TestCheckResourceAttr("data.stackit_ske_cluster.cluster", "extensions.dns.enabled", testutil.ConvertConfigVariable(testConfigVarsMax["ext_dns_enabled"])),
resource.TestCheckResourceAttr("data.stackit_ske_cluster.cluster", "extensions.dns.zones.#", "1"),
resource.TestCheckResourceAttr("data.stackit_ske_cluster.cluster", "extensions.dns.zones.0", testutil.ConvertConfigVariable(testConfigVarsMax["dns_name"])),
+ resource.TestCheckResourceAttr("data.stackit_ske_cluster.cluster", "extensions.application_load_balancer.enabled", testutil.ConvertConfigVariable(testConfigVarsMax["ext_application_load_balancer_enabled"])),
resource.TestCheckResourceAttr("data.stackit_ske_cluster.cluster", "hibernations.#", "1"),
resource.TestCheckResourceAttr("data.stackit_ske_cluster.cluster", "hibernations.0.start", testutil.ConvertConfigVariable(testConfigVarsMax["nodepool_hibernations1_start"])),
@@ -479,6 +483,7 @@ func TestAccSKEMax(t *testing.T) {
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.dns.enabled", testutil.ConvertConfigVariable(configVarsMaxUpdated()["ext_dns_enabled"])),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.dns.zones.#", "1"),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.dns.zones.0", testutil.ConvertConfigVariable(configVarsMaxUpdated()["dns_name"])),
+ resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "extensions.application_load_balancer.enabled", testutil.ConvertConfigVariable(configVarsMaxUpdated()["ext_application_load_balancer_enabled"])),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "hibernations.#", "1"),
resource.TestCheckResourceAttr("stackit_ske_cluster.cluster", "hibernations.0.start", testutil.ConvertConfigVariable(configVarsMaxUpdated()["nodepool_hibernations1_start"])),
diff --git a/stackit/internal/services/ske/testdata/resource-max.tf b/stackit/internal/services/ske/testdata/resource-max.tf
index 92377aa0e..8d6450088 100644
--- a/stackit/internal/services/ske/testdata/resource-max.tf
+++ b/stackit/internal/services/ske/testdata/resource-max.tf
@@ -20,6 +20,7 @@ variable "nodepool_volume_type" {}
variable "ext_acl_enabled" {}
variable "ext_acl_allowed_cidr1" {}
variable "ext_observability_enabled" {}
+variable "ext_application_load_balancer_enabled" {}
variable "ext_dns_enabled" {}
variable "nodepool_hibernations1_start" {}
variable "nodepool_hibernations1_end" {}
@@ -80,6 +81,9 @@ resource "stackit_ske_cluster" "cluster" {
enabled = var.ext_dns_enabled
zones = [stackit_dns_zone.dns-zone.dns_name]
}
+ application_load_balancer = {
+ enabled = var.ext_application_load_balancer_enabled
+ }
}
hibernations = [{
start = var.nodepool_hibernations1_start
@@ -126,4 +130,3 @@ resource "stackit_dns_zone" "dns-zone" {
name = var.dns_zone_name
dns_name = var.dns_name
}
-