Skip to content

Commit 9212b05

Browse files
committed
removes unused code
1 parent 354ff61 commit 9212b05

3 files changed

Lines changed: 4 additions & 20 deletions

File tree

okta/fwprovider/framework_provider.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ func (p *FrameworkProvider) Resources(_ context.Context) []func() resource.Resou
227227
// Append resources from various modules
228228
resources = append(resources, idaas.FWProviderResources()...)
229229
resources = append(resources, governance.FWProviderResources()...)
230-
resources = append(resources)
231230

232231
return resources
233232
}

okta/services/governance/resource_campaign.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
132127
type 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

10341027
func buildCampaign(d campaignResourceModel) oktaInternalGovernance.CampaignMutable {

okta/services/governance/resource_entitlement.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ type entitlementResource struct {
2626
*config.Config
2727
}
2828

29-
type entitlementUpdate struct {
30-
Op types.String `tfsdk:"op"`
31-
Path types.String `tfsdk:"path"`
32-
RefType types.String `tfsdk:"ref_type"`
33-
Value types.String `tfsdk:"value"`
34-
Values *entitlementValuesModel `tfsdk:"values"`
35-
}
36-
3729
type entitlementResourceModel struct {
3830
Id types.String `tfsdk:"id"`
3931
DataType types.String `tfsdk:"data_type"`

0 commit comments

Comments
 (0)