diff --git a/genesyscloud/architect_datatable_row/genesyscloud_architect_datatable_row_utils.go b/genesyscloud/architect_datatable_row/genesyscloud_architect_datatable_row_utils.go index fda07abce..c721c2b1f 100644 --- a/genesyscloud/architect_datatable_row/genesyscloud_architect_datatable_row_utils.go +++ b/genesyscloud/architect_datatable_row/genesyscloud_architect_datatable_row_utils.go @@ -51,7 +51,7 @@ func customizeDatatableRowDiff(ctx context.Context, diff *schema.ResourceDiff, m if !diff.NewValueKnown("datatable_id") { // datatable_id not yet in final state, but properties_json is marked as known. // There may be computed defaults to set on properties_json that we do not know yet. - diff.SetNewComputed("properties_json") + _ = diff.SetNewComputed("properties_json") return nil } @@ -109,7 +109,7 @@ func customizeDatatableRowDiff(ctx context.Context, diff *schema.ResourceDiff, m return fmt.Errorf("Failure to marshal properties for %s: %s", id, err) } - diff.SetNew("properties_json", string(result)) + _ = diff.SetNew("properties_json", string(result)) return nil } diff --git a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row.go b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row.go index 027322db2..e7af30499 100644 --- a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row.go +++ b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row.go @@ -121,8 +121,8 @@ func readArchitectDatatableRow(ctx context.Context, d *schema.ResourceData, meta return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(ResourceType, fmt.Sprintf("Failed to read Datatable Row %s | error: %s", d.Id(), getErr), resp)) } - d.Set("datatable_id", tableId) - d.Set("key_value", keyStr) + _ = d.Set("datatable_id", tableId) + _ = d.Set("key_value", keyStr) // The key value is exposed through a separate attribute, so it should be removed from the value map delete(*row, "key") @@ -131,7 +131,7 @@ func readArchitectDatatableRow(ctx context.Context, d *schema.ResourceData, meta if err != nil { return retry.NonRetryableError(fmt.Errorf("Failed to marshal row map %v: %v", *row, err)) } - d.Set("properties_json", string(valueBytes)) + _ = d.Set("properties_json", string(valueBytes)) log.Printf("Read Datatable Row %s", d.Id()) return cc.CheckState(d) diff --git a/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go b/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go index 878d388c1..2364b1d50 100644 --- a/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go +++ b/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go @@ -235,7 +235,7 @@ func (a *architectIvrProxy) uploadArchitectIvrWithChunkingLogic(ctx context.Cont if !post { // Get copy of ivr before this update log.Printf("Reading IVR %s to save copy of the configuration before attempting an update", id) - ivrBeforeUpdate, resp, err = a.getArchitectIvr(ctx, id) + ivrBeforeUpdate, _, err = a.getArchitectIvr(ctx, id) if err != nil { log.Printf("Failed to save a copy of IVR %s before starting chunking logic: %v", id, err) } diff --git a/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go b/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go index 757aed0f1..de0f41dfe 100644 --- a/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go +++ b/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go @@ -107,28 +107,24 @@ func getAllArchitectSchedulegroupsFn(ctx context.Context, p *architectSchedulegr scheduleGroups, apiResponse, err := p.architectApi.GetArchitectSchedulegroups(1, pageSize, "", "", "", "", nil) if err != nil { - return nil, apiResponse, fmt.Errorf("Failed to get schedule group: %v", err) + return nil, apiResponse, fmt.Errorf("failed to get schedule group: %v", err) } if scheduleGroups.Entities == nil || len(*scheduleGroups.Entities) == 0 { return &allScheduleGroups, apiResponse, nil } - for _, scheduleGroup := range *scheduleGroups.Entities { - allScheduleGroups = append(allScheduleGroups, scheduleGroup) - } + allScheduleGroups = append(allScheduleGroups, *scheduleGroups.Entities...) for pageNum := 2; pageNum <= *scheduleGroups.PageCount; pageNum++ { scheduleGroups, apiResponse, err := p.architectApi.GetArchitectSchedulegroups(pageNum, pageSize, "", "", "", "", nil) if err != nil { - return nil, apiResponse, fmt.Errorf("Failed to get schedule group: %v", err) + return nil, apiResponse, fmt.Errorf("failed to get schedule group: %v", err) } if scheduleGroups.Entities == nil || len(*scheduleGroups.Entities) == 0 { break } - for _, scheduleGroup := range *scheduleGroups.Entities { - allScheduleGroups = append(allScheduleGroups, scheduleGroup) - } + allScheduleGroups = append(allScheduleGroups, *scheduleGroups.Entities...) } return &allScheduleGroups, apiResponse, nil } diff --git a/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go b/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go index a79c9e8c4..f7f1d2b0c 100644 --- a/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go +++ b/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go @@ -10,6 +10,7 @@ import ( resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -79,34 +80,27 @@ func readArchitectSchedulegroups(ctx context.Context, d *schema.ResourceData, me return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(ResourceType, fmt.Sprintf("Failed to read schedule group %s | error: %s", d.Id(), getErr), proxyResponse)) } - d.Set("name", *scheduleGroup.Name) - d.Set("division_id", *scheduleGroup.Division.Id) - d.Set("description", nil) - if scheduleGroup.Description != nil { - d.Set("description", *scheduleGroup.Description) - } - - d.Set("time_zone", nil) - if scheduleGroup.TimeZone != nil { - d.Set("time_zone", *scheduleGroup.TimeZone) - } + resourcedata.SetNillableValue(d, "name", scheduleGroup.Name) + resourcedata.SetNillableValue(d, "description", scheduleGroup.Description) + resourcedata.SetNillableReferenceWritableDivision(d, "division_id", scheduleGroup.Division) + resourcedata.SetNillableValue(d, "time_zone", scheduleGroup.TimeZone) if scheduleGroup.OpenSchedules != nil { - d.Set("open_schedules_id", util.SdkDomainEntityRefArrToSet(*scheduleGroup.OpenSchedules)) + _ = d.Set("open_schedules_id", util.SdkDomainEntityRefArrToSet(*scheduleGroup.OpenSchedules)) } else { - d.Set("open_schedules_id", nil) + _ = d.Set("open_schedules_id", nil) } if scheduleGroup.ClosedSchedules != nil { - d.Set("closed_schedules_id", util.SdkDomainEntityRefArrToSet(*scheduleGroup.ClosedSchedules)) + _ = d.Set("closed_schedules_id", util.SdkDomainEntityRefArrToSet(*scheduleGroup.ClosedSchedules)) } else { - d.Set("closed_schedules_id", nil) + _ = d.Set("closed_schedules_id", nil) } if scheduleGroup.HolidaySchedules != nil { - d.Set("holiday_schedules_id", util.SdkDomainEntityRefArrToSet(*scheduleGroup.HolidaySchedules)) + _ = d.Set("holiday_schedules_id", util.SdkDomainEntityRefArrToSet(*scheduleGroup.HolidaySchedules)) } else { - d.Set("holiday_schedules_id", nil) + _ = d.Set("holiday_schedules_id", nil) } log.Printf("Read schedule group %s %s", d.Id(), *scheduleGroup.Name) diff --git a/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go b/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go index 56e75806f..1c750ab50 100644 --- a/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go +++ b/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go @@ -3,14 +3,13 @@ package auth_role import ( "context" "fmt" - "terraform-provider-genesyscloud/genesyscloud/provider" - "terraform-provider-genesyscloud/genesyscloud/util" - "time" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/mypurecloud/platform-client-sdk-go/v149/platformclientv2" + "terraform-provider-genesyscloud/genesyscloud/provider" + "terraform-provider-genesyscloud/genesyscloud/util" + "time" ) /* @@ -18,27 +17,35 @@ import ( for the resource. */ -// dataSourceAuthRoleRead retrieves by name the id in question +// DataSourceAuthRoleRead retrieves by name the id in question func DataSourceAuthRoleRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { - sdkConfig := m.(*provider.ProviderMeta).ClientConfig - authAPI := platformclientv2.NewAuthorizationApiWithConfig(sdkConfig) - - name := d.Get("name").(string) - - // Query role by name. Retry in case search has not yet indexed the role. - return util.WithRetries(ctx, 15*time.Second, func() *retry.RetryError { - const pageSize = 100 - const pageNum = 1 - roles, proxyResponse, getErr := authAPI.GetAuthorizationRoles(pageSize, pageNum, "", nil, "", "", name, nil, nil, false, nil) - if getErr != nil { - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(ResourceType, fmt.Sprintf("Error requesting role %s | error: %s", name, getErr), proxyResponse)) - } + var ( + sdkConfig = m.(*provider.ProviderMeta).ClientConfig + proxy = getAuthRoleProxy(sdkConfig) + + name = d.Get("name").(string) - if roles.Entities == nil || len(*roles.Entities) == 0 { - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(ResourceType, fmt.Sprintf("No authorization roles found with name %s", name), proxyResponse)) + response *platformclientv2.APIResponse + id string + ) + + diagErr := util.WithRetries(ctx, 15*time.Second, func() *retry.RetryError { + roleId, retryable, resp, err := proxy.getAuthRoleIdByName(ctx, name) + if err != nil { + response = resp + if retryable { + return retry.RetryableError(err) + } + return retry.NonRetryableError(err) } - role := (*roles.Entities)[0] - d.SetId(*role.Id) + id = roleId return nil }) + + if diagErr != nil { + return util.BuildAPIDiagnosticError(ResourceType, fmt.Sprintf("%v", diagErr), response) + } + + d.SetId(id) + return nil } diff --git a/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go b/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go index 325bc7b8c..8e0c22175 100644 --- a/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go +++ b/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go @@ -3,7 +3,6 @@ package auth_role import ( "context" "fmt" - rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" "github.com/mypurecloud/platform-client-sdk-go/v149/platformclientv2" @@ -169,8 +168,25 @@ func getAllAuthRoleFn(ctx context.Context, p *authRoleProxy) (*[]platformclientv } // getAuthRoleIdByNameFn is an implementation of the function to get a Genesys Cloud auth role by name -func getAuthRoleIdByNameFn(ctx context.Context, p *authRoleProxy, name string) (id string, retryable bool, response *platformclientv2.APIResponse, err error) { - return "", false, nil, nil +func getAuthRoleIdByNameFn(_ context.Context, p *authRoleProxy, name string) (id string, retryable bool, response *platformclientv2.APIResponse, err error) { + const pageSize = 100 + const pageNum = 1 + roles, resp, getErr := p.authorizationApi.GetAuthorizationRoles(pageSize, pageNum, "", nil, "", "", name, nil, nil, false, nil) + if getErr != nil { + return "", false, resp, getErr + } + + if roles.Entities == nil || len(*roles.Entities) == 0 { + return "", true, resp, fmt.Errorf("no authorization roles found with name %s", name) + } + + for _, role := range *roles.Entities { + if *role.Name == name { + return *role.Id, false, resp, nil + } + } + + return "", true, resp, fmt.Errorf("no authorization roles found with name %s", name) } // getAuthRoleByIdFn is an implementation of the function to get a Genesys Cloud auth role by Id diff --git a/genesyscloud/auth_role/resource_genesyscloud_auth_role.go b/genesyscloud/auth_role/resource_genesyscloud_auth_role.go index 30dbf3dbd..d7b378813 100644 --- a/genesyscloud/auth_role/resource_genesyscloud_auth_role.go +++ b/genesyscloud/auth_role/resource_genesyscloud_auth_role.go @@ -107,20 +107,20 @@ func readAuthRole(ctx context.Context, d *schema.ResourceData, meta interface{}) return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(ResourceType, fmt.Sprintf("Failed to read role %s | error: %s", d.Id(), getErr), proxyResponse)) } - d.Set("name", *role.Name) + _ = d.Set("name", *role.Name) resourcedata.SetNillableValue(d, "description", role.Description) resourcedata.SetNillableValue(d, "default_role_id", role.DefaultRoleId) if role.Permissions != nil { - d.Set("permissions", lists.StringListToSet(*role.Permissions)) + _ = d.Set("permissions", lists.StringListToSet(*role.Permissions)) } else { - d.Set("permissions", nil) + _ = d.Set("permissions", nil) } if role.PermissionPolicies != nil { - d.Set("permission_policies", flattenRolePermissionPolicies(*role.PermissionPolicies)) + _ = d.Set("permission_policies", flattenRolePermissionPolicies(*role.PermissionPolicies)) } else { - d.Set("permission_policies", nil) + _ = d.Set("permission_policies", nil) } log.Printf("Read role %s %s", d.Id(), *role.Name) diff --git a/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go b/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go index 907b783fc..cc55ee293 100644 --- a/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go +++ b/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go @@ -270,11 +270,9 @@ func TestAccResourceAuthRoleConditions(t *testing.T) { generateRolePermPolicyCondTerm( varNameQueue, opEq, - fmt.Sprintf(` - operands { + `operands { type = "USER" - } - `), + }`, ), ), ), @@ -304,11 +302,9 @@ func TestAccResourceAuthRoleConditions(t *testing.T) { generateRolePermPolicyCondTerm( varNameQueue, opEq, - fmt.Sprintf(` - operands { + `operands { type = "VARIABLE" - } - `), + }`, ), ), ), @@ -398,10 +394,10 @@ func validateRolePermissions(roleResourcePath string, permissions ...string) res return func(state *terraform.State) error { roleResource, ok := state.RootModule().Resources[roleResourcePath] if !ok { - return fmt.Errorf("Failed to find role %s in state", roleResourcePath) + return fmt.Errorf("failed to find role %s in state", roleResourcePath) } - numPermsAttr, _ := roleResource.Primary.Attributes["permissions.#"] + numPermsAttr := roleResource.Primary.Attributes["permissions.#"] numPerms, _ := strconv.Atoi(numPermsAttr) configPerms := make([]string, numPerms) for i := 0; i < numPerms; i++ { @@ -431,13 +427,13 @@ func validatePermissionPolicyTest(roleResourcePath string, domain string, entity } roleAttrs := roleResource.Primary.Attributes - numPermsAttr, _ := roleAttrs["permission_policies.#"] + numPermsAttr := roleAttrs["permission_policies.#"] numPerms, _ := strconv.Atoi(numPermsAttr) for i := 0; i < numPerms; i++ { if roleAttrs["permission_policies."+strconv.Itoa(i)+".domain"] == domain && roleAttrs["permission_policies."+strconv.Itoa(i)+".entity_name"] == entityName { - numActionsAttr, _ := roleAttrs["permission_policies."+strconv.Itoa(i)+".action_set.#"] + numActionsAttr := roleAttrs["permission_policies."+strconv.Itoa(i)+".action_set.#"] numActions, _ := strconv.Atoi(numActionsAttr) stateActions := make([]string, numActions) for j := 0; j < numActions; j++ { @@ -479,7 +475,7 @@ func validatePermPolicyCondition( } roleAttrs := roleResource.Primary.Attributes - numPermsAttr, _ := roleAttrs["permission_policies.#"] + numPermsAttr := roleAttrs["permission_policies.#"] numPerms, _ := strconv.Atoi(numPermsAttr) for i := 0; i < numPerms; i++ { strNum := strconv.Itoa(i) @@ -487,7 +483,7 @@ func validatePermPolicyCondition( roleAttrs["permission_policies."+strNum+".entity_name"] == entityName { // Check condition exists and matches - numCondAttr, _ := roleAttrs["permission_policies."+strNum+".conditions.#"] + numCondAttr := roleAttrs["permission_policies."+strNum+".conditions.#"] numCond, _ := strconv.Atoi(numCondAttr) if numCond == 0 { diff --git a/genesyscloud/consistency_checker/consistency_checker.go b/genesyscloud/consistency_checker/consistency_checker.go index d04d15f27..51790f176 100644 --- a/genesyscloud/consistency_checker/consistency_checker.go +++ b/genesyscloud/consistency_checker/consistency_checker.go @@ -201,21 +201,6 @@ func compareValues(oldValue, newValue interface{}, slice1Index, slice2Index int, } } -func (c *ConsistencyCheck) isComputed(d *schema.ResourceData, key string) bool { - schemaInterface := getUnexportedField(reflect.ValueOf(d).Elem().FieldByName("schema")) - resourceSchema := schemaInterface.(map[string]*schema.Schema) - - k := key - if strings.Contains(key, ".") { - k = strings.Split(key, ".")[0] - } - if resourceSchema[k] == nil { - return false - } - - return resourceSchema[k].Computed -} - func (c *ConsistencyCheck) CheckState(currentState *schema.ResourceData) *retry.RetryError { if c.isEmptyState == nil { panic("consistencyCheck must be initialized with NewConsistencyCheck") diff --git a/genesyscloud/conversations_messaging_integrations_open/genesyscloud_conversations_messaging_integrations_open_proxy.go b/genesyscloud/conversations_messaging_integrations_open/genesyscloud_conversations_messaging_integrations_open_proxy.go index 3d757533b..0095c8708 100644 --- a/genesyscloud/conversations_messaging_integrations_open/genesyscloud_conversations_messaging_integrations_open_proxy.go +++ b/genesyscloud/conversations_messaging_integrations_open/genesyscloud_conversations_messaging_integrations_open_proxy.go @@ -98,34 +98,31 @@ func createConversationsMessagingIntegrationsOpenFn(ctx context.Context, p *conv } // getAllConversationsMessagingIntegrationsOpenFn is the implementation for retrieving all conversations messaging integrations open in Genesys Cloud -func getAllConversationsMessagingIntegrationsOpenFn(ctx context.Context, p *conversationsMessagingIntegrationsOpenProxy) (*[]platformclientv2.Openintegration, *platformclientv2.APIResponse, error) { +func getAllConversationsMessagingIntegrationsOpenFn(_ context.Context, p *conversationsMessagingIntegrationsOpenProxy) (*[]platformclientv2.Openintegration, *platformclientv2.APIResponse, error) { var allOpenIntegrationRequests []platformclientv2.Openintegration const pageSize = 100 openIntegrationRequests, resp, err := p.conversationsApi.GetConversationsMessagingIntegrationsOpen(pageSize, 1, "", "", "") if err != nil { - return nil, resp, fmt.Errorf("Failed to get open integration request: %v", err) + return nil, resp, fmt.Errorf("failed to get open integration request: %v", err) } if openIntegrationRequests.Entities == nil || len(*openIntegrationRequests.Entities) == 0 { return &allOpenIntegrationRequests, resp, nil } - for _, openIntegrationRequest := range *openIntegrationRequests.Entities { - allOpenIntegrationRequests = append(allOpenIntegrationRequests, openIntegrationRequest) - } + + allOpenIntegrationRequests = append(allOpenIntegrationRequests, *openIntegrationRequests.Entities...) for pageNum := 2; pageNum <= *openIntegrationRequests.PageCount; pageNum++ { openIntegrationRequests, resp, err := p.conversationsApi.GetConversationsMessagingIntegrationsOpen(pageSize, pageNum, "", "", "") if err != nil { - return nil, resp, fmt.Errorf("Failed to get open integration request: %v", err) + return nil, resp, fmt.Errorf("failed to get open integration request: %v", err) } if openIntegrationRequests.Entities == nil || len(*openIntegrationRequests.Entities) == 0 { break } - for _, openIntegrationRequest := range *openIntegrationRequests.Entities { - allOpenIntegrationRequests = append(allOpenIntegrationRequests, openIntegrationRequest) - } + allOpenIntegrationRequests = append(allOpenIntegrationRequests, *openIntegrationRequests.Entities...) } return &allOpenIntegrationRequests, resp, nil diff --git a/genesyscloud/conversations_messaging_supportedcontent_default/genesyscloud_conversations_messaging_supportedcontent_default_init_test.go b/genesyscloud/conversations_messaging_supportedcontent_default/genesyscloud_conversations_messaging_supportedcontent_default_init_test.go index a33e96403..9f7aaaad3 100644 --- a/genesyscloud/conversations_messaging_supportedcontent_default/genesyscloud_conversations_messaging_supportedcontent_default_init_test.go +++ b/genesyscloud/conversations_messaging_supportedcontent_default/genesyscloud_conversations_messaging_supportedcontent_default_init_test.go @@ -14,15 +14,11 @@ import ( used in testing the conversations_messaging_supportedcontent_default resource. */ -// providerDataSources holds a map of all registered datasources -var providerDataSources map[string]*schema.Resource - // providerResources holds a map of all registered resources var providerResources map[string]*schema.Resource type registerTestInstance struct { - resourceMapMutex sync.RWMutex - datasourceMapMutex sync.RWMutex + resourceMapMutex sync.RWMutex } // registerTestResources registers all resources used in the tests @@ -36,7 +32,6 @@ func (r *registerTestInstance) registerTestResources() { // initTestResources initializes all test resources and data sources. func initTestResources() { - providerDataSources = make(map[string]*schema.Resource) providerResources = make(map[string]*schema.Resource) regInstance := ®isterTestInstance{} diff --git a/genesyscloud/conversations_messaging_supportedcontent_default/resource_genesyscloud_conversations_messaging_supportedcontent_default_schema.go b/genesyscloud/conversations_messaging_supportedcontent_default/resource_genesyscloud_conversations_messaging_supportedcontent_default_schema.go index 4f4287643..17410565e 100644 --- a/genesyscloud/conversations_messaging_supportedcontent_default/resource_genesyscloud_conversations_messaging_supportedcontent_default_schema.go +++ b/genesyscloud/conversations_messaging_supportedcontent_default/resource_genesyscloud_conversations_messaging_supportedcontent_default_schema.go @@ -16,6 +16,7 @@ resource_genesycloud_conversations_messaging_supportedcontent_default_schema.go 3. The datasource schema definitions for the conversations_messaging_supportedcontent_default datasource. 4. The resource exporter configuration for the conversations_messaging_supportedcontent_default exporter. */ + const ResourceType = "genesyscloud_conversations_messaging_supportedcontent_default" // SetRegistrar registers all of the resources, datasources and exporters in the package diff --git a/genesyscloud/resource_exporter/resource_name_sanitizer.go b/genesyscloud/resource_exporter/resource_name_sanitizer.go index 41ed125a8..4c40c5c6e 100644 --- a/genesyscloud/resource_exporter/resource_name_sanitizer.go +++ b/genesyscloud/resource_exporter/resource_name_sanitizer.go @@ -7,7 +7,7 @@ import ( "log" "strconv" "strings" - feature_toggles "terraform-provider-genesyscloud/genesyscloud/util/feature_toggles" + featureToggles "terraform-provider-genesyscloud/genesyscloud/util/feature_toggles" unidecode "github.com/mozillazg/go-unidecode" ) @@ -29,7 +29,7 @@ type sanitizerOptimized struct{} func NewSanitizerProvider() *SanitizerProvider { // Check if the environment variable is set - optimizedExists := feature_toggles.ExporterSanitizerOptimizedToggleExists() + optimizedExists := featureToggles.ExporterSanitizerOptimizedToggleExists() //If the GENESYS_SANITIZER_TIME_OPTIMIZED is set use the updated time optimized sanitizer if optimizedExists {