feat: add pod_address_ranges to ske resource/datasource (#888)

* feat: add pod_address_ranges to ske resource/datasource

Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>

* review changes

Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>

* review changes 2

Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>

---------

Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
This commit is contained in:
Mauritz Uphoff 2025-06-30 09:40:36 +02:00 committed by GitHub
parent 2f06bc590d
commit 04a3436a0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 174 additions and 15 deletions

View file

@ -63,6 +63,7 @@ func TestMapFields(t *testing.T) {
Hibernations: types.ListNull(types.ObjectType{AttrTypes: hibernationTypes}),
Extensions: types.ObjectNull(extensionsTypes),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
Region: types.StringValue(testRegion),
},
true,
@ -151,6 +152,7 @@ func TestMapFields(t *testing.T) {
Error: nil,
Hibernated: nil,
EgressAddressRanges: &[]string{"0.0.0.0/32", "1.1.1.1/32"},
PodAddressRanges: &[]string{"0.0.0.0/32", "1.1.1.1/32"},
},
},
testRegion,
@ -168,6 +170,13 @@ func TestMapFields(t *testing.T) {
types.StringValue("1.1.1.1/32"),
},
),
PodAddressRanges: types.ListValueMust(
types.StringType,
[]attr.Value{
types.StringValue("0.0.0.0/32"),
types.StringValue("1.1.1.1/32"),
},
),
NodePools: types.ListValueMust(
types.ObjectType{AttrTypes: nodePoolTypes},
[]attr.Value{
@ -283,6 +292,7 @@ func TestMapFields(t *testing.T) {
Hibernations: types.ListNull(types.ObjectType{AttrTypes: hibernationTypes}),
Extensions: types.ObjectNull(extensionsTypes),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
Region: types.StringValue(testRegion),
},
true,
@ -319,6 +329,7 @@ func TestMapFields(t *testing.T) {
Maintenance: types.ObjectNull(maintenanceTypes),
Hibernations: types.ListNull(types.ObjectType{AttrTypes: hibernationTypes}),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
"acl": types.ObjectValueMust(aclTypes, map[string]attr.Value{
"enabled": types.BoolValue(true),
@ -369,6 +380,7 @@ func TestMapFields(t *testing.T) {
Maintenance: types.ObjectNull(maintenanceTypes),
Hibernations: types.ListNull(types.ObjectType{AttrTypes: hibernationTypes}),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
"acl": types.ObjectValueMust(aclTypes, map[string]attr.Value{
"enabled": types.BoolValue(false),
@ -430,6 +442,7 @@ func TestMapFields(t *testing.T) {
Maintenance: types.ObjectNull(maintenanceTypes),
Hibernations: types.ListNull(types.ObjectType{AttrTypes: hibernationTypes}),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
Extensions: types.ObjectValueMust(extensionsTypes, map[string]attr.Value{
"acl": types.ObjectValueMust(aclTypes, map[string]attr.Value{
"enabled": types.BoolValue(true),
@ -470,6 +483,7 @@ func TestMapFields(t *testing.T) {
Hibernations: types.ListNull(types.ObjectType{AttrTypes: hibernationTypes}),
Extensions: types.ObjectNull(extensionsTypes),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
Region: types.StringValue(testRegion),
},
true,
@ -598,6 +612,7 @@ func TestMapFields(t *testing.T) {
KubernetesVersionUsed: types.StringValue("1.2.3"),
AllowPrivilegedContainers: types.BoolValue(true),
EgressAddressRanges: types.ListNull(types.StringType),
PodAddressRanges: types.ListNull(types.StringType),
NodePools: types.ListValueMust(
types.ObjectType{AttrTypes: nodePoolTypes},
[]attr.Value{