Skip to content

Commit 523d740

Browse files
Merge branch 'main' into fix/STACKITTPR-607_allow-unknown-pid-during-plan
2 parents a9d8145 + dcf6f21 commit 523d740

38 files changed

Lines changed: 1602 additions & 1167 deletions

docs/data-sources/sfs_share.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ data "stackit_sfs_share" "example" {
3939
### Read-Only
4040

4141
- `export_policy` (String) Name of the Share Export Policy to use in the Share.
42-
Note that if this is not set, the Share can only be mounted in read only by
43-
clients with IPs matching the IP ACL of the Resource Pool hosting this Share.
42+
Note that if this is not set, the Share can only be mounted in read only by
43+
clients with IPs matching the IP ACL of the Resource Pool hosting this Share.
4444
You can also assign a Share Export Policy after creating the Share
4545
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`share_id`".
4646
- `mount_path` (String) Mount path of the Share, used to mount the Share
4747
- `name` (String) Name of the Share
48-
- `space_hard_limit_gigabytes` (Number) Space hard limit for the Share.
48+
- `space_hard_limit_gigabytes` (Number) Space hard limit for the Share.
4949
If zero, the Share will have access to the full space of the Resource Pool it lives in.
5050
(unit: gigabytes)

docs/resources/sfs_share.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ import {
3636

3737
### Required
3838

39-
- `export_policy` (String) Name of the Share Export Policy to use in the Share.
40-
Note that if this is set to an empty string, the Share can only be mounted in read only by
41-
clients with IPs matching the IP ACL of the Resource Pool hosting this Share.
42-
You can also assign a Share Export Policy after creating the Share
4339
- `name` (String) Name of the share.
4440
- `project_id` (String) STACKIT project ID to which the share is associated.
4541
- `resource_pool_id` (String) The ID of the resource pool for the SFS share.
46-
- `space_hard_limit_gigabytes` (Number) Space hard limit for the Share.
42+
- `space_hard_limit_gigabytes` (Number) Space hard limit for the Share.
4743
If zero, the Share will have access to the full space of the Resource Pool it lives in.
4844
(unit: gigabytes)
4945

5046
### Optional
5147

48+
- `export_policy` (String) Name of the Share Export Policy to use in the Share.
49+
Note that if this is set to an empty string, the Share can only be mounted in read only by
50+
clients with IPs matching the IP ACL of the Resource Pool hosting this Share.
51+
You can also assign a Share Export Policy after creating the Share
5252
- `region` (String) The resource region. If not defined, the provider region is used.
5353

5454
### Read-Only

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/stackitcloud/stackit-sdk-go/services/edge v0.8.1
2121
github.com/stackitcloud/stackit-sdk-go/services/git v0.11.0
2222
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.5
23-
github.com/stackitcloud/stackit-sdk-go/services/kms v1.6.0
23+
github.com/stackitcloud/stackit-sdk-go/services/kms v1.7.1
2424
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.12.0
2525
github.com/stackitcloud/stackit-sdk-go/services/logme v0.27.1
2626
github.com/stackitcloud/stackit-sdk-go/services/logs v0.7.1
@@ -35,16 +35,16 @@ require (
3535
github.com/stackitcloud/stackit-sdk-go/services/redis v0.28.1
3636
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.20.0
3737
github.com/stackitcloud/stackit-sdk-go/services/scf v0.7.0
38-
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.17.0
38+
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.18.0
3939
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.6.0
4040
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.5.0
4141
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0
4242
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.4.1
4343
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.6.3
44-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0
44+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.12.0
4545
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.6.1
4646
github.com/teambition/rrule-go v1.8.2
47-
golang.org/x/mod v0.34.0
47+
golang.org/x/mod v0.35.0
4848
)
4949

5050
require (

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,8 @@ github.com/stackitcloud/stackit-sdk-go/services/git v0.11.0 h1:siKBCYl7BwR5S25Y4
686686
github.com/stackitcloud/stackit-sdk-go/services/git v0.11.0/go.mod h1:QKy74hhLVZKXItw3y+elF8s9QezFqpEsAUmaqvNDzYs=
687687
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.5 h1:W57+XRa8wTLsi5CV9Tqa7mGgt/PvlRM//RurXSmvII8=
688688
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.3.5/go.mod h1:lTWjW57eAq1bwfM6nsNinhoBr3MHFW/GaFasdAsYfDM=
689-
github.com/stackitcloud/stackit-sdk-go/services/kms v1.6.0 h1:WWU2LpqmazsPDgoRAVrhLzo2MiNU9dNim81z793DbBU=
690-
github.com/stackitcloud/stackit-sdk-go/services/kms v1.6.0/go.mod h1:FuyCm3s/Ihw+tkpVLGMXwgTtlhrijd31cUCUBWpn1p8=
689+
github.com/stackitcloud/stackit-sdk-go/services/kms v1.7.1 h1:EvA2QwlGBS1slqwmDKWqrd7r+YjxRNFm3RwTSyMmJaY=
690+
github.com/stackitcloud/stackit-sdk-go/services/kms v1.7.1/go.mod h1:38j2u5IeVU5fec9A4tgZpM3OMaORPe6vrl0Sj/Z9aZE=
691691
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.12.0 h1:NV8gJ75nPvnJvxXVAp3zSoer04jq1LLxEhGZdH68jQU=
692692
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.12.0/go.mod h1:vyTjtzGSh91dpOiZkwCZiIz054E554Oi4coPXYlec8s=
693693
github.com/stackitcloud/stackit-sdk-go/services/logme v0.27.1 h1:6AaWxQNtOEvIvbtyySi5KIrNzxGbKgOayUnA3fpuqns=
@@ -716,8 +716,8 @@ github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.20.0 h1:bT/qo
716716
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.20.0/go.mod h1:jiPIzF8lcm5Dx0TkDK2CBgeRBHSRUqwyX+z/zqo1bes=
717717
github.com/stackitcloud/stackit-sdk-go/services/scf v0.7.0 h1:ip9BODkeeDXB5Y2i5pfyIBX+VMmfUWlfIMvdQJitZyg=
718718
github.com/stackitcloud/stackit-sdk-go/services/scf v0.7.0/go.mod h1:JuJbNkydnm1OFGiRweiLyOUqR6prSOveJC14b1oG+Ok=
719-
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.17.0 h1:6gDKTxdPzabtJ4cPzNgCgsT2+z8v80DSCx476HqzaXk=
720-
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.17.0/go.mod h1:vSWUMTsMbtniEo1I+eCsjCOTODR4iproNAeqG3vr/4I=
719+
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.18.0 h1:DCNhYm8VDErgHUEYpA6SGq1czoMp5CpOPkY1bbAnA3I=
720+
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.18.0/go.mod h1:f7QqAUDHadDuBAKg9ZbiX7hHuVjoGGREUKk+yPKu85I=
721721
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.6.0 h1:OGAaEbuoxTZnsWbtFmhkvdvCCV/RpYuE3ALQXmRyOOc=
722722
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.6.0/go.mod h1:h2fhcXRiSFP9yJXY8eb37e+2PhMW11g1GB8LL/EQ1aU=
723723
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.5.0 h1:4MYNb3VQjVnVPfJ9xhDbSQgoSkxQZJ0tsv9N7O43/RI=
@@ -728,8 +728,8 @@ github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.4.1 h1:HZnZ
728728
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.4.1/go.mod h1:wBxlGcNeQPIh1aS4xYqJuN2z6haSHRwzne6drN5ROfM=
729729
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.6.3 h1:LEdPJ6f9pbrft+HlIIzRcCQog58b7UKVm4ObiOH8H4o=
730730
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.6.3/go.mod h1:qO2+XOzLy9rRTDo3IvXJd4uZsl6d1npa2cyQvaY4/Fw=
731-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0 h1:l1QjxW7sdE/6B6BZtHxbmus8XJdI9KDuXX3fwUa5fog=
732-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.7.0/go.mod h1:1Jr+ImrmPERxbYnlTy6O2aSZYNnREf2qQyysv6YC1RY=
731+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.12.0 h1:G6iUFDlrwCkCkwSV3eLNsFpVD24h6qV7D4pm0rqftnM=
732+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.12.0/go.mod h1:cSRF2ARIB6dKmvZ12Z5h1usKQligeZJ1JOiJk6Ds3wE=
733733
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.6.1 h1:aUpKF2aF8WKsHawXPFnKsRlAcaHkRg6UL0sVjuQqB74=
734734
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.6.1/go.mod h1:1rYtgXQWSv0ykMZ6p7vXcmccGcwR37omNh9FMKLNwck=
735735
github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g=
@@ -891,8 +891,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
891891
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
892892
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
893893
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
894-
golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI=
895-
golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY=
894+
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
895+
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
896896
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
897897
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
898898
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

stackit/internal/services/scf/organization/datasource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
1111
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
1212
"github.com/hashicorp/terraform-plugin-log/tflog"
13-
"github.com/stackitcloud/stackit-sdk-go/services/scf"
13+
scf "github.com/stackitcloud/stackit-sdk-go/services/scf/v1api"
1414

1515
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
1616
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
@@ -149,7 +149,7 @@ func (s *scfOrganizationDataSource) Read(ctx context.Context, request datasource
149149
ctx = tflog.SetField(ctx, "region", region)
150150

151151
// Read the current scf organization via orgId
152-
scfOrgResponse, err := s.client.GetOrganization(ctx, projectId, region, orgId).Execute()
152+
scfOrgResponse, err := s.client.DefaultAPI.GetOrganization(ctx, projectId, region, orgId).Execute()
153153
if err != nil {
154154
utils.LogError(
155155
ctx,

stackit/internal/services/scf/organization/resource.go

Lines changed: 26 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
"github.com/hashicorp/terraform-plugin-framework/types"
1818
"github.com/hashicorp/terraform-plugin-log/tflog"
1919
"github.com/stackitcloud/stackit-sdk-go/core/oapierror"
20-
"github.com/stackitcloud/stackit-sdk-go/services/scf"
21-
"github.com/stackitcloud/stackit-sdk-go/services/scf/wait"
20+
scf "github.com/stackitcloud/stackit-sdk-go/services/scf/v1api"
21+
"github.com/stackitcloud/stackit-sdk-go/services/scf/v1api/wait"
2222

2323
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
2424
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
@@ -249,7 +249,7 @@ func (s *scfOrganizationResource) Create(ctx context.Context, request resource.C
249249
}
250250

251251
// Create the new scf organization via the API client.
252-
scfOrgCreateResponse, err := s.client.CreateOrganization(ctx, projectId, region).
252+
scfOrgCreateResponse, err := s.client.DefaultAPI.CreateOrganization(ctx, projectId, region).
253253
CreateOrganizationPayload(payload).
254254
Execute()
255255
if err != nil {
@@ -259,11 +259,7 @@ func (s *scfOrganizationResource) Create(ctx context.Context, request resource.C
259259

260260
ctx = core.LogResponse(ctx)
261261

262-
if scfOrgCreateResponse.Guid == nil {
263-
core.LogAndAddError(ctx, &response.Diagnostics, "Error creating scf organization", "API response did not include org ID")
264-
return
265-
}
266-
orgId := *scfOrgCreateResponse.Guid
262+
orgId := scfOrgCreateResponse.Guid
267263

268264
ctx = utils.SetAndLogStateFields(ctx, &response.Diagnostics, &response.State, map[string]any{
269265
"project_id": projectId,
@@ -273,19 +269,19 @@ func (s *scfOrganizationResource) Create(ctx context.Context, request resource.C
273269

274270
// Apply the org quota if provided
275271
if quotaId != "" {
276-
applyOrgQuota, err := s.client.ApplyOrganizationQuota(ctx, projectId, region, orgId).ApplyOrganizationQuotaPayload(
272+
applyOrgQuota, err := s.client.DefaultAPI.ApplyOrganizationQuota(ctx, projectId, region, orgId).ApplyOrganizationQuotaPayload(
277273
scf.ApplyOrganizationQuotaPayload{
278-
QuotaId: &quotaId,
274+
QuotaId: quotaId,
279275
}).Execute()
280276
if err != nil {
281277
core.LogAndAddError(ctx, &response.Diagnostics, "Error creating scf organization", fmt.Sprintf("Calling API to apply quota: %v", err))
282278
return
283279
}
284-
model.QuotaId = types.StringPointerValue(applyOrgQuota.QuotaId)
280+
model.QuotaId = types.StringValue(applyOrgQuota.QuotaId)
285281
}
286282

287283
if suspended {
288-
_, err := s.client.UpdateOrganization(ctx, projectId, region, orgId).UpdateOrganizationPayload(
284+
_, err := s.client.DefaultAPI.UpdateOrganization(ctx, projectId, region, orgId).UpdateOrganizationPayload(
289285

290286
scf.UpdateOrganizationPayload{
291287
Suspended: &suspended,
@@ -297,7 +293,7 @@ func (s *scfOrganizationResource) Create(ctx context.Context, request resource.C
297293
}
298294

299295
// Load the newly created scf organization
300-
scfOrgResponse, err := s.client.GetOrganization(ctx, projectId, region, orgId).Execute()
296+
scfOrgResponse, err := s.client.DefaultAPI.GetOrganization(ctx, projectId, region, orgId).Execute()
301297
if err != nil {
302298
core.LogAndAddError(ctx, &response.Diagnostics, "Error creating scf organization", fmt.Sprintf("Calling API to load created org: %v", err))
303299
return
@@ -339,7 +335,7 @@ func (s *scfOrganizationResource) Read(ctx context.Context, request resource.Rea
339335
ctx = tflog.SetField(ctx, "org_id", orgId)
340336
ctx = tflog.SetField(ctx, "region", region)
341337
// Read the current scf organization via guid
342-
scfOrgResponse, err := s.client.GetOrganization(ctx, projectId, region, orgId).Execute()
338+
scfOrgResponse, err := s.client.DefaultAPI.GetOrganization(ctx, projectId, region, orgId).Execute()
343339
if err != nil {
344340
var oapiErr *oapierror.GenericOpenAPIError
345341
ok := errors.As(err, &oapiErr)
@@ -388,15 +384,15 @@ func (s *scfOrganizationResource) Update(ctx context.Context, request resource.U
388384
ctx = tflog.SetField(ctx, "org_id", orgId)
389385
ctx = tflog.SetField(ctx, "region", region)
390386

391-
org, err := s.client.GetOrganization(ctx, projectId, region, orgId).Execute()
387+
org, err := s.client.DefaultAPI.GetOrganization(ctx, projectId, region, orgId).Execute()
392388
if err != nil {
393389
core.LogAndAddError(ctx, &response.Diagnostics, "Error retrieving organization state", fmt.Sprintf("Getting organization state: %v", err))
394390
return
395391
}
396392

397393
// handle a change of the organization name or the suspended flag
398394
if name != org.GetName() || suspended != org.GetSuspended() {
399-
updatedOrg, err := s.client.UpdateOrganization(ctx, projectId, region, orgId).UpdateOrganizationPayload(
395+
updatedOrg, err := s.client.DefaultAPI.UpdateOrganization(ctx, projectId, region, orgId).UpdateOrganizationPayload(
400396
scf.UpdateOrganizationPayload{
401397
Name: &name,
402398
Suspended: &suspended,
@@ -412,9 +408,9 @@ func (s *scfOrganizationResource) Update(ctx context.Context, request resource.U
412408

413409
// handle a quota change of the org
414410
if quotaId != org.GetQuotaId() {
415-
applyOrgQuota, err := s.client.ApplyOrganizationQuota(ctx, projectId, region, orgId).ApplyOrganizationQuotaPayload(
411+
applyOrgQuota, err := s.client.DefaultAPI.ApplyOrganizationQuota(ctx, projectId, region, orgId).ApplyOrganizationQuotaPayload(
416412
scf.ApplyOrganizationQuotaPayload{
417-
QuotaId: &quotaId,
413+
QuotaId: quotaId,
418414
}).Execute()
419415
if err != nil {
420416
core.LogAndAddError(ctx, &response.Diagnostics, "Error applying organization quota", fmt.Sprintf("Processing API payload: %v", err))
@@ -460,15 +456,15 @@ func (s *scfOrganizationResource) Delete(ctx context.Context, request resource.D
460456
ctx = tflog.SetField(ctx, "region", region)
461457

462458
// Call API to delete the existing scf organization.
463-
_, err := s.client.DeleteOrganization(ctx, projectId, region, orgId).Execute()
459+
_, err := s.client.DefaultAPI.DeleteOrganization(ctx, projectId, region, orgId).Execute()
464460
if err != nil {
465461
core.LogAndAddError(ctx, &response.Diagnostics, "Error deleting scf organization", fmt.Sprintf("Calling API: %v", err))
466462
return
467463
}
468464

469465
ctx = core.LogResponse(ctx)
470466

471-
_, err = wait.DeleteOrganizationWaitHandler(ctx, s.client, projectId, model.Region.ValueString(), orgId).WaitWithContext(ctx)
467+
_, err = wait.DeleteOrganizationWaitHandler(ctx, s.client.DefaultAPI, projectId, model.Region.ValueString(), orgId).WaitWithContext(ctx)
472468
if err != nil {
473469
core.LogAndAddError(ctx, &response.Diagnostics, "Error waiting for scf org deletion", fmt.Sprintf("SCFOrganization deleting waiting: %v", err))
474470
return
@@ -511,43 +507,16 @@ func mapFields(response *scf.Organization, model *Model) error {
511507
return fmt.Errorf("model input is nil")
512508
}
513509

514-
var orgId string
515-
if response.Guid != nil {
516-
orgId = *response.Guid
517-
} else if model.OrgId.ValueString() != "" {
518-
orgId = model.OrgId.ValueString()
519-
} else {
520-
return fmt.Errorf("org id is not present")
521-
}
522-
523-
var projectId string
524-
if response.ProjectId != nil {
525-
projectId = *response.ProjectId
526-
} else if model.ProjectId.ValueString() != "" {
527-
projectId = model.ProjectId.ValueString()
528-
} else {
529-
return fmt.Errorf("project id is not present")
530-
}
531-
532-
var region string
533-
if response.Region != nil {
534-
region = *response.Region
535-
} else if model.Region.ValueString() != "" {
536-
region = model.Region.ValueString()
537-
} else {
538-
return fmt.Errorf("region is not present")
539-
}
540-
541510
// Build the ID by combining the project ID and organization id and assign the model's fields.
542-
model.Id = utils.BuildInternalTerraformId(projectId, region, orgId)
543-
model.ProjectId = types.StringValue(projectId)
544-
model.Region = types.StringValue(region)
545-
model.PlatformId = types.StringPointerValue(response.PlatformId)
546-
model.OrgId = types.StringValue(orgId)
547-
model.Name = types.StringPointerValue(response.Name)
548-
model.Status = types.StringPointerValue(response.Status)
549-
model.Suspended = types.BoolPointerValue(response.Suspended)
550-
model.QuotaId = types.StringPointerValue(response.QuotaId)
511+
model.Id = utils.BuildInternalTerraformId(response.ProjectId, response.Region, response.Guid)
512+
model.ProjectId = types.StringValue(response.ProjectId)
513+
model.Region = types.StringValue(response.Region)
514+
model.PlatformId = types.StringValue(response.PlatformId)
515+
model.OrgId = types.StringValue(response.Guid)
516+
model.Name = types.StringValue(response.Name)
517+
model.Status = types.StringValue(response.Status)
518+
model.Suspended = types.BoolValue(response.Suspended)
519+
model.QuotaId = types.StringValue(response.QuotaId)
551520
model.CreateAt = types.StringValue(response.CreatedAt.String())
552521
model.UpdatedAt = types.StringValue(response.UpdatedAt.String())
553522
return nil
@@ -560,7 +529,7 @@ func toCreatePayload(model *Model) (scf.CreateOrganizationPayload, error) {
560529
}
561530

562531
payload := scf.CreateOrganizationPayload{
563-
Name: model.Name.ValueStringPointer(),
532+
Name: model.Name.ValueString(),
564533
}
565534
if !model.PlatformId.IsNull() && !model.PlatformId.IsUnknown() {
566535
payload.PlatformId = model.PlatformId.ValueStringPointer()

0 commit comments

Comments
 (0)