Skip to content

Commit 18d3f4d

Browse files
stackit-pipelinerenovate-botGokceGK
authored
fix(deps): update stackit sdk modules (#327)
* fix(deps): update stackit sdk modules * remove deprecated fields from credentials resources * remove deprecated fields from credentials resources * add newly added fields to credentials resources * remove deprecated fields from credentials datasource * add newly added credential fields to datasources * update acceptance tests --------- Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com> Co-authored-by: Gökçe Gök Klingel <goekce.goek_klingel@mail.schwarz>
1 parent 4917eda commit 18d3f4d

22 files changed

Lines changed: 262 additions & 284 deletions

go.mod

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ require (
1111
github.com/hashicorp/terraform-plugin-go v0.22.1
1212
github.com/hashicorp/terraform-plugin-log v0.9.0
1313
github.com/hashicorp/terraform-plugin-testing v1.7.0
14-
github.com/stackitcloud/stackit-sdk-go/core v0.10.1
15-
github.com/stackitcloud/stackit-sdk-go/services/argus v0.9.5
16-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.8.4
17-
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.10.0
18-
github.com/stackitcloud/stackit-sdk-go/services/logme v0.10.1
19-
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.10.1
20-
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.11.1
21-
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.8.6
22-
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.10.1
23-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.12.0
14+
github.com/stackitcloud/stackit-sdk-go/core v0.12.0
15+
github.com/stackitcloud/stackit-sdk-go/services/argus v0.10.0
16+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.9.0
17+
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.11.0
18+
github.com/stackitcloud/stackit-sdk-go/services/logme v0.13.0
19+
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.13.0
20+
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.12.0
21+
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.9.0
22+
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.13.0
23+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.13.0
2424
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.12.1
25-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.10.0
26-
github.com/stackitcloud/stackit-sdk-go/services/redis v0.10.1
27-
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.7.7
28-
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.6.0
29-
github.com/stackitcloud/stackit-sdk-go/services/ske v0.11.0
25+
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.13.0
26+
github.com/stackitcloud/stackit-sdk-go/services/redis v0.13.0
27+
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.8.0
28+
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.7.0
29+
github.com/stackitcloud/stackit-sdk-go/services/ske v0.12.0
3030
golang.org/x/mod v0.17.0
3131
)
3232

go.sum

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -146,38 +146,38 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
146146
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
147147
github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
148148
github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
149-
github.com/stackitcloud/stackit-sdk-go/core v0.10.1 h1:lzyualywD/2xIsYUHwlqCurG1OwlqCJVtJbOcPO6OzE=
150-
github.com/stackitcloud/stackit-sdk-go/core v0.10.1/go.mod h1:mDX1mSTsB3mP+tNBGcFNx6gH1mGBN4T+dVt+lcw7nlw=
151-
github.com/stackitcloud/stackit-sdk-go/services/argus v0.9.5 h1:RLsA2jO9sMNpn7NYdtFyumY5Vj4n4WtBm2J2NBKlsnw=
152-
github.com/stackitcloud/stackit-sdk-go/services/argus v0.9.5/go.mod h1:lzGbqwV0hqeX/kUvaaFTgjOJRxUlsZ911TX1YAcKwqc=
153-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.8.4 h1:n/X2pVdETDXGHk+vCsg0p3b2zGxSRMJ065to/aAoncg=
154-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.8.4/go.mod h1:PvgUVFLgELRADWk2epZdCryk0fs8b4DN47ghEJjNWhk=
155-
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.10.0 h1:eX1v4n1nIyHmV5Z+GxrXy3MMbK1Li3f22ibkP/fOW30=
156-
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.10.0/go.mod h1:+VWG8mzoVDNx8Ga0O//rUdPbXpNG2p95dP1ijfM+h4U=
157-
github.com/stackitcloud/stackit-sdk-go/services/logme v0.10.1 h1:/yEAySr1P+52l82g93EBEBHLcu74UNZxBg/32EwOzDo=
158-
github.com/stackitcloud/stackit-sdk-go/services/logme v0.10.1/go.mod h1:HSMbEONG7BoixaR7McsYgYmt/lKRc5GMzn2eIj3HFKs=
159-
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.10.1 h1:Y0BwYv2+B3Dg8Wo9GkaWYf+CcNww9Xm38FB/chj6OiM=
160-
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.10.1/go.mod h1:2KR68oxSpkiuBGYTYlESMP37oNlSMZXVgyQbSC4PZ+8=
161-
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.11.1 h1:SDeQf60BgAwsnB3366yz58ElvVwlyd7M/lPZIEqv9gU=
162-
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.11.1/go.mod h1:/hQ7GW2hAqcKjKlNCcVJA9zNu3vGFzRaPdhMjfoIKFo=
163-
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.8.6 h1:+mcoBKs6ae4eJM0Whuf6lcGuwU341vaBQjr7W/WEGZg=
164-
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.8.6/go.mod h1:W9BML8bqZb2dOZe1K+M+qBBs8/QNirr3jA0xxy9tNRY=
165-
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.10.1 h1:LKic8dXtXKsRst2+wY9dNjjkMyJ05QIDpOJuRmVb410=
166-
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.10.1/go.mod h1:g1o1bmqtTliy9UkFlRV/6bn6GQk+hkvnny3UjMI69S0=
167-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.12.0 h1:W2WSYUyhKaHQ+BZfmyRw9PKv5q7ihGRyNhNgIlyM+Y8=
168-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.12.0/go.mod h1:P0YyvgwIsVKJijdWGVJVOp/ac7PVX99Oj+dr4v1zECc=
149+
github.com/stackitcloud/stackit-sdk-go/core v0.12.0 h1:auIzUUNRuydKOScvpICP4MifGgvOajiDQd+ncGmBL0U=
150+
github.com/stackitcloud/stackit-sdk-go/core v0.12.0/go.mod h1:mDX1mSTsB3mP+tNBGcFNx6gH1mGBN4T+dVt+lcw7nlw=
151+
github.com/stackitcloud/stackit-sdk-go/services/argus v0.10.0 h1:FAYOt6UBy/F2jPH2C/NnZnbjLZryJBjtM3afLVgGc4w=
152+
github.com/stackitcloud/stackit-sdk-go/services/argus v0.10.0/go.mod h1:nVllQfYODhX1q3bgwVTLO7wHOp+8NMLiKbn3u/Dg5nU=
153+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.9.0 h1:sxvlcey7EcBc52rU6vYJEFguWkz9dNbSv2xJ3+c+97M=
154+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.9.0/go.mod h1:MdZcRbs19s2NLeJmSLSoqTzm9IPIQhE1ZEMpo9gePq0=
155+
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.11.0 h1:EYAmDHJzVjGefCQS3iz+SUjnp4QVfLvlHGKWqFvNAqA=
156+
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.11.0/go.mod h1:wsO3+vXe1XiKLeCIctWAptaHQZ07Un7kmLTQ+drbj7w=
157+
github.com/stackitcloud/stackit-sdk-go/services/logme v0.13.0 h1:/wqs+pfHSjFWTakJVQGD/KwArxmFN8qdYrJDUgA1Gxw=
158+
github.com/stackitcloud/stackit-sdk-go/services/logme v0.13.0/go.mod h1:bj9cn1treNSxKTRCEmESwqfENN8vCYn60HUnEA0P83c=
159+
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.13.0 h1:qioXHNeQ2xdwT5iGOk0c3hQIpct7zlAYzLRqXvsJ7CA=
160+
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.13.0/go.mod h1:kPetkX9hNm9HkRyiKQL/tlgdi8frZdMP8afg0mEvQ9s=
161+
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.12.0 h1:/m6N/CdsFxomexsowU7PwT1S4UTmI39PnEvvWGsDh1s=
162+
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.12.0/go.mod h1:iFerEzGmkg6R13ldFUyHUWHm0ac9cS4ftTDLhP0k/dU=
163+
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.9.0 h1:rWgy4/eCIgyA2dUuc4a30pldmS6taQDwiLqoeZmyeP8=
164+
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.9.0/go.mod h1:dkVMJI88eJ3Xs0ZV15r4tUpgitUGJXcvrX3RL4Zq2bQ=
165+
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.13.0 h1:dzt2wd1QkFVctKPQDBlyMCsHEJV4Bf2bRkZTUFFCZhs=
166+
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.13.0/go.mod h1:ZecMIf9oYj2DGZqWh93l97WdVaRdLl+tW5Fq3YKGwBM=
167+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.13.0 h1:PGLjBZxWM7NIrH1+W1+f+/4kZEgwv9DGnXcUzOqM0M8=
168+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.13.0/go.mod h1:SdrqGLCkilL6wl1+jcxmLtks2IocgIg+bsyeyYUIzR4=
169169
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.12.1 h1:u2jNFPPLM2TlpM1qUu1UuG9XKx/EYPjwg2nJqAK1HUY=
170170
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.12.1/go.mod h1:rTbdB/rl+e9o9sJNrT3yMIaSNVBGqR5G2Vh4opKrEwo=
171-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.10.0 h1:Fle394socpyf662g3jMrtZpZaWVgBMBIEFnh4fnGock=
172-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.10.0/go.mod h1:JvqOSrTCiynS0x6Y9OsK54yvdB6AtIWLwXDEjoCkAIg=
173-
github.com/stackitcloud/stackit-sdk-go/services/redis v0.10.1 h1:/tRad17HUcGRm448l8XyX6uhnnHVfj3VdUQquIwNq2Q=
174-
github.com/stackitcloud/stackit-sdk-go/services/redis v0.10.1/go.mod h1:vR/0cYTcVrPTTAHJGH2VT0H2g1D+wlx1n2WiAo6r5LI=
175-
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.7.7 h1:yFxTdMj5al2pR4ZIOKKxoN8CHo2kTylurArt+jJMzxI=
176-
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.7.7/go.mod h1:GvNV2GR0x0VGHzixGNgAJibqjwiVFwbxakpyu+qdijc=
177-
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.6.0 h1:VC7VWadRo8r0eQUXMrYv6vEyS/5acW8faMSv9lxQMgw=
178-
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.6.0/go.mod h1:KRoLXZdH8yuO6FBu2Grl5VGqW9arH03qYAC0P6H8h9o=
179-
github.com/stackitcloud/stackit-sdk-go/services/ske v0.11.0 h1:BJ1Op7f3KJPNROkEXzqAREl55JCqyIAyQJ+Gfu4LYCM=
180-
github.com/stackitcloud/stackit-sdk-go/services/ske v0.11.0/go.mod h1:yFLjTx58pjHCp0KZTaqHlW9Qk60CY5HpnBWR/zztv8Y=
171+
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.13.0 h1:bdmZhVAuyPiaAeJnBRLMVtVix6DYzNYbpdPiq/Z3XCI=
172+
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.13.0/go.mod h1:eSgnPBknTJh7t+jVKN+xzeAh+Cg1USOlH3QCyfvG20g=
173+
github.com/stackitcloud/stackit-sdk-go/services/redis v0.13.0 h1:MlREN/9zDntk90kahS0aJa/gPGAoUV4NLNnrTLs9CLc=
174+
github.com/stackitcloud/stackit-sdk-go/services/redis v0.13.0/go.mod h1:3LhiTR/DMbKR2HuleTzlFHltR1MT1KD0DeW46X6K2GE=
175+
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.8.0 h1:7AIvLkB7JZ5lYKtYLwI0rgJ0185hwQC1PFiUrjcinDM=
176+
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.8.0/go.mod h1:p16qz/pAW8b1gEhqMpIgJfutRPeDPqQLlbVGyCo3f8o=
177+
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.7.0 h1:1Ho+M4DyZHrwbDe1peW//x+/hegIuaUdZqbQEbPlr4k=
178+
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.7.0/go.mod h1:LX0Mcyr7/QP77zf7e05fHCJO38RMuTxr7nEDUDZ3oPQ=
179+
github.com/stackitcloud/stackit-sdk-go/services/ske v0.12.0 h1:sG45CkR+v8BUQBREROjTbJV/ZK5Xg+Rd6ulzM25UoGw=
180+
github.com/stackitcloud/stackit-sdk-go/services/ske v0.12.0/go.mod h1:0fFs4R7kg+gU7FNAIzzFvlCZJz6gyZ8CFhbK3eSrAwQ=
181181
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
182182
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
183183
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=

stackit/internal/services/logme/credential/datasource.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
1212

1313
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
14-
"github.com/hashicorp/terraform-plugin-framework/types"
1514
"github.com/stackitcloud/stackit-sdk-go/core/config"
1615
"github.com/stackitcloud/stackit-sdk-go/services/logme"
1716
)
@@ -116,16 +115,6 @@ func (r *credentialDataSource) Schema(_ context.Context, _ datasource.SchemaRequ
116115
"host": schema.StringAttribute{
117116
Computed: true,
118117
},
119-
"hosts": schema.ListAttribute{
120-
ElementType: types.StringType,
121-
Computed: true,
122-
},
123-
"http_api_uri": schema.StringAttribute{
124-
Computed: true,
125-
},
126-
"name": schema.StringAttribute{
127-
Computed: true,
128-
},
129118
"password": schema.StringAttribute{
130119
Computed: true,
131120
Sensitive: true,

stackit/internal/services/logme/credential/resource.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
1111
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
1212

13-
"github.com/hashicorp/terraform-plugin-framework/attr"
1413
"github.com/hashicorp/terraform-plugin-framework/path"
1514
"github.com/hashicorp/terraform-plugin-framework/resource"
1615
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
@@ -35,9 +34,6 @@ type Model struct {
3534
InstanceId types.String `tfsdk:"instance_id"`
3635
ProjectId types.String `tfsdk:"project_id"`
3736
Host types.String `tfsdk:"host"`
38-
Hosts types.List `tfsdk:"hosts"`
39-
HttpAPIURI types.String `tfsdk:"http_api_uri"`
40-
Name types.String `tfsdk:"name"`
4137
Password types.String `tfsdk:"password"`
4238
Port types.Int64 `tfsdk:"port"`
4339
Uri types.String `tfsdk:"uri"`
@@ -153,16 +149,6 @@ func (r *credentialResource) Schema(_ context.Context, _ resource.SchemaRequest,
153149
"host": schema.StringAttribute{
154150
Computed: true,
155151
},
156-
"hosts": schema.ListAttribute{
157-
ElementType: types.StringType,
158-
Computed: true,
159-
},
160-
"http_api_uri": schema.StringAttribute{
161-
Computed: true,
162-
},
163-
"name": schema.StringAttribute{
164-
Computed: true,
165-
},
166152
"password": schema.StringAttribute{
167153
Computed: true,
168154
Sensitive: true,
@@ -346,22 +332,8 @@ func mapFields(credentialsResp *logme.CredentialsResponse, model *Model) error {
346332
strings.Join(idParts, core.Separator),
347333
)
348334
model.CredentialId = types.StringValue(credentialId)
349-
model.Hosts = types.ListNull(types.StringType)
350335
if credentials != nil {
351-
if credentials.Hosts != nil {
352-
var hosts []attr.Value
353-
for _, host := range *credentials.Hosts {
354-
hosts = append(hosts, types.StringValue(host))
355-
}
356-
hostsList, diags := types.ListValue(types.StringType, hosts)
357-
if diags.HasError() {
358-
return fmt.Errorf("failed to map hosts: %w", core.DiagsToError(diags))
359-
}
360-
model.Hosts = hostsList
361-
}
362336
model.Host = types.StringPointerValue(credentials.Host)
363-
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
364-
model.Name = types.StringPointerValue(credentials.Name)
365337
model.Password = types.StringPointerValue(credentials.Password)
366338
model.Port = types.Int64PointerValue(credentials.Port)
367339
model.Uri = types.StringPointerValue(credentials.Uri)

stackit/internal/services/logme/credential/resource_test.go

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"testing"
55

66
"github.com/google/go-cmp/cmp"
7-
"github.com/hashicorp/terraform-plugin-framework/attr"
87
"github.com/hashicorp/terraform-plugin-framework/types"
98
"github.com/stackitcloud/stackit-sdk-go/core/utils"
109
"github.com/stackitcloud/stackit-sdk-go/services/logme"
@@ -29,9 +28,6 @@ func TestMapFields(t *testing.T) {
2928
InstanceId: types.StringValue("iid"),
3029
ProjectId: types.StringValue("pid"),
3130
Host: types.StringNull(),
32-
Hosts: types.ListNull(types.StringType),
33-
HttpAPIURI: types.StringNull(),
34-
Name: types.StringNull(),
3531
Password: types.StringNull(),
3632
Port: types.Int64Null(),
3733
Uri: types.StringNull(),
@@ -45,17 +41,11 @@ func TestMapFields(t *testing.T) {
4541
Id: utils.Ptr("cid"),
4642
Raw: &logme.RawCredentials{
4743
Credentials: &logme.Credentials{
48-
Host: utils.Ptr("host"),
49-
Hosts: &[]string{
50-
"host_1",
51-
"",
52-
},
53-
HttpApiUri: utils.Ptr("http"),
54-
Name: utils.Ptr("name"),
55-
Password: utils.Ptr("password"),
56-
Port: utils.Ptr(int64(1234)),
57-
Uri: utils.Ptr("uri"),
58-
Username: utils.Ptr("username"),
44+
Host: utils.Ptr("host"),
45+
Password: utils.Ptr("password"),
46+
Port: utils.Ptr(int64(1234)),
47+
Uri: utils.Ptr("uri"),
48+
Username: utils.Ptr("username"),
5949
},
6050
},
6151
},
@@ -65,16 +55,10 @@ func TestMapFields(t *testing.T) {
6555
InstanceId: types.StringValue("iid"),
6656
ProjectId: types.StringValue("pid"),
6757
Host: types.StringValue("host"),
68-
Hosts: types.ListValueMust(types.StringType, []attr.Value{
69-
types.StringValue("host_1"),
70-
types.StringValue(""),
71-
}),
72-
HttpAPIURI: types.StringValue("http"),
73-
Name: types.StringValue("name"),
74-
Password: types.StringValue("password"),
75-
Port: types.Int64Value(1234),
76-
Uri: types.StringValue("uri"),
77-
Username: types.StringValue("username"),
58+
Password: types.StringValue("password"),
59+
Port: types.Int64Value(1234),
60+
Uri: types.StringValue("uri"),
61+
Username: types.StringValue("username"),
7862
},
7963
true,
8064
},
@@ -84,14 +68,11 @@ func TestMapFields(t *testing.T) {
8468
Id: utils.Ptr("cid"),
8569
Raw: &logme.RawCredentials{
8670
Credentials: &logme.Credentials{
87-
Host: utils.Ptr(""),
88-
Hosts: &[]string{},
89-
HttpApiUri: nil,
90-
Name: nil,
91-
Password: utils.Ptr(""),
92-
Port: utils.Ptr(int64(2123456789)),
93-
Uri: nil,
94-
Username: utils.Ptr(""),
71+
Host: utils.Ptr(""),
72+
Password: utils.Ptr(""),
73+
Port: utils.Ptr(int64(2123456789)),
74+
Uri: nil,
75+
Username: utils.Ptr(""),
9576
},
9677
},
9778
},
@@ -101,9 +82,6 @@ func TestMapFields(t *testing.T) {
10182
InstanceId: types.StringValue("iid"),
10283
ProjectId: types.StringValue("pid"),
10384
Host: types.StringValue(""),
104-
Hosts: types.ListValueMust(types.StringType, []attr.Value{}),
105-
HttpAPIURI: types.StringNull(),
106-
Name: types.StringNull(),
10785
Password: types.StringValue(""),
10886
Port: types.Int64Value(2123456789),
10987
Uri: types.StringNull(),

stackit/internal/services/logme/logme_acc_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var instanceResource = map[string]string{
2121
"project_id": testutil.ProjectId,
2222
"name": testutil.ResourceNameWithDateTime("logme"),
2323
"plan_id": "201d743c-0f06-4af2-8f20-649baf4819ae",
24-
"plan_name": "stackit-qa-logme2-1.2.50-replica",
24+
"plan_name": "stackit-logme2-1.2.50-replica",
2525
"version": "2",
2626
"sgw_acl-1": "192.168.0.0/16",
2727
"sgw_acl-2": "192.168.0.0/24",
@@ -184,7 +184,9 @@ func testAccCheckLogMeDestroy(s *terraform.State) error {
184184
var client *logme.APIClient
185185
var err error
186186
if testutil.LogMeCustomEndpoint == "" {
187-
client, err = logme.NewAPIClient()
187+
client, err = logme.NewAPIClient(
188+
config.WithRegion("eu01"),
189+
)
188190
} else {
189191
client, err = logme.NewAPIClient(
190192
config.WithEndpoint(testutil.LogMeCustomEndpoint),

stackit/internal/services/mariadb/credential/datasource.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ func (r *credentialDataSource) Schema(_ context.Context, _ datasource.SchemaRequ
120120
ElementType: types.StringType,
121121
Computed: true,
122122
},
123-
"http_api_uri": schema.StringAttribute{
124-
Computed: true,
125-
},
126123
"name": schema.StringAttribute{
127124
Computed: true,
128125
},

stackit/internal/services/mariadb/credential/resource.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ type Model struct {
3636
ProjectId types.String `tfsdk:"project_id"`
3737
Host types.String `tfsdk:"host"`
3838
Hosts types.List `tfsdk:"hosts"`
39-
HttpAPIURI types.String `tfsdk:"http_api_uri"`
4039
Name types.String `tfsdk:"name"`
4140
Password types.String `tfsdk:"password"`
4241
Port types.Int64 `tfsdk:"port"`
@@ -157,9 +156,6 @@ func (r *credentialResource) Schema(_ context.Context, _ resource.SchemaRequest,
157156
ElementType: types.StringType,
158157
Computed: true,
159158
},
160-
"http_api_uri": schema.StringAttribute{
161-
Computed: true,
162-
},
163159
"name": schema.StringAttribute{
164160
Computed: true,
165161
},
@@ -360,7 +356,6 @@ func mapFields(credentialsResp *mariadb.CredentialsResponse, model *Model) error
360356
model.Hosts = hostsList
361357
}
362358
model.Host = types.StringPointerValue(credentials.Host)
363-
model.HttpAPIURI = types.StringPointerValue(credentials.HttpApiUri)
364359
model.Name = types.StringPointerValue(credentials.Name)
365360
model.Password = types.StringPointerValue(credentials.Password)
366361
model.Port = types.Int64PointerValue(credentials.Port)

0 commit comments

Comments
 (0)