@@ -124,11 +124,6 @@ type targetResourceModel struct {
124124 Entitlements []entitlementModel `tfsdk:"entitlements"`
125125}
126126
127- type excludedResourceMode struct {
128- ResourceId types.String `tfsdk:"resource_id"`
129- ResourceType types.String `tfsdk:"resource_type"`
130- }
131-
132127type reviewerSettingsModel struct {
133128 Type types.String `tfsdk:"type"`
134129 BulkDecisionDisabled types.Bool `tfsdk:"bulk_decision_disabled"`
@@ -911,7 +906,7 @@ func applyCampaignsToState(ctx context.Context, resp *oktaInternalGovernance.Cam
911906 if resp .NotificationSettings .NotifyReviewPeriodEnd .Get () != nil {
912907 c .NotificationSettings .NotifyReviewPeriodEnd = types .BoolValue (* resp .NotificationSettings .NotifyReviewPeriodEnd .Get ())
913908 }
914- if resp . NotificationSettings . RemindersReviewerBeforeCampaignCloseInSecs != nil && len (resp .NotificationSettings .RemindersReviewerBeforeCampaignCloseInSecs ) > 0 {
909+ if len (resp .NotificationSettings .RemindersReviewerBeforeCampaignCloseInSecs ) > 0 {
915910 reminders := make ([]int64 , 0 , len (resp .NotificationSettings .RemindersReviewerBeforeCampaignCloseInSecs ))
916911 for _ , v := range resp .NotificationSettings .RemindersReviewerBeforeCampaignCloseInSecs {
917912 reminders = append (reminders , int64 (v ))
@@ -930,7 +925,7 @@ func applyCampaignsToState(ctx context.Context, resp *oktaInternalGovernance.Cam
930925 if resp .PrincipalScopeSettings .Type != "" {
931926 c .PrincipalScope .Type = types .StringValue (string (resp .PrincipalScopeSettings .Type ))
932927 }
933- if resp . PrincipalScopeSettings . ExcludedUserIds != nil && len (resp .PrincipalScopeSettings .ExcludedUserIds ) > 0 {
928+ if len (resp .PrincipalScopeSettings .ExcludedUserIds ) > 0 {
934929 excluded := make ([]attr.Value , 0 , len (resp .PrincipalScopeSettings .ExcludedUserIds ))
935930 for _ , id := range resp .PrincipalScopeSettings .ExcludedUserIds {
936931 excluded = append (excluded , types .StringValue (id ))
@@ -943,7 +938,7 @@ func applyCampaignsToState(ctx context.Context, resp *oktaInternalGovernance.Cam
943938 } else {
944939 c .PrincipalScope .ExcludedUserIds = types .ListNull (types .StringType )
945940 }
946- if resp . PrincipalScopeSettings . GroupIds != nil && len (resp .PrincipalScopeSettings .GroupIds ) > 0 {
941+ if len (resp .PrincipalScopeSettings .GroupIds ) > 0 {
947942 groupIds := make ([]attr.Value , 0 , len (resp .PrincipalScopeSettings .GroupIds ))
948943 for _ , id := range resp .PrincipalScopeSettings .GroupIds {
949944 groupIds = append (groupIds , types .StringValue (id ))
@@ -958,7 +953,7 @@ func applyCampaignsToState(ctx context.Context, resp *oktaInternalGovernance.Cam
958953 if resp .PrincipalScopeSettings .OnlyIncludeUsersWithSODConflicts != nil {
959954 c .PrincipalScope .OnlyIncludeUsersWithSODConflicts = types .BoolValue (* resp .PrincipalScopeSettings .OnlyIncludeUsersWithSODConflicts )
960955 }
961- if resp . PrincipalScopeSettings . UserIds != nil && len (resp .PrincipalScopeSettings .UserIds ) > 0 {
956+ if len (resp .PrincipalScopeSettings .UserIds ) > 0 {
962957 listVal , _ := types .ListValueFrom (ctx , types .StringType , resp .PrincipalScopeSettings .UserIds )
963958 c .PrincipalScope .UserIds = listVal
964959 } else {
@@ -1027,8 +1022,6 @@ func (r *campaignResource) Delete(ctx context.Context, req resource.DeleteReques
10271022 )
10281023 return
10291024 }
1030-
1031- return
10321025}
10331026
10341027func buildCampaign (d campaignResourceModel ) oktaInternalGovernance.CampaignMutable {
0 commit comments