@@ -41,9 +41,9 @@ type OrganizationResourceModel struct {
41
41
Description types.String `tfsdk:"description"`
42
42
Icon types.String `tfsdk:"icon"`
43
43
44
- SyncMapping types.Set `tfsdk:"org_sync_idp_groups"`
45
- GroupSync types.Object `tfsdk:"group_sync"`
46
- RoleSync types.Object `tfsdk:"role_sync"`
44
+ OrgSyncIdpGroups types.Set `tfsdk:"org_sync_idp_groups"`
45
+ GroupSync types.Object `tfsdk:"group_sync"`
46
+ RoleSync types.Object `tfsdk:"role_sync"`
47
47
}
48
48
49
49
type GroupSyncModel struct {
@@ -372,13 +372,13 @@ func (r *OrganizationResource) Create(ctx context.Context, req resource.CreateRe
372
372
orgID := data .ID .ValueUUID ()
373
373
374
374
// Apply org sync patches, if specified
375
- if ! data .SyncMapping .IsNull () {
375
+ if ! data .OrgSyncIdpGroups .IsNull () {
376
376
tflog .Trace (ctx , "updating org sync" , map [string ]any {
377
377
"orgID" : orgID ,
378
378
})
379
379
380
380
var claims []string
381
- resp .Diagnostics .Append (data .SyncMapping .ElementsAs (ctx , & claims , false )... )
381
+ resp .Diagnostics .Append (data .OrgSyncIdpGroups .ElementsAs (ctx , & claims , false )... )
382
382
if resp .Diagnostics .HasError () {
383
383
return
384
384
}
@@ -449,18 +449,18 @@ func (r *OrganizationResource) Update(ctx context.Context, req resource.UpdateRe
449
449
})
450
450
451
451
// Apply org sync patches, if specified
452
- if ! data .SyncMapping .IsNull () {
452
+ if ! data .OrgSyncIdpGroups .IsNull () {
453
453
tflog .Trace (ctx , "updating org sync mappings" , map [string ]any {
454
454
"orgID" : orgID ,
455
455
})
456
456
457
457
var state OrganizationResourceModel
458
458
resp .Diagnostics .Append (req .State .Get (ctx , & state )... )
459
459
var currentClaims []string
460
- resp .Diagnostics .Append (state .SyncMapping .ElementsAs (ctx , & currentClaims , false )... )
460
+ resp .Diagnostics .Append (state .OrgSyncIdpGroups .ElementsAs (ctx , & currentClaims , false )... )
461
461
462
462
var plannedClaims []string
463
- resp .Diagnostics .Append (data .SyncMapping .ElementsAs (ctx , & plannedClaims , false )... )
463
+ resp .Diagnostics .Append (data .OrgSyncIdpGroups .ElementsAs (ctx , & plannedClaims , false )... )
464
464
if resp .Diagnostics .HasError () {
465
465
return
466
466
}
@@ -505,13 +505,13 @@ func (r *OrganizationResource) Delete(ctx context.Context, req resource.DeleteRe
505
505
orgID := data .ID .ValueUUID ()
506
506
507
507
// Remove org sync mappings, if we were managing them
508
- if ! data .SyncMapping .IsNull () {
508
+ if ! data .OrgSyncIdpGroups .IsNull () {
509
509
tflog .Trace (ctx , "deleting org sync mappings" , map [string ]any {
510
510
"orgID" : orgID ,
511
511
})
512
512
513
513
var claims []string
514
- resp .Diagnostics .Append (data .SyncMapping .ElementsAs (ctx , & claims , false )... )
514
+ resp .Diagnostics .Append (data .OrgSyncIdpGroups .ElementsAs (ctx , & claims , false )... )
515
515
if resp .Diagnostics .HasError () {
516
516
return
517
517
}
0 commit comments