From 106fba70233e654c82e251a1975be15107d53cc3 Mon Sep 17 00:00:00 2001 From: shrutisuryawanshigenesys Date: Wed, 10 Jul 2024 12:20:49 -0400 Subject: [PATCH] Merge Dev to Main - Release v1.42.0 (#1151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews * Fix acceptance tests - TCA and Prod (#1033) * Fix edge,export,script test,Jenkin to run tca&prod * Fix export & integration tests * Fix auth tests Fix auth tests * fix tests * resolve conflicts * move assignregion func, remove commented function modify to return empty string - assignregion func return default region --------- Co-authored-by: Monisha Padmavathi Ragavan * Bug/devtooling 597 - Routing email route test failing (#1039) * Added call to cleanup function * linter * adding hotfix to pr labeler config file (#1042) * bug/DEVTOOLING-436 - Added cleanup function for webdeployments resources (#1038) * Added cleanup function for webdeployments resources * fixing conflict * Made requested changes * Made requested changes * Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.34.0 (#1047) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.33.0 to 2.34.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.33.0...v2.34.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bug/devtooling 287 temp disable cchecker (#1037) * removed consistency checker * changed DID number * phoneUpdated * Merging dev to main for v1.38.0 (#1036) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * NO-JIRA: Fixing nil pointer in consistency checker (#1041) * Fixed nil pointer in consistency checker * Fixed a few more nil pointers * Fixing nil pointer (#1045) * merged with dev --------- Signed-off-by: dependabot[bot] Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * Fixing up provider docs (#1046) * Fix Export Version problem (#1049) * Logging error in queue create/update instead of failing (#1050) * Refactor/devtooling 395 (#1044) * refactor/DEVTOOLING-395 - adding architect_schedules package * Addressed PR comments * added caching in schedules * Report Generation & testcase fix (#1051) * Report generation generate report generate report * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests * fix tests * fix tests fix tests fix tests * fix tests * fix report * fix report * fix tests fix tests * Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.34.0 (#1047) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.33.0 to 2.34.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.33.0...v2.34.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bug/devtooling 287 temp disable cchecker (#1037) * removed consistency checker * changed DID number * phoneUpdated * Merging dev to main for v1.38.0 (#1036) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * NO-JIRA: Fixing nil pointer in consistency checker (#1041) * Fixed nil pointer in consistency checker * Fixed a few more nil pointers * Fixing nil pointer (#1045) * merged with dev --------- Signed-off-by: dependabot[bot] Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * Fixing up provider docs (#1046) * fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests --------- Signed-off-by: dependabot[bot] Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * Add extra check for dependency resolution (#1052) * Devtooling 604: Infinite loop retrieving knowledge documents (#1053) * DEVTOOLING-282 * Adding log message indicating we're hitting the specific scenario for which the integration no longer exist * working around cycling dependencies per charliecon recommendation * adding implementation function getIntegrationByIdFn * Export integration credential only if it matches the expected format - DEVTOOLING-310 * infite loop bugfix --------- Co-authored-by: Will <37446330+williamjeuniaux@users.noreply.github.com> * Feat/COBROWSE-2404 add cobrowse config field (#1054) * made changes similar to what Mateusz did for other fields * updated version * mod and sum fix --------- Co-authored-by: ivan * No jira: Fixing dev with go generate & go mod tidy (#1057) * Fixed go.mod + removed refs to old sdk version * Small refactoring + go generate * DEVTOOLING-592: Changed team members logic (#1055) * Changed team members logic * moved function * Updated docs * Updated docs * Updated docs * Updated docs * Rand go generate * Bump github.com/nyaruka/phonenumbers from 1.3.5 to 1.3.6 (#1056) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.5 to 1.3.6. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.5...v1.3.6) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Feat/devtooling-477: Site Outbound Routes Resource (#1048) * Moving outbound routes to own package * Continued with outbound routes * Finished outboudn routes resource * Ran linter and added exporter * Added api to doc * Added caching * Fixed small bug * Made requested changes * Fixed go version * No jira: fix dev (#1059) * removed ref to old sdk * logging outbound route export error instead of failing * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.2 to 0.19.3 (#1062) Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.2 to 0.19.3. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.2...v0.19.3) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Cache for Data Sources (#1064) * Cache for Data Sources * fix context issue during actual run * DEVTOOLING-603: Media recording poilicies missing from export (#1063) * Caling api manually instead of using sdk * Small change to data source * Bump golang.org/x/net from 0.25.0 to 0.26.0 (#1072) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.25.0 to 0.26.0. - [Commits](https://github.com/golang/net/compare/v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.3 to 0.19.4 (#1073) Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.3 to 0.19.4. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.3...v0.19.4) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Feat/devtooling 610 (#1065) * added data source for routing email route * added data source files * changes for name to pattern * updated docs * conflicts resolved * comments resolved for feat/DEVTOOLING-610 * Fixing Tests By removing unsupported arguments (#1070) * Fixing test (#1074) * Refactor/devtooling 156 (#1060) * idp_adfs refactoring * made changes for the getalladfs func * error handling changes * changes done according to unrefractor resource * changes return type * did changes for test idp_adfs * bug fixes * resolved comments * resolved comments * resolved comments * Bug/devtooling 584 (#1071) * Cache for Data Sources * fix context issue during actual run * pushing changes * removed debugging logger * addressed PR changes * updated note * resolved merge conflicts --------- Co-authored-by: HemanthDogiparthi12 Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * fix api call strategy (#1075) * [JM-1457]: Add resource for journey views (#1067) * Merging dev to main for v1.39.0 (#1061) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews * Fix acceptance tests - TCA and Prod (#1033) * Fix edge,export,script test,Jenkin to run tca&prod * Fix export & integration tests * Fix auth tests Fix auth tests * fix tests * resolve conflicts * move assignregion func, remove commented function modify to return empty string - assignregion func return default region --------- Co-authored-by: Monisha Padmavathi Ragavan * Bug/devtooling 597 - Routing email route test failing (#1039) * Added call to cleanup function * linter * adding hotfix to pr labeler config file (#1042) * bug/DEVTOOLING-436 - Added cleanup function for webdeployments resources (#1038) * Added cleanup function for webdeployments resources * fixing conflict * Made requested changes * Made requested changes * Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.34.0 (#1047) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.33.0 to 2.34.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.33.0...v2.34.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bug/devtooling 287 temp disable cchecker (#1037) * removed consistency checker * changed DID number * phoneUpdated * Merging dev to main for v1.38.0 (#1036) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to rou… * Fixes #1078 (#1079) * Coverage Report and fixing tests (#1080) * Report generation generate report generate report * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests * fix tests * fix tests fix tests fix tests * fix tests * fix report * fix report * fix tests fix tests * Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.34.0 (#1047) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.33.0 to 2.34.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.33.0...v2.34.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bug/devtooling 287 temp disable cchecker (#1037) * removed consistency checker * changed DID number * phoneUpdated * Merging dev to main for v1.38.0 (#1036) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * NO-JIRA: Fixing nil pointer in consistency checker (#1041) * Fixed nil pointer in consistency checker * Fixed a few more nil pointers * Fixing nil pointer (#1045) * merged with dev --------- Signed-off-by: dependabot[bot] Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * Fixing up provider docs (#1046) * fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * Package wise coverage report * Package wise coverage report * fix tests * fix tests * fix tests * fix tests * fix tests * fix tests * Modify coverage report to list all data * Display coverage report, data in same page * fix newly added tests * fix newly added tests * fix user tests * fix failing tests * Cache for Data Sources (#1064) * Cache for Data Sources * fix context issue during actual run * fix tests Fix failing tests fix tests * Add didpool for phoneresource * fix tests * fix tests * modify logging modify logging modify logging modify logging --------- Signed-off-by: dependabot[bot] Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> * fixing go vet warnings/errors (#1081) * refactored idp_okta resource (#1069) * refactored idp_okta resource * updated the docs * comments resolved * comments resolved * ran go generate * updated docs and bug fix * fix update issues for workType (#1076) * fix update issues for workType * Delete genesyscloud/task_management_worktype/WorkType.go * Fix caching issue (#1082) * Fix caching issue * fix docs * Feature/fix unit tests (#1090) * Update worktype * fix test case * fix exporter crash (#1101) * fix exporter crash problem * review comment * added caching capabilities (#1088) * Update Description (#1104) * [JM-1466]: Upgrade the platform client version (#1100) * [JM-1457]: Add resource for journey views * [JM-1457]: import journey view as variable in main.go * [JM-1457]: Remove print statements * [JM-1457]: Refactor code * Remove default values from optional fields * [JM-1457]: Refactor and generate the doc * Remove default value from eventCountType * [JM-1457]: Filter should be nil if not given * Merge with dev * [JM-1457]: Filter should be nil if not given * [JM-1466]: Upgrade platform client version --------- Co-authored-by: Mohammed Islam * Devtooling 501: Removing support for v1 and v1-http widget deployments (#1097) * Updated widget_deployment schema to reflect API changes * updated example widget deployment resource * Removed old client_config field from schema and fixed data source test * Returned client_config field and marked it as deprecated * refactor/Tidy up journey_segment resource tests/doc (#1103) * Fix issues identified in DEVTOOLING-662 as a result of testing DEVTOOLING-477 (#1109) * Updating docs (#1110) * feat/devtooling 71: Outbound contact list contact resource (#1084) * Creating contact_list_contact resource * Defined contact list contact resource schema * Defined more boiler plate code for contact package + started working on create func * implemented read function for contact resource * finished crud operations and started testing * Refactored calls to GenerateMap test util function * Necessary refactoring to get contact test passing * extending contact_list_contact tests * Removed id field from schema + added example data * go generate * Adding contact_list_contact exporter * Updated gc sdk version and finished contact exporter * finishing contact exporter * DEVTOOLING-643 : Adds support for using sanitized names in export. (#1106) * Adds support for using sanitized names in export. This allows you to copy the names from the results of an export and reuse them as include/exclude filters in a new export * Fix Typo * Fix quotes * Bug/devtooling 659 (#1108) * added nil check * added nil check for line properties * Bump github.com/hashicorp/hcl/v2 from 2.20.1 to 2.21.0 (#1113) Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.20.1 to 2.21.0. - [Release notes](https://github.com/hashicorp/hcl/releases) - [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/hcl/compare/v2.20.1...v2.21.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/hcl/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Feat/devtooling 187 - Refactor routing settings (#1089) * Refactored Routing Settings * Added missing attributes to schema * Removed data source * Made requested Changes * Fixing merge conflicts * DEVTOOLING-601: Queue member assignment taking long time (#1107) * Sped up member assignment * Used diag error wrapper * Fixes #1086 + some minor refactoring (#1111) * Feat/devtooling 618 (#1083) * code for compression * added compression logic in generateoutput func * added fields compress and passphrase * removed passphrase flag * updated docs * moved the compression logic to a function * added test case for compress flag * comments resolved * updated docs * resolved comments * commenting RefAttr in trunkbasesettings exporter to fix unit test (#1115) * Merge unit tests & fix failing testcases (#1116) * run unit tests * run unit tests * add unit test * Fix failing tests * fix failed tests * Fix failing tests * Fix webdeployment testcases * Fix webdeployment testcases * Run remaining unit tests * Revert export changes * Fix export tests * Fix widget tests * Modify to delete list of didpool --------- Co-authored-by: Monisha Padmavathi Ragavan * onholdprompt attribute added along with test case (#1114) * refactor/Devtooling-190 [routing_utilization] + Devtooling-400 [routing_utilization_label] (#1105) * Refactored but waiting for cyclic dependency removal * refactor routing utilization label * Tidy up * Updated docs * fixing naming convention in tf_export * fixing user test * Requested changes * fixing merge conflicts * Refactored but waiting for cyclic dependency removal * refactor routing utilization label * Tidy up * Updated docs * fixing naming convention in tf_export * fixing user test * fixing merge * fixing docs * Made requested changes * changes * fixing tests * refactor/DEVTOOLING-158 idp_gsuite (#1099) * refactored idp_gsuite * removed references of data source * deleted unrefactored files * changed references * resolved comments * added name, slo_uri, slo_binding to idp_gsuite * Refactor/devtooling 160 idp_ping (#1102) * refactored idp_ping * updated docs * deleted unrefactored files * comments resolved * resolved conflicts * added name, slo_uri and slo_binding * Refactor/devtooling 157 - idp_generic (#1095) * refactoring of idp_generic * deleted original files * removed references of datasource * resolved comments * comments resolved * added slo_uri and slo_binding to idp_generic --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * Cleanup/Remove utilization label availability check / mentions of feature not being available (#1117) * Bug/devtooling 681 - New attributes for IDP (#1122) * Merge Dev to Main for Release v1.41.0 (#1118) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews * Fix acceptance tests - TCA and Prod (#1033) * Fix edge,export,script test,Jenkin to run tca&prod * Fix export & integration tests * Fix auth tests Fix auth tests * fix tests * resolve conflicts * move assignregion func, remove commented function modify to return empty string - assignregion func return default region --------- Co-authored-by: Monisha Padmavathi Ragavan * Bug/devtooling 597 - Routing email route test failing (#1039) * Added call to cleanup function * linter * adding hotfix to pr labeler config file (#1042) * bug/DEVTOOLING-436 - Added cleanup function for webdeployments resources (#1038) * Added cleanup function for webdeployments resources * fixing conflict * Made requested changes * Made requested changes * Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.34.0 (#1047) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.33.0 to 2.34.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.33.0...v2.34.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bug/devtooling 287 temp disable cchecker (#1037) * removed consistency checker * changed DID number * phoneUpdated * Merging dev to main for v1.38.0 (#1036) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cach… * Chore/Bump platform-client-sdk-go to v133 (#1119) * feat/COBROWSE-2427 pause field added (#1121) * updated version to 133 * pause_criteria changes done * reveted back go.mod * changed description * changed description * one more change * merged dev * crazy merge conflicts * made changes based on review * go.mod changed * more changes after review --------- Co-authored-by: ivan * go mod tidy (#1126) * added validation for ja-JP (#1127) * Cleanup/Use sdk to deal with utilization instead of direct public-api calls (#1123) * Fixes DEVTOOLING-674 by allowing the sanitizeMap function to continue processing as sanitizeE164Number and sanitizeRrule functions could return empty strings. If they do, we want to filter them out (further down the sanitizeMap function) unless they are explicitly marked to be kept by the AllowForZeroValues config to be set (#1128) * Add `make` command for generating docs (#1134) * Update latest language codes (#1130) * Pull in latest language codes from the API schema. See values available in dropdown for language field in API Explorer https://apicentral.genesys.cloud/api-explorer\#post-api-v2-knowledge-knowledgebases and https://apicentral.genesys.cloud/api-explorer\#post-api-v2-knowledge-knowledgebases--knowledgeBaseId--languages--languageCode--categories * Pull the language code logic out into its own validator function * Fixed export for teams (#1140) * Cleanup/Use sdk instead of direct calls to user utilization (#1136) * Refactor/devtooling 161 refactor idp_onelogin (#1125) * Merge Dev to Main for Release v1.41.0 (#1118) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 (#1008) * Bump github.com/hashicorp/terraform-plugin-docs from 0.19.1 to 0.19.2 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ran go generate --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * DEVTOOLING-352 - provider oauth credential rate limit exceeded (#1004) * Testing something * Adding retry * Fixed retry * Moved functionality to retries package * Fixed inport cycle * Extending sleep * Added retry to AuthorizeSdk * Using with retries * Remving old function * Feat/devtooling 461 - WithRetries errors include improved logging (#1012) * calling diag func * Changed retryable functions to call Diagnostic function * Converted all withRetries errors to have improved wrapper * Made requested Changes * fixing unit test * Bump golang.org/x/net from 0.23.0 to 0.25.0 (#1017) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.23.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix for issue 993 : Changed message_column to optional and add verification logic (#1013) * Changed message_column to optional and add verification logic * applied safer nil value handling * go generate (#1018) * bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1015) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Revert "bug/devtooling 560 - Nil error in telephony_providers_edges_phone (#1…" (#1019) This reverts commit 3ff66d472071905b18b4f66f6ee4b3d3725600e7. * bug/devtooling 560 - CX as Code crash when creating phones (#1020) * Removed Print Statement that throws Nil error and added random id to test to prevent failing * golint changes made * Made requested Change * feat/devtooling 579 - Improved Logging for Non-API errors (#1021) * Adding improved non-api diag errors * Pulling Merged PR * Added improved error * Added more logging * Ran go vet * Updated docs * Bump hashicorp/setup-terraform from 3.1.0 to 3.1.1 (#1024) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bug/devtooling 362 - Evaluation forms incorrectly assigning published attribute (#1022) * Correctly sets published feature * Added functionality to set published field correctly * Fixed docs * Bug/devtooling 444: Custom resolver function for outbound campaign script_id (#1014) * Resolving campaign script_id to default outbound script data source when appropriate * Created constants package * editing scripts proxy so that the datasource catches Default scripts * Finished writing tests for new campaign field custom resolver * Fixed linting errors in campaigns package * implemented caching for campaigns exporter * minor changes to a comment * Add deleteCacheItem func + some refactoring work * Refactoring call to resolveToDataSource function and added unit test * Fixing script data source test * Bump github.com/nyaruka/phonenumbers from 1.3.4 to 1.3.5 (#1026) Bumps [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](https://github.com/nyaruka/phonenumbers/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/nyaruka/phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Devtooling-162: Refactored idp salesforce (#999) * Refactored idp salesforce * Fixing docs * Changed function name * Removed original file * Changed Build Function Call to fix type difference (#1029) * fixing test for published attribute (#1030) * No jira: fixing up a few acceptance tests (#1031) * fixed journey segment update * Adding check to journey segment tests to validate is feature is supported * preventing panic in export helper function * Adding sleep to milestone data source test * Cleaning up fmt.Print statements appearing in export tests * undoing changes to segment resource file * Fix routing queue (#1028) * README update (#1025) * Pre-verify if the tfState is in sync with the exporter (#1027) * Add state comapartors * Upddate review comments * Devtooling-591: Consistency Checker Refactor (#1032) * Moved where consistency checker is created in resources * Cleaned up consitency checker file * Added resource name to message * Conditionally adding name * Made requested changes * Feature/devtooling 589 1 (#1035) * update doc * fix reviews * Fix acceptance tests - TCA and Prod (#1033) * Fix edge,export,script test,Jenkin to run tca&prod * Fix export & integration tests * Fix auth tests Fix auth tests * fix tests * resolve conflicts * move assignregion func, remove commented function modify to return empty string - assignregion func return default region --------- Co-authored-by: Monisha Padmavathi Ragavan * Bug/devtooling 597 - Routing email route test failing (#1039) * Added call to cleanup function * linter * adding hotfix to pr labeler config file (#1042) * bug/DEVTOOLING-436 - Added cleanup function for webdeployments resources (#1038) * Added cleanup function for webdeployments resources * fixing conflict * Made requested changes * Made requested changes * Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.34.0 (#1047) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.33.0 to 2.34.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.33.0...v2.34.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bug/devtooling 287 temp disable cchecker (#1037) * removed consistency checker * changed DID number * phoneUpdated * Merging dev to main for v1.38.0 (#1036) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports * Feat/add flow log level resource (#948) * add code changes * add flow log level changes * testing commit * getting there, have a create test together * still trying to get a passing test * tests have passed! but getting the plan was not empty errors now * flow log level test * finally got tests passing * remove debug logging * rerun go generate * rerun go generate * apply suggestions from PR review * address PR review * remove characteristics * address PR comments * return total flow log levels when no more are found --------- Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> * NO-JIRA: Small Change to flow log level (#984) * Small Change to flow log level * Fixing typo * Merge hotfix changes on main into dev (#983) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 (#992) * Bump github.com/hashicorp/terraform-plugin-docs from 0.18.0 to 0.19.1 Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.18.0 to 0.19.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.18.0...v0.19.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * rerunning go generate after tf-docs package upgrade --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlie Conneely * Devtooling 432: Conditonal Group Routing (#970) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Added CGR and toggle * Fixed some errors * Added queue proxy to CGR * Added toggle to get all * Made some changes * Added CGR toggle package * Moved CGR toggle package * Ran linter * Checking queue id in tests * Small change * bug/Devtooling-458: media retention policy creation failing with error on time interval (#980) * added checks * Checks for time interval attributes * Fixing TimeInterval * Added BuildFunc for timeInterval * Added returned errors for invalid time Interval * Fixed buildFunctions * Generate Docs * Fixed exporter * Getting rid of go vet warning about copying a lock value to a variable (#991) * No jira: util function for getting cursor value from next uri (#990) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added cache to routing queue * Added proxy and caching to routing queue * Removed log * Add consistency checker back * Fix group cache * Fix Export cyclic deps (#968) * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Feat/devtooling-177: Refactored orgAuthorization_pairing (#975) * refactored orgauthorization_pairing * Added exporter for response management response asset * Added refactor label to pr-labeler-config * Feat/devtooling-499: Added getAll Functionality to ResponseManagement_ResponseAsset (#969) * adding getALl functionality * adding exporter * adding export * Added getAll functionality * Update go.mod * Added Caching * Added file_content_hash * Fixed test * using resource mutexes in init_test files & linting errors (#973) * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Feature/devtooling 63 (#978) * Fix exports --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix Exporter for non-flow resources (#982) * Fix Exporter for non-flow resources * Added check (#981) * Made function for parsing cursor from next uri --------- Signed-off-by: dependabot[bot] Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles * Fix acceptance tests (#979) * fix acceptance test fix test fix test fix test fix test fix tests fix tests fix tests fix tests fix tests fix test fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix routing test fix tests fix tests restore files fix team test * fix comments * fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests fix tests * fix tests fix tests fix tests * fix tests * fix conditional routing test fix conditional routing test --------- Co-authored-by: Monisha Padmavathi Ragavan * Bump hashicorp/setup-terraform from 3.0.0 to 3.1.0 (#995) Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/hashicorp/setup-terraform/releases) - [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/setup-terraform/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: hashicorp/setup-terraform dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improvise exclude attributes to Regex (#988) * Fix Media call back Read Attributes (#987) * DEVTOOLING-445: User Roles not returning duplicate roles (#989) * NO-JIRA-Upgrading-Go-SDK * Fixed errors * Fixed conditional group routing * Fixed some tests * feat/Devtooling 496: Routing queue Outbound email address independent resource (#954) * Added routing_queue_conditional_group_routing resource * Rebased * Removed accidental commits * Rebased and fixed errors * Added evaluated_queue_id * Fixed some things * Added CGR and toggle * Made some changes * Added CGR toggle package * Moved CGR toggle package * Feature/devtooling 63 (#974) * Introduce new Elements * Update Attribs * Introduce scoring Method * Upgrade ssdk * remove unwanted logs * Routing queue outbound email address package * Made changes * Added tests * Added more to test * Fixed test * Finished resource * Finished resource * Made some requested changes * Added feature toggle stuff * Added feature toggle * Made changes * Fixing change in queue exporter --------- Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> * bug/devtooling-498: [CX as Code] genesyscloud_outbound_settings export contains only null data (#996) * Fixing null export * Fixing Test * Added check for export * Added attribute and fixed test * Removed Computed attribute * Added check for reschedule_time_zone_skipped_contacts in test * Update Export Guide (#971) * update export uide * update tf_export.md and resource.tf * cross check resource.tf and schema, add missing attributes * update * update export.md.tmp * Removed duplicate paragraph and ran go generate --------- Co-authored-by: Charlie Conneely * NO-JIRA: Fixing dev (#1000) * Fixing dev * Fixes some errors * Fixing flow outcome description (#998) * Devtooling 561 - Members not being added correctly to teams (#1001) * Fixed bug * Fixed problem deleting members * Removed print * Fix Version Problem in WebDeployments (#997) * Fix Version Problem in WebDeployments * Add test cases * Fix review comments * no jira: Fixing merge conflicts on dev branch (#1009) * moving changes (#960) * Revert "moving changes (#960)" (#963) This reverts commit 70d8a8036c52ae2f91aee081fe0d1c4c5451a58f. * Release Merge to Main (#977) * Bump golang.org/x/net from 0.22.0 to 0.23.0 (#951) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add team to custom resolver (#950) * Devtooling 432: Refactor Conditional Group Routing Rules into its own resource (#921) * Added routing_queue_conditional_group_routing resource * Rebased * Fixed routing queue tests * Removed accidental commits * Rebased and fixed errors * Made some requested changes * Added evaluated_queue_id * Added warning * Fixed some things * Fixed test * Fixing exporter * Fixed type * Changing target branch of dependabot PRs to dev (#956) * Fix User Resource Panics (#949) * moving changes (#964) * Reverting conditional group routing resoure (#965) * Remove use_supported_content_profile (#962) * bug/ DEVTOOLING-516: Allow Multiple inputs for BYMONTHDAY and BYMONTH (#953) * Allow Multiple inputs for BYMONTHDAY and BYMONTH * Update go.mod * Added Error Message to Validator * Bug/devtooling-530: Fixing panic during export caused by MemberGroupsResolver (#957) * Changing groups.owner_ids to optional and computed * Preventing panic inside MemberGroupsResolver with some refactoring * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag… (#946) * DEVTOOLING-417: Removed the go:generate git restore docs/index.md tag. This is pulling the index.md out of git hub and overriding what ever is being generated. * DEVTOOLING-417: Fixed a mispelling in a package alias * DEVTOOLING-417 Accidently added cache code * avoiding infinite loop in flow data source read (#966) * feat/Devtooling-448 oauth cred cache (#945) * DEVTOOLING-448: Initial commit of code * DEVTOOLING-448: Added caching while creating a Genesys Cloud OAuth Client specific so we dont have to force the user embed a secret * DEVTOOLING-448: Refactored retrieveCachedOauthClientSecret code * DEVTOOLING-448: Committing interm work * DEVTOOLING-448: Reworked how we handle the addition of roles for user credentials * DEVTOOLING-448: Removed the ToPtrStr function * Fixing go.mod and running go generate (#967) * feat/Devtooling-459: Added BuildAPIDiagnosticError function calls (#959) * added buildDiag function p1 * Adding call to BuildApiDiag * BuildAPIDiag functions added * Added util.BuildAPIDiag function to refactored resources * Added call to BuildAPIDiag in resources * Update go.mod * Fixed tests * Update go.mod * Added err * Added err * Update go.mod * Requested Changes * Fix for BotFlows dependencies (#961) * feat/Devtooling-531: Add proxy and cache to routing queue (#958) * Added ca… * feature/devtooling 608 (#1124) * added schema * added line properties * updated and flatten function * changed to station remote address * pushing changes * regenerated docs * added remote if statement for remote address * line and remote address are mutually exclusive * fixed nil pointer deref on error * synced documents * added continue statement to prevent deref of nil pointer * Feat/More validation in utilization label names (#1143) * Fix DEVTOOLING-703 (#1144) * Fix DEVTOOLING-703 * Add unit test for isQueueEmailAddressEmpty() * Bump golang.org/x/net from 0.26.0 to 0.27.0 (#1146) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.27.0. - [Commits](https://github.com/golang/net/compare/v0.26.0...v0.27.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Feat/devtooling-645: Add roles_enabled to group resource (#1145) * Added roles_enabled to group * Added rolesEnabled to test * Requested changes * Bug/Devtooling-677: Error Migrating routes to independent resource (#1132) * Fixing conflict * Remove Duplicate imports * adding missing return statement in utils function (#1148) * feat/GPE-14463 add support for App stream type on Journey resources (#1147) When configuring Journey resources like segments, outcomes or action maps, it is now possible to use App stream type. Also, the documentation around supported session types was updated, to specify the allowed values. --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HemanthDogiparthi12 <127493303+HemanthDogiparthi12@users.noreply.github.com> Co-authored-by: dginty4 <108797778+dginty4@users.noreply.github.com> Co-authored-by: Charlie Conneely <87772562+charliecon@users.noreply.github.com> Co-authored-by: kavinbalagen <150852268+kavinbalagen@users.noreply.github.com> Co-authored-by: Brian Moyles <157126600+BrianMoyles@users.noreply.github.com> Co-authored-by: carnellj-genesys <109529583+carnellj-genesys@users.noreply.github.com> Co-authored-by: BrianMoyles Co-authored-by: ben-howarth-genesys <164904178+ben-howarth-genesys@users.noreply.github.com> Co-authored-by: Charlie Conneely Co-authored-by: monishapadmavathi <31921259+monishapadmavathi@users.noreply.github.com> Co-authored-by: Monisha Padmavathi Ragavan Co-authored-by: jenissabarrera <50225452+jenissabarrera@users.noreply.github.com> Co-authored-by: Taisuk Choi <131831426+TaisukChoi@users.noreply.github.com> Co-authored-by: sureshperiyappan <61573777+sureshperiyappan@users.noreply.github.com> Co-authored-by: willjeuniaux-genesys <153622483+willjeuniaux-genesys@users.noreply.github.com> Co-authored-by: Will <37446330+williamjeuniaux@users.noreply.github.com> Co-authored-by: Ivan Mikhalchenko Co-authored-by: ivan Co-authored-by: HemanthDogiparthi12 Co-authored-by: Majharul Islam Rafat Co-authored-by: Mohammed Islam Co-authored-by: tsantos-genesys <154342374+tsantos-genesys@users.noreply.github.com> Co-authored-by: Brian Goad Co-authored-by: michalk-genesys --- GNUmakefile | 5 +- README.md | 32 +- docs/resources/group.md | 1 + docs/resources/idp_adfs.md | 2 +- docs/resources/idp_generic.md | 2 + docs/resources/idp_gsuite.md | 3 + docs/resources/idp_onelogin.md | 6 +- docs/resources/idp_ping.md | 3 + docs/resources/journey_action_map.md | 4 +- docs/resources/journey_outcome.md | 4 +- docs/resources/journey_segment.md | 4 +- docs/resources/routing_utilization.md | 2 +- docs/resources/routing_utilization_label.md | 4 +- .../telephony_providers_edges_phone.md | 11 +- .../resources/webdeployments_configuration.md | 14 + .../resource.tf | 4 + ...source_genesyscloud_architect_datatable.go | 2 +- ...source_genesyscloud_architect_datatable.go | 2 +- ..._genesyscloud_architect_datatable_proxy.go | 2 +- ...e_genesyscloud_architect_datatable_test.go | 2 +- ...esyscloud_architect_datatable_row_utils.go | 2 +- ...ce_genesyscloud_architect_datatable_row.go | 2 +- ...esyscloud_architect_datatable_row_proxy.go | 5 +- ...nesyscloud_architect_datatable_row_test.go | 2 +- ...syscloud_architect_emergencygroup_proxy.go | 3 +- ...e_genesyscloud_architect_emergencygroup.go | 2 +- ...esyscloud_architect_emergencygroup_test.go | 2 +- ...syscloud_architect_emergencygroup_utils.go | 2 +- ...ource_genesyscloud_architect_flow_proxy.go | 3 +- .../resource_genesyscloud_flow.go | 2 +- .../resource_genesyscloud_flow_test.go | 2 +- .../genesyscloud_architect_grammar_proxy.go | 2 +- ...resource_genesyscloud_architect_grammar.go | 2 +- ...rce_genesyscloud_architect_grammar_test.go | 2 +- ...scloud_architect_grammar_language_proxy.go | 2 +- ...genesyscloud_architect_grammar_language.go | 2 +- ...yscloud_architect_grammar_language_test.go | 2 +- ...scloud_architect_grammar_language_utils.go | 2 +- ..._source_genesyscloud_architect_ivr_test.go | 2 +- .../genesyscloud_architect_ivr_proxy.go | 2 +- ...esyscloud_architect_ivr_proxy_unit_test.go | 2 +- .../resource_genesyscloud_architect_ivr.go | 2 +- ...esource_genesyscloud_architect_ivr_test.go | 2 +- ...ce_genesyscloud_architect_ivr_unit_test.go | 2 +- ...source_genesyscloud_architect_ivr_utils.go | 2 +- ...syscloud_architect_schedulegroups_proxy.go | 3 +- ...e_genesyscloud_architect_schedulegroups.go | 2 +- ...esyscloud_architect_schedulegroups_test.go | 2 +- .../genesyscloud_architect_schedules_proxy.go | 2 +- ...source_genesyscloud_architect_schedules.go | 2 +- ...e_genesyscloud_architect_schedules_test.go | 2 +- ...enesyscloud_architect_user_prompt_proxy.go | 2 +- ...urce_genesyscloud_architect_user_prompt.go | 2 +- ...genesyscloud_architect_user_prompt_test.go | 2 +- ...enesyscloud_architect_user_prompt_utils.go | 2 +- .../data_source_genesyscloud_auth_role.go | 9 +- .../auth_role/genesyscloud_auth_role_proxy.go | 2 +- .../resource_genesyscloud_auth_role.go | 9 +- .../resource_genesyscloud_auth_role_test.go | 2 +- .../resource_genesyscloud_auth_role_utils.go | 2 +- ...genesyscloud_authorization_product_test.go | 2 +- ...enesyscloud_authorization_product_proxy.go | 2 +- ...source_genesyscloud_architect_schedules.go | 2 +- .../data_source_genesyscloud_auth_division.go | 2 +- ..._source_genesyscloud_auth_division_home.go | 2 +- ..._source_genesyscloud_journey_action_map.go | 2 +- ...ce_genesyscloud_journey_action_template.go | 2 +- ...ata_source_genesyscloud_journey_outcome.go | 2 +- ...ata_source_genesyscloud_journey_segment.go | 2 +- ..._source_genesyscloud_knowledge_category.go | 2 +- ...ce_genesyscloud_knowledge_knowledgebase.go | 12 +- ...ata_source_genesyscloud_knowledge_label.go | 2 +- .../data_source_genesyscloud_location.go | 2 +- ...ta_source_genesyscloud_organizations_me.go | 7 +- ...e_genesyscloud_quality_forms_evaluation.go | 2 +- ...ource_genesyscloud_quality_forms_survey.go | 2 +- ...ource_genesyscloud_routing_email_domain.go | 2 +- ..._genesyscloud_routing_email_domain_test.go | 2 +- ...ta_source_genesyscloud_routing_language.go | 2 +- .../data_source_genesyscloud_routing_skill.go | 2 +- ...source_genesyscloud_routing_skill_group.go | 9 +- ..._source_genesyscloud_routing_wrapupcode.go | 2 +- genesyscloud/data_source_genesyscloud_user.go | 2 +- ...a_source_genesyscloud_widget_deployment.go | 2 +- .../genesyscloud_dependent_consumer_proxy.go | 5 +- ...mance_externalmetrics_definitions_proxy.go | 3 +- ...performance_externalmetrics_definitions.go | 7 +- ...rmance_externalmetrics_definitions_test.go | 2 +- ...syscloud_externalcontacts_contact_proxy.go | 2 +- ...e_genesyscloud_externalcontacts_contact.go | 2 +- ...esyscloud_externalcontacts_contact_test.go | 2 +- ...syscloud_externalcontacts_contact_utils.go | 2 +- .../genesyscloud_flow_loglevel_proxy.go | 3 +- .../resource_genesyscloud_flow_loglevel.go | 2 +- ...esource_genesyscloud_flow_loglevel_test.go | 9 +- .../genesyscloud_flow_milestone_proxy.go | 2 +- .../resource_genesyscloud_flow_milestone.go | 2 +- ...source_genesyscloud_flow_milestone_test.go | 2 +- ...ource_genesyscloud_flow_milestone_utils.go | 2 +- .../genesyscloud_flow_outcome_proxy.go | 2 +- .../resource_genesyscloud_flow_outcome.go | 2 +- ...esource_genesyscloud_flow_outcome_utils.go | 2 +- .../data_source_genesyscloud_group_test.go | 2 +- .../group/genesyscloud_group_proxy.go | 3 +- .../group/resource_genesyscloud_group.go | 7 +- .../resource_genesyscloud_group_schema.go | 11 +- .../group/resource_genesyscloud_group_test.go | 6 +- .../resource_genesyscloud_group_utils.go | 5 +- .../genesyscloud_group_roles_proxy.go | 2 +- ...esource_genesyscloud_group_roles_schema.go | 2 +- ...resource_genesyscloud_group_roles_utils.go | 2 +- .../idp_adfs/genesyscloud_idp_adfs_proxy.go | 2 +- .../resource_genesyscloud_idp_adfs.go | 8 +- .../resource_genesyscloud_idp_adfs_schema.go | 2 +- .../resource_genesyscloud_idp_adfs_test.go | 47 ++- .../genesyscloud_idp_generic_proxy.go | 87 ++++++ .../resource_genesyscloud_idp_generic.go | 162 ++++++++++ ...urce_genesyscloud_idp_generic_init_test.go | 46 +++ ...esource_genesyscloud_idp_generic_schema.go | 130 ++++++++ .../resource_genesyscloud_idp_generic_test.go | 37 ++- .../genesyscloud_idp_gsuite_proxy.go | 88 ++++++ .../resource_genesyscloud_idp_gsuite.go | 156 ++++++++++ ...ource_genesyscloud_idp_gsuite_init_test.go | 46 +++ ...resource_genesyscloud_idp_gsuite_schema.go | 103 +++++++ .../resource_genesyscloud_idp_gsuite_test.go | 51 +++- .../idp_okta/genesyscloud_idp_okta_proxy.go | 2 +- .../resource_genesyscloud_idp_okta.go | 16 +- .../resource_genesyscloud_idp_okta_test.go | 65 +++- .../genesyscloud_idp_onelogin_proxy.go | 88 ++++++ .../resource_genesyscloud_idp_onelogin.go | 157 ++++++++++ ...rce_genesyscloud_idp_onelogin_init_test.go | 46 +++ ...source_genesyscloud_idp_onelogin_schema.go | 103 +++++++ ...resource_genesyscloud_idp_onelogin_test.go | 69 ++++- .../idp_ping/genesyscloud_idp_ping_proxy.go | 88 ++++++ .../resource_genesyscloud_idp_ping.go | 155 ++++++++++ ...esource_genesyscloud_idp_ping_init_test.go | 46 +++ .../resource_genesyscloud_idp_ping_schema.go | 103 +++++++ .../resource_genesyscloud_idp_ping_test.go | 51 +++- .../genesyscloud_idp_salesforce_proxy.go | 3 +- .../resource_genesyscloud_idp_salesforce.go | 9 +- ...source_genesyscloud_idp_salesforce_test.go | 2 +- .../genesyscloud_integration_proxy.go | 2 +- .../resource_genesyscloud_integration.go | 2 +- .../resource_genesyscloud_integration_test.go | 2 +- ...resource_genesyscloud_integration_utils.go | 2 +- .../genesyscloud_integration_action_proxy.go | 3 +- ...esource_genesyscloud_integration_action.go | 2 +- ...ce_genesyscloud_integration_action_test.go | 2 +- ...e_genesyscloud_integration_action_utils.go | 2 +- ...nesyscloud_integration_credential_proxy.go | 2 +- ...rce_genesyscloud_integration_credential.go | 2 +- ...enesyscloud_integration_credential_test.go | 2 +- ...ud_integration_custom_auth_action_proxy.go | 2 +- ...syscloud_integration_custom_auth_action.go | 2 +- ...oud_integration_custom_auth_action_test.go | 2 +- ...ud_integration_custom_auth_action_utils.go | 2 +- ...yscloud_journey_outcome_predictor_proxy.go | 3 +- ..._genesyscloud_journey_outcome_predictor.go | 2 +- ...syscloud_journey_outcome_predictor_test.go | 2 +- .../genesyscloud_journey_views_proxy.go | 3 +- .../resource_genesyscloud_journey_views.go | 9 +- ...esource_genesyscloud_journey_views_test.go | 9 +- ...source_genesyscloud_journey_views_utils.go | 5 +- .../resource_genesyscloud_oauth_client.go | 2 +- ...esource_genesyscloud_oauth_client_proxy.go | 2 +- ...esource_genesyscloud_oauth_client_utils.go | 2 +- ...ce_genesyscloude_oauth_client_unit_test.go | 2 +- ...anization_authentication_settings_proxy.go | 3 +- ...ud_organization_authentication_settings.go | 7 +- ...ation_authentication_settings_unit_test.go | 9 +- ...anization_authentication_settings_utils.go | 2 +- ...syscloud_orgauthorization_pairing_proxy.go | 2 +- ...e_genesyscloud_orgauthorization_pairing.go | 2 +- ...rce_genesyscloud_outbound_cattemptlimit.go | 2 +- ...genesyscloud_outbound_messagingcampaign.go | 2 +- ...yscloud_outbound_messagingcampaign_test.go | 2 +- ...genesyscloud_outbound_messagingcampaign.go | 2 +- ...yscloud_outbound_messagingcampaign_test.go | 2 +- ...urce_genesyscloud_outbound_attemptlimit.go | 2 +- ...urce_genesyscloud_outbound_attemptlimit.go | 2 +- ...genesyscloud_outbound_attemptlimit_test.go | 2 +- ...syscloud_outbound_callabletimeset_proxy.go | 2 +- ...e_genesyscloud_outbound_callabletimeset.go | 2 +- ...esyscloud_outbound_callabletimeset_test.go | 2 +- ...syscloud_outbound_callabletimeset_utils.go | 2 +- ..._outbound_callanalysisresponseset_proxy.go | 3 +- ...scloud_outbound_callanalysisresponseset.go | 9 +- ...d_outbound_callanalysisresponseset_test.go | 2 +- ..._outbound_callanalysisresponseset_utils.go | 5 +- ...enesyscloud_outbound_campaign_init_test.go | 2 +- .../genesyscloud_outbound_campaign_proxy.go | 2 +- ...resource_genesyscloud_outbound_campaign.go | 2 +- ...rce_genesyscloud_outbound_campaign_test.go | 2 +- ...ce_genesyscloud_outbound_campaign_utils.go | 2 +- ...urce_genesyscloud_outbound_campaignrule.go | 2 +- ...enesyscloud_outbound_campaignrule_proxy.go | 2 +- ...urce_genesyscloud_outbound_campaignrule.go | 2 +- ...genesyscloud_outbound_campaignrule_test.go | 2 +- ...yscloud_outbound_campaignrule_unit_test.go | 2 +- ...enesyscloud_outbound_campaignrule_utils.go | 2 +- ...ource_genesyscloud_outbound_contactlist.go | 2 +- ...ource_genesyscloud_outbound_contactlist.go | 2 +- ..._genesyscloud_outbound_contactlist_test.go | 2 +- ...oud_outbound_contact_list_contact_proxy.go | 3 +- ...esyscloud_outbound_contact_list_contact.go | 9 +- ...oud_outbound_contact_list_contact_utils.go | 5 +- ...scloud_outbound_contactlistfilter_proxy.go | 3 +- ...genesyscloud_outbound_contactlistfilter.go | 9 +- ...yscloud_outbound_contactlistfilter_test.go | 2 +- ...scloud_outbound_contactlistfilter_utils.go | 5 +- .../genesyscloud_outbound_dnclist_proxy.go | 5 +- .../resource_genesyscloud_outbound_dnclist.go | 2 +- ...urce_genesyscloud_outbound_dnclist_test.go | 2 +- ...utbound_filespecificationtemplate_proxy.go | 2 +- ...loud_outbound_filespecificationtemplate.go | 2 +- ...outbound_filespecificationtemplate_test.go | 2 +- ...utbound_filespecificationtemplate_utils.go | 5 +- .../genesyscloud_outbound_ruleset_proxy.go | 2 +- .../resource_genesyscloud_outbound_ruleset.go | 2 +- ...urce_genesyscloud_outbound_ruleset_test.go | 2 +- ...genesyscloud_outbound_ruleset_unit_test.go | 2 +- ...rce_genesyscloud_outbound_ruleset_utils.go | 2 +- ...enesyscloud_outbound_sequence_init_test.go | 2 +- .../genesyscloud_outbound_sequence_proxy.go | 2 +- ...resource_genesyscloud_outbound_sequence.go | 2 +- ...rce_genesyscloud_outbound_sequence_test.go | 2 +- ...ce_genesyscloud_outbound_sequence_utils.go | 2 +- .../genesyscloud_outbound_settings_proxy.go | 3 +- ...resource_genesyscloud_outbound_settings.go | 9 +- ...ce_genesyscloud_outbound_settings_utils.go | 5 +- .../genesyscloud_wrapupcode_mappings_proxy.go | 2 +- ...loud_outbound_wrapupcode_mappings_utils.go | 2 +- ...enesyscloud_outbound_wrapupcodemappings.go | 2 +- ..._genesyscloud_processautomation_trigger.go | 2 +- .../process_automation_triggers_proxy.go | 2 +- .../process_automations_triggers_struct.go | 2 +- ..._genesyscloud_processautomation_trigger.go | 5 +- ...syscloud_processautomation_trigger_test.go | 2 +- genesyscloud/provider/division.go | 5 +- genesyscloud/provider/provider.go | 5 +- genesyscloud/provider/sdk_client_pool.go | 2 +- ...ording_media_retention_policy_init_test.go | 2 +- ..._recording_media_retention_policy_proxy.go | 2 +- ...scloud_recording_media_retention_policy.go | 2 +- ...d_recording_media_retention_policy_test.go | 2 +- ..._recording_media_retention_policy_utils.go | 2 +- .../resource_cache/datasource_cache.go | 2 +- .../resource_exporter/resource_exporter.go | 9 +- .../resource_exporter_custom.go | 3 +- ...source_genesyscloud_architect_schedules.go | 2 +- .../resource_genesyscloud_auth_division.go | 2 +- ...esource_genesyscloud_auth_division_test.go | 2 +- .../resource_genesyscloud_idp_generic.go | 277 ------------------ .../resource_genesyscloud_idp_gsuite.go | 212 -------------- .../resource_genesyscloud_idp_onelogin.go | 199 ------------- .../resource_genesyscloud_idp_ping.go | 212 -------------- genesyscloud/resource_genesyscloud_init.go | 8 - .../resource_genesyscloud_init_test.go | 6 +- ...esource_genesyscloud_journey_action_map.go | 9 +- ...ce_genesyscloud_journey_action_map_test.go | 2 +- ...ce_genesyscloud_journey_action_template.go | 2 +- ...nesyscloud_journey_action_template_test.go | 2 +- .../resource_genesyscloud_journey_outcome.go | 2 +- ...ource_genesyscloud_journey_outcome_test.go | 2 +- .../resource_genesyscloud_journey_segment.go | 10 +- ...ource_genesyscloud_journey_segment_test.go | 2 +- ...esource_genesyscloud_knowledge_category.go | 2 +- ...ce_genesyscloud_knowledge_category_test.go | 2 +- ...esource_genesyscloud_knowledge_document.go | 2 +- ...ce_genesyscloud_knowledge_document_test.go | 2 +- ...nesyscloud_knowledge_document_variation.go | 2 +- ...cloud_knowledge_document_variation_test.go | 2 +- ...ce_genesyscloud_knowledge_knowledgebase.go | 12 +- ...nesyscloud_knowledge_knowledgebase_test.go | 2 +- .../resource_genesyscloud_knowledge_label.go | 2 +- ...ource_genesyscloud_knowledge_label_test.go | 2 +- ...urce_genesyscloud_knowledge_v1_category.go | 12 +- ...genesyscloud_knowledge_v1_category_test.go | 2 +- ...urce_genesyscloud_knowledge_v1_document.go | 11 +- ...genesyscloud_knowledge_v1_document_test.go | 2 +- .../resource_genesyscloud_location.go | 2 +- .../resource_genesyscloud_location_test.go | 2 +- ...e_genesyscloud_quality_forms_evaluation.go | 2 +- ...esyscloud_quality_forms_evaluation_test.go | 2 +- ...ource_genesyscloud_quality_forms_survey.go | 2 +- ..._genesyscloud_quality_forms_survey_test.go | 2 +- ...ource_genesyscloud_routing_email_domain.go | 2 +- ..._genesyscloud_routing_email_domain_test.go | 2 +- .../resource_genesyscloud_routing_language.go | 2 +- ...urce_genesyscloud_routing_language_test.go | 2 +- .../resource_genesyscloud_routing_skill.go | 2 +- ...source_genesyscloud_routing_skill_group.go | 2 +- ...e_genesyscloud_routing_skill_group_test.go | 2 +- ...esource_genesyscloud_routing_skill_test.go | 2 +- ...esource_genesyscloud_routing_wrapupcode.go | 2 +- ...ce_genesyscloud_routing_wrapupcode_test.go | 2 +- genesyscloud/resource_genesyscloud_user.go | 77 ++--- .../resource_genesyscloud_user_test.go | 11 +- ...resource_genesyscloud_widget_deployment.go | 2 +- ...rce_genesyscloud_widget_deployment_test.go | 2 +- ...scloud_responsemanagement_library_proxy.go | 3 +- ...genesyscloud_responsemanagement_library.go | 7 +- ...yscloud_responsemanagement_library_test.go | 2 +- ...cloud_responsemanagement_response_proxy.go | 3 +- ...enesyscloud_responsemanagement_response.go | 9 +- ...scloud_responsemanagement_response_test.go | 2 +- ...cloud_responsemanagement_response_utils.go | 5 +- ..._responsemanagement_responseasset_proxy.go | 2 +- ...scloud_responsemanagement_responseasset.go | 9 +- ...d_responsemanagement_responseasset_test.go | 2 +- .../genesyscloud_routing_email_route_proxy.go | 2 +- ...source_genesyscloud_routing_email_route.go | 2 +- ...e_genesyscloud_routing_email_route_test.go | 2 +- ..._genesyscloud_routing_email_route_utils.go | 2 +- .../data_source_genesyscloud_routing_queue.go | 2 +- .../genesyscloud_routing_queue_proxy.go | 2 +- .../resource_genesyscloud_routing_queue.go | 2 +- ...esource_genesyscloud_routing_queue_test.go | 2 +- ...g_queue_conditional_group_routing_proxy.go | 3 +- ...routing_queue_conditional_group_routing.go | 9 +- ...ng_queue_conditional_group_routing_test.go | 2 +- ...eue_conditional_group_routing_unit_test.go | 9 +- ...ting_queue_outbound_email_address_proxy.go | 3 +- ...ud_routing_queue_outbound_email_address.go | 11 +- ...ing_queue_outbound_email_address_schema.go | 3 +- ...uting_queue_outbound_email_address_test.go | 9 +- ..._queue_outbound_email_address_unit_test.go | 9 +- ...ting_queue_outbound_email_address_utils.go | 25 ++ ..._outbound_email_address_utils_unit_test.go | 30 ++ .../genesyscloud_routing_settings_proxy.go | 3 +- .../resource_genesyscloud_routing_settings.go | 2 +- ...enesyscloud_routing_sms_addresses_proxy.go | 2 +- ...urce_genesyscloud_routing_sms_addresses.go | 2 +- ...genesyscloud_routing_sms_addresses_test.go | 2 +- .../genesyscloud_routing_utilization_proxy.go | 52 +--- ...source_genesyscloud_routing_utilization.go | 45 +-- ...genesyscloud_routing_utilization_schema.go | 23 +- ...e_genesyscloud_routing_utilization_test.go | 15 +- .../resource_routing_utilization_utils.go | 53 ++-- ...syscloud_routing_utilization_label_test.go | 7 +- ...yscloud_routing_utilization_label_proxy.go | 4 +- ..._genesyscloud_routing_utilization_label.go | 2 +- ...scloud_routing_utilization_label_schema.go | 41 ++- ...syscloud_routing_utilization_label_test.go | 40 ++- ...yscloud_routing_utilization_label_utils.go | 16 - .../scripts/genesyscloud_scripts_proxy.go | 2 +- .../scripts/resource_genesyscloud_script.go | 2 +- .../resource_genesyscloud_script_test.go | 2 +- .../data_source_genesyscloud_station_test.go | 1 - .../station/genesyscloud_station_init_test.go | 2 +- .../station/genesyscloud_station_proxy.go | 2 +- ...esyscloud_task_management_workbin_proxy.go | 2 +- ...ce_genesyscloud_task_management_workbin.go | 2 +- ...nesyscloud_task_management_workbin_test.go | 2 +- ...syscloud_task_management_workitem_proxy.go | 2 +- ...e_genesyscloud_task_management_workitem.go | 2 +- ...esyscloud_task_management_workitem_test.go | 2 +- ...loud_task_management_workitem_unit_test.go | 2 +- ...syscloud_task_management_workitem_utils.go | 2 +- ...d_task_management_workitem_schema_proxy.go | 2 +- ...yscloud_task_management_workitem_schema.go | 2 +- ...ud_task_management_workitem_schema_test.go | 2 +- ...sk_management_workitem_schema_unit_test.go | 2 +- ...d_task_management_workitem_schema_utils.go | 2 +- ..._genesyscloud_task_management_unit_test.go | 7 +- ...syscloud_task_management_worktype_proxy.go | 2 +- ...e_genesyscloud_task_management_worktype.go | 2 +- ...esyscloud_task_management_worktype_test.go | 2 +- ...loud_task_management_worktype_unit_test.go | 2 +- ...syscloud_task_management_worktype_utils.go | 2 +- genesyscloud/team/genesyscloud_team_proxy.go | 5 +- .../team/resource_genesyscloud_team.go | 2 +- .../team/resource_genesyscloud_team_test.go | 7 +- .../resource_genesyscloud_team_unit_test.go | 2 +- .../team/resource_genesyscloud_team_utils.go | 4 +- ...phony_providers_edges_trunkbasesettings.go | 2 +- ..._providers_edges_trunkbasesettings_test.go | 2 +- ...oud_telephony_providers_edges_did_proxy.go | 2 +- ...elephony_providers_edges_did_pool_proxy.go | 2 +- ...loud_telephony_providers_edges_did_pool.go | 2 +- ...telephony_providers_edges_did_pool_test.go | 2 +- ...elephony_providers_edges_did_pool_utils.go | 2 +- ...ephony_providers_edges_edge_group_proxy.go | 2 +- ...ud_telephony_providers_edges_edge_group.go | 2 +- ...lephony_providers_edges_edge_group_test.go | 2 +- ...ephony_providers_edges_edge_group_utils.go | 2 +- ...ny_providers_edges_extension_pool_proxy.go | 2 +- ...elephony_providers_edges_extension_pool.go | 2 +- ...ony_providers_edges_extension_pool_test.go | 2 +- ...ephony_providers_edges_linebasesettings.go | 2 +- ...ud_telephony_providers_edges_phone_test.go | 1 - ...lephony_providers_edges_phone_init_test.go | 2 +- ...d_telephony_providers_edges_phone_proxy.go | 2 +- ...yscloud_telephony_providers_edges_phone.go | 4 +- ..._telephony_providers_edges_phone_schema.go | 32 +- ...ud_telephony_providers_edges_phone_test.go | 131 ++++++++- ...d_telephony_providers_edges_phone_utils.go | 239 +++++++++------ ...phony_providers_edges_phonebasesettings.go | 2 +- ...providers_edges_phonebasesettings_proxy.go | 2 +- ...phony_providers_edges_phonebasesettings.go | 2 +- ..._providers_edges_phonebasesettings_test.go | 2 +- ...providers_edges_phonebasesettings_utils.go | 2 +- ...oud_telephony_providers_edges_site_test.go | 2 +- ...ud_telephony_providers_edges_site_proxy.go | 2 +- ...syscloud_telephony_providers_edges_site.go | 2 +- ...d_telephony_providers_edges_site_schema.go | 7 +- ...oud_telephony_providers_edges_site_test.go | 2 +- ...ud_telephony_providers_edges_site_utils.go | 2 +- ...ers_edges_site_outbound_route_init_test.go | 5 +- ...oviders_edges_site_outbound_route_proxy.go | 3 +- ...ony_providers_edges_site_outbound_route.go | 37 ++- ...oviders_edges_site_outbound_route_utils.go | 17 +- ...yscloud_telephony_providers_edges_trunk.go | 2 +- ...d_telephony_providers_edges_trunk_proxy.go | 2 +- ...yscloud_telephony_providers_edges_trunk.go | 2 +- .../genesyscloud_resource_exporter.go | 8 +- .../genesyscloud_resource_exporter_test.go | 5 +- .../resource_genesyscloud_tf_export_test.go | 2 +- .../tfexporter/tf_exporter_resource_test.go | 32 +- .../genesyscloud_user_roles_proxy.go | 2 +- .../resource_genesyscloud_user_roles_utils.go | 2 +- .../util/resourcedata/resourcedata.go | 2 +- .../util/util_basesetting_properties.go | 2 +- .../util/util_diagnostic_unit_test.go | 5 +- genesyscloud/util/util_diagnostics.go | 3 +- genesyscloud/util/util_divisions.go | 2 +- genesyscloud/util/util_domainentities.go | 2 +- genesyscloud/util/util_retries.go | 2 +- genesyscloud/validators/validators.go | 12 + ...loud_webdeployments_configuration_proxy.go | 2 +- ...nesyscloud_webdeployments_configuration.go | 2 +- ...oud_webdeployments_configuration_schema.go | 20 ++ ...cloud_webdeployments_configuration_test.go | 29 +- ...ud_webdeployments_configuration_journey.go | 2 +- ..._webdeployments_configuration_messenger.go | 5 +- ...eployments_configuration_support_center.go | 2 +- ...loud_webdeployments_configuration_utils.go | 17 +- ...yscloud_webdeployments_deployment_proxy.go | 7 +- ..._genesyscloud_webdeployments_deployment.go | 2 +- ...syscloud_webdeployments_deployment_test.go | 2 +- ...yscloud_webdeployments_deployment_utils.go | 2 +- go.mod | 8 +- go.sum | 16 +- main.go | 8 + 444 files changed, 3234 insertions(+), 1851 deletions(-) create mode 100644 genesyscloud/idp_generic/genesyscloud_idp_generic_proxy.go create mode 100644 genesyscloud/idp_generic/resource_genesyscloud_idp_generic.go create mode 100644 genesyscloud/idp_generic/resource_genesyscloud_idp_generic_init_test.go create mode 100644 genesyscloud/idp_generic/resource_genesyscloud_idp_generic_schema.go rename genesyscloud/{ => idp_generic}/resource_genesyscloud_idp_generic_test.go (85%) create mode 100644 genesyscloud/idp_gsuite/genesyscloud_idp_gsuite_proxy.go create mode 100644 genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite.go create mode 100644 genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_init_test.go create mode 100644 genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_schema.go rename genesyscloud/{ => idp_gsuite}/resource_genesyscloud_idp_gsuite_test.go (74%) create mode 100644 genesyscloud/idp_onelogin/genesyscloud_idp_onelogin_proxy.go create mode 100644 genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin.go create mode 100644 genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_init_test.go create mode 100644 genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_schema.go rename genesyscloud/{ => idp_onelogin}/resource_genesyscloud_idp_onelogin_test.go (63%) create mode 100644 genesyscloud/idp_ping/genesyscloud_idp_ping_proxy.go create mode 100644 genesyscloud/idp_ping/resource_genesyscloud_idp_ping.go create mode 100644 genesyscloud/idp_ping/resource_genesyscloud_idp_ping_init_test.go create mode 100644 genesyscloud/idp_ping/resource_genesyscloud_idp_ping_schema.go rename genesyscloud/{ => idp_ping}/resource_genesyscloud_idp_ping_test.go (74%) delete mode 100644 genesyscloud/resource_genesyscloud_idp_generic.go delete mode 100644 genesyscloud/resource_genesyscloud_idp_gsuite.go delete mode 100644 genesyscloud/resource_genesyscloud_idp_onelogin.go delete mode 100644 genesyscloud/resource_genesyscloud_idp_ping.go create mode 100644 genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils.go create mode 100644 genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils_unit_test.go diff --git a/GNUmakefile b/GNUmakefile index 3dbb0308d..4b9cf8322 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ default: build -.PHONY: testacc clean build sideload +.PHONY: testacc clean build docs sideload DIST_DIR=./dist BIN_NAME=terraform-provider-genesyscloud @@ -29,6 +29,9 @@ testacc: testunit: TF_UNIT=1 go test ./... -run TestUnit -cover -count=1 -coverprofile=coverage_unit.out +# Generate docs +docs: + go generate coverageacc: go tool cover -func coverage.out | grep "total:" | \ diff --git a/README.md b/README.md index 919101ea1..1260c7fed 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ ![tests](https://github.com/MyPureCloud/terraform-provider-genesyscloud/workflows/Tests/badge.svg?branch=main) + # Genesys Cloud Terraform Provider + Terraform Logo ## Requirements -- [Terraform](https://www.terraform.io/downloads.html) >= 1.0.x -- [Go](https://golang.org/doc/install) >= 1.18 +- [Terraform](https://www.terraform.io/downloads.html) >= 1.0.x +- [Go](https://golang.org/doc/install) >= 1.18 ## Building The Provider @@ -45,9 +47,9 @@ GENESYSCLOUD_ACCESS_TOKEN GENESYSCLOUD_REGION ``` -*Note:* If `GENESYSCLOUD_ACCESS_TOKEN` is set, the Oauth client will use the access token instead of client credentials to make requests. +_Note:_ If `GENESYSCLOUD_ACCESS_TOKEN` is set, the Oauth client will use the access token instead of client credentials to make requests. -*Note:* The provider makes Public API calls to perform all of the CRUD operations necessary to manage Genesys Cloud resources. All of these API calls require specific permissions and OAuth scopes. Therefore it is important that you verify your OAuth Client is authorized for all necessary scopes and is assigned an admin role capable of creating, reading, updating, and deleting all resources that your Terraform configuration will manage. +_Note:_ The provider makes Public API calls to perform all of the CRUD operations necessary to manage Genesys Cloud resources. All of these API calls require specific permissions and OAuth scopes. Therefore it is important that you verify your OAuth Client is authorized for all necessary scopes and is assigned an admin role capable of creating, reading, updating, and deleting all resources that your Terraform configuration will manage. For any issues, questions, or suggestions for the provider, visit the [Genesys Cloud Developer Forum](https://developer.mypurecloud.com/forum/) @@ -61,11 +63,11 @@ port - Port of the Proxy server host - Host Ip or DNS of the proxy server protocol - Protocol required to connect to the Proxy (http or https) -The 'proxy' has another section which is an optional section. +The 'proxy' has another section which is an optional section. If the proxy requires authentication to connect to 'auth' needs to be mentioned under the 'Proxy'. -An example of the provider configuration with the proxy: +An example of the provider configuration with the proxy: ```hcl provider "genesyscloud" { @@ -73,7 +75,7 @@ provider "genesyscloud" { oauthclient_secret = "" aws_region = "" - proxy { + proxy { host = "example.com" port = "8443" protocol = "https" @@ -100,11 +102,13 @@ GENESYSCLOUD_PROXY_AUTH_PASSWORD ### Data Sources There may be cases where you want to reference existing resources in a Terraform configuration file but do not want those resources to be managed by Terraform. This provider supports several data source types that can act as a read-only resource for existing objects in your org. To include one in your configuration, add a `data` block to your configuration file with one of the supported data source types: + ```hcl data "genesyscloud_auth_role" "employee" { name = "employee" } ``` + The example above will attempt to find a role named "employee" which can be referenced elsewhere in the config. By default, all data sources will allow you to access the `id` attribute which is useful for setting reference attributes that require IDs. Additional attributes may be added to data sources as needs arise. ## Developing the Provider @@ -121,32 +125,30 @@ In order to run the full suite of Acceptance tests, run `make testacc`. You can $ make testacc TESTARGS="-run TestAccResourceUserBasic" ``` -All new resources must have passing acceptance tests and docs in order to be merged. Most of the docs are generated automatically from the schema and examples folder by running `go generate`. - +All new resources must have passing acceptance tests and docs in order to be merged. Most of the docs are generated automatically from the schema and examples folder by running `make docs`. To run all of the unit tests: + ```sh $make testunit ``` - - ### Adding a new resource type -1. Create new package inside `genesyscloud` with the following files. The package name should match the name of the resource (minus, the genesyscloud_ prefix). +1. Create new package inside `genesyscloud` with the following files. The package name should match the name of the resource (minus, the genesyscloud\_ prefix). - `resource_genesyscloud_{resource_name}_schema.go` - The file containing the schema definition for the resource, data source, and exporter. It also contains a constant variable which defines the resource name, and a public function called `SetRegistrar`, which will be called from outside the package to register the resource with the provider. The schema should closely match Public API schemas, but there are some Terraform schema limitations that may require some deviation from the API. - `resource_genesyscloud_{resource_name}.go` - Contains the create, read, update and delete functions for the resource (the methods for the resource's `CreateContext`, `ReadContext`, `UpdateContext`, and `DeleteContext` attributes.) It also contains the getAll function to be used by the exporter. If you have a few helper functions present in this file, that is fine, but if there are more than 1-2 helper functions you should create a `resource_genesyscloud_{resource_name}_utils.go` to contain the business logic. - - `resource_genesyscloud_{resource_name}_test.go` - Contains the resource tests. Write acceptance test cases that cover all of the attributes and CRUD operations for the resource. Acceptance tests modify real resources in a test org and require an OAuth Client authorized to create, update, and delete the resource type in the org. See existing tests for examples and [Terraform Acceptance Test documentation](https://www.terraform.io/docs/extend/testing/acceptance-tests/index.html) for more details. Unit tests are also encouraged where applicable (for helper functions etc.) + - `resource_genesyscloud_{resource_name}_test.go` - Contains the resource tests. Write acceptance test cases that cover all of the attributes and CRUD operations for the resource. Acceptance tests modify real resources in a test org and require an OAuth Client authorized to create, update, and delete the resource type in the org. See existing tests for examples and [Terraform Acceptance Test documentation](https://www.terraform.io/docs/extend/testing/acceptance-tests/index.html) for more details. Unit tests are also encouraged where applicable (for helper functions etc.) - `data_source_genesyscloud_{resource_name}.go` - This file contains all of the data source logic for a resource. The data source should call any Genesys Cloud APIs through its API proxy class. All functions and variables in this class should be private. - `data_source_genesyscloud_{resource_name}_test.go` - Contains the data source tests. - `genesyscloud_{resource_name}_proxy.go` - This contains all of the API logic for interacting with the Genesys Cloud APIs. This is meant to be an isolated layer from Terraform, so know Terraform objects should be passed back and forth to this code. All functions and variables in this class should be private. - `genesyscloud_{resource_name}_init_test.go` - This file contains all of the logic needed to initialize a test case for your resource. All functions and variables in this class should be private. -2. Add a new folder for the resource and data source under the `/examples` folder. An example `resource.tf` file for the resource should be added to the folder along with an `apis.md` file listing all of the APIs the resource uses. To generate the documentation, run `go generate`. __Note:__ Everything inside the `docs` directory is generated based off schema data and the content inside `examples`. Do not manually edit anything inside `docs`. +2. Add a new folder for the resource and data source under the `/examples` folder. An example `resource.tf` file for the resource should be added to the folder along with an `apis.md` file listing all of the APIs the resource uses. To generate the documentation, run `go generate`. **Note:** Everything inside the `docs` directory is generated based off schema data and the content inside `examples`. Do not manually edit anything inside `docs`. 3. Import your package to `main.go` at the root of the project and, from the `registerResources` function, call the SetRegistrar function passing in the `regInstance` variable. If you want to go off of an example, we recommend using the [external contacts](https://github.com/MyPureCloud/terraform-provider-genesyscloud/tree/main/genesyscloud/external_contacts) package. -### Cx As Code Resource Generator +### Cx As Code Resource Generator [The Cx as Code Resource Generator](https://github.com/MyPureCloud/cxascode-resource-generator) is a tool that can help generate resources for Cx as Code and speed up development. The resource generator will generate resources using the package structure mentioned above. The project can be found [here](https://github.com/MyPureCloud/cxascode-resource-generator) and all usage is documented in the README. Please note that the resource generator is not perfect, it is a tool to help with development and the generated code will require review and the package will still need to be registered manually in `main.go`. diff --git a/docs/resources/group.md b/docs/resources/group.md index 543559487..b30335d26 100644 --- a/docs/resources/group.md +++ b/docs/resources/group.md @@ -51,6 +51,7 @@ resource "genesyscloud_group" "sample_group" { - `description` (String) Group description. - `member_ids` (Set of String) IDs of members assigned to the group. If not set, this resource will not manage group members. - `owner_ids` (List of String) IDs of owners of the group. +- `roles_enabled` (Boolean) Allow roles to be assigned to this group. Defaults to `true`. - `rules_visible` (Boolean) Are membership rules visible to the person requesting to view the group. Defaults to `true`. - `type` (String) Group type (official | social). This cannot be modified. Changing type attribute will cause the existing genesys_group object to dropped and recreated with a new ID. Defaults to `official`. - `visibility` (String) Who can view this group (public | owners | members). Defaults to `public`. diff --git a/docs/resources/idp_adfs.md b/docs/resources/idp_adfs.md index ee0c86fd6..42ce28c9c 100644 --- a/docs/resources/idp_adfs.md +++ b/docs/resources/idp_adfs.md @@ -40,7 +40,7 @@ resource "genesyscloud_idp_adfs" "adfs" { - `name` (String) IDP ADFS resource name - `relying_party_identifier` (String) String used to identify Genesys Cloud to ADFS. - `slo_binding` (String) Valid values: HTTP Redirect, HTTP Post -- `slo_uri` (String) Provided by ADSF on app creation +- `slo_uri` (String) Provided by ADFS on app creation - `target_uri` (String) Target URI provided by ADFS. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) diff --git a/docs/resources/idp_generic.md b/docs/resources/idp_generic.md index 95d69a46d..0accb0ded 100644 --- a/docs/resources/idp_generic.md +++ b/docs/resources/idp_generic.md @@ -46,6 +46,8 @@ resource "genesyscloud_idp_generic" "generic" { - `logo_image_data` (String) Base64 encoded SVG image. - `name_identifier_format` (String) SAML name identifier format. (urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress | urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName | urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName | urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos | urn:oasis:names:tc:SAML:2.0:nameid-format:entity | urn:oasis:names:tc:SAML:2.0:nameid-format:persistent | urn:oasis:names:tc:SAML:2.0:nameid-format:transient) Defaults to `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`. - `relying_party_identifier` (String) String used to identify Genesys Cloud to the identity provider. +- `slo_binding` (String) Valid values: HTTP Redirect, HTTP Post +- `slo_uri` (String) Provided on app creation. - `target_uri` (String) Target URI provided by the provider. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) diff --git a/docs/resources/idp_gsuite.md b/docs/resources/idp_gsuite.md index 0098d55c4..e10fde192 100644 --- a/docs/resources/idp_gsuite.md +++ b/docs/resources/idp_gsuite.md @@ -37,7 +37,10 @@ resource "genesyscloud_idp_gsuite" "gsuite" { ### Optional - `disabled` (Boolean) True if GSuite is disabled. Defaults to `false`. +- `name` (String) Name of the provider. - `relying_party_identifier` (String) String used to identify Genesys Cloud to GSuite. +- `slo_binding` (String) Valid values: HTTP Redirect, HTTP Post +- `slo_uri` (String) Provided on app creation. - `target_uri` (String) Target URI provided by GSuite. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) diff --git a/docs/resources/idp_onelogin.md b/docs/resources/idp_onelogin.md index 6f6c7beb4..21dd3de9f 100644 --- a/docs/resources/idp_onelogin.md +++ b/docs/resources/idp_onelogin.md @@ -30,12 +30,16 @@ resource "genesyscloud_idp_onelogin" "onelogin" { ### Required -- `certificates` (List of String) PEM or DER encoded public X.509 certificates for SAML signature validation. - `issuer_uri` (String) Issuer URI provided by OneLogin. ### Optional +- `certificates` (List of String) PEM or DER encoded public X.509 certificates for SAML signature validation. - `disabled` (Boolean) True if OneLogin is disabled. Defaults to `false`. +- `name` (String) IDP OneLogin resource name +- `relying_party_identifier` (String) String used to identify Genesys Cloud to OneLogin. +- `slo_binding` (String) Valid values: HTTP Redirect, HTTP Post +- `slo_uri` (String) Provided by OneLogin on app creation - `target_uri` (String) Target URI provided by OneLogin. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) diff --git a/docs/resources/idp_ping.md b/docs/resources/idp_ping.md index 61dc0d7f3..827158a7b 100644 --- a/docs/resources/idp_ping.md +++ b/docs/resources/idp_ping.md @@ -37,7 +37,10 @@ resource "genesyscloud_idp_ping" "ping" { ### Optional - `disabled` (Boolean) True if Ping is disabled. Defaults to `false`. +- `name` (String) Name of the provider - `relying_party_identifier` (String) String used to identify Genesys Cloud to Ping. +- `slo_binding` (String) Valid values: HTTP Redirect, HTTP Post +- `slo_uri` (String) Provided on app creation. - `target_uri` (String) Target URI provided by Ping. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) diff --git a/docs/resources/journey_action_map.md b/docs/resources/journey_action_map.md index 467dbed77..883fd233a 100644 --- a/docs/resources/journey_action_map.md +++ b/docs/resources/journey_action_map.md @@ -170,8 +170,8 @@ Required: Required: - `key` (String) The event key. -- `session_type` (String) The session type for which this condition can be satisfied. -- `stream_type` (String) The stream type for which this condition can be satisfied. Valid values: Web, Custom, Conversation. +- `session_type` (String) The session type for which this condition can be satisfied. Valid values: web, app. +- `stream_type` (String) The stream type for which this condition can be satisfied. Valid values: Web, App. - `values` (Set of String) The event values. Optional: diff --git a/docs/resources/journey_outcome.md b/docs/resources/journey_outcome.md index 58acec4f7..e3ac09b60 100644 --- a/docs/resources/journey_outcome.md +++ b/docs/resources/journey_outcome.md @@ -126,8 +126,8 @@ Required: - `count` (Number) The number of times the pattern must match. - `criteria` (Block Set, Min: 1) A list of one or more criteria to satisfy. (see [below for nested schema](#nestedblock--journey--patterns--criteria)) -- `session_type` (String) The session type for which this pattern can be matched on. -- `stream_type` (String) The stream type for which this pattern can be matched on.Valid values: Web, Custom, Conversation. +- `session_type` (String) The session type for which this pattern can be matched on. Valid values: web, app. +- `stream_type` (String) The stream type for which this pattern can be matched on. Valid values: Web, App. Optional: diff --git a/docs/resources/journey_segment.md b/docs/resources/journey_segment.md index 785e47715..2550f03ae 100644 --- a/docs/resources/journey_segment.md +++ b/docs/resources/journey_segment.md @@ -119,8 +119,8 @@ Required: - `count` (Number) The number of times the pattern must match. - `criteria` (Block Set, Min: 1) A list of one or more criteria to satisfy. (see [below for nested schema](#nestedblock--journey--patterns--criteria)) -- `session_type` (String) The session type for which this pattern can be matched on. -- `stream_type` (String) The stream type for which this pattern can be matched on.Valid values: Web, Custom, Conversation. +- `session_type` (String) The session type for which this pattern can be matched on. Valid values: web, app. +- `stream_type` (String) The stream type for which this pattern can be matched on. Valid values: Web, App. Optional: diff --git a/docs/resources/routing_utilization.md b/docs/resources/routing_utilization.md index b66575c7f..e0f7f239a 100644 --- a/docs/resources/routing_utilization.md +++ b/docs/resources/routing_utilization.md @@ -64,7 +64,7 @@ resource "genesyscloud_routing_utilization" "org-utilization" { - `callback` (Block List, Max: 1) Callback media settings. If not set, this reverts to the default media type settings. (see [below for nested schema](#nestedblock--callback)) - `chat` (Block List, Max: 1) Chat media settings. If not set, this reverts to the default media type settings. (see [below for nested schema](#nestedblock--chat)) - `email` (Block List, Max: 1) Email media settings. If not set, this reverts to the default media type settings. (see [below for nested schema](#nestedblock--email)) -- `label_utilizations` (Block List) Label utilization settings. If not set, default label settings will be applied. This is in PREVIEW and should not be used unless the feature is available to your organization. (see [below for nested schema](#nestedblock--label_utilizations)) +- `label_utilizations` (Block List) Label utilization settings. If not set, default label settings will be applied. (see [below for nested schema](#nestedblock--label_utilizations)) - `message` (Block List, Max: 1) Message media settings. If not set, this reverts to the default media type settings. (see [below for nested schema](#nestedblock--message)) - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) diff --git a/docs/resources/routing_utilization_label.md b/docs/resources/routing_utilization_label.md index 367e660a4..7714919f7 100644 --- a/docs/resources/routing_utilization_label.md +++ b/docs/resources/routing_utilization_label.md @@ -2,11 +2,11 @@ page_title: "genesyscloud_routing_utilization_label Resource - terraform-provider-genesyscloud" subcategory: "" description: |- - Genesys Cloud Routing Utilization Label. This resource is not yet widely available. Only use it if the feature is enabled. + Genesys Cloud Routing Utilization Label. --- # genesyscloud_routing_utilization_label (Resource) -Genesys Cloud Routing Utilization Label. This resource is not yet widely available. Only use it if the feature is enabled. +Genesys Cloud Routing Utilization Label. ## API Usage The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Client has been granted the necessary scopes and permissions to perform these operations: diff --git a/docs/resources/telephony_providers_edges_phone.md b/docs/resources/telephony_providers_edges_phone.md index 5bcbb1b76..5d7c15349 100644 --- a/docs/resources/telephony_providers_edges_phone.md +++ b/docs/resources/telephony_providers_edges_phone.md @@ -56,8 +56,8 @@ resource "genesyscloud_telephony_providers_edges_phone" "example_phone" { ### Optional - `capabilities` (Block List, Max: 1) Phone Capabilities. (see [below for nested schema](#nestedblock--capabilities)) -- `line_addresses` (List of String) Ordered list of Line DIDs for standalone phones. Each phone number must be in an E.164 phone number format. - `line_base_settings_id` (String) Line Base Settings ID. +- `line_properties` (Block List, Max: 1) line properties (see [below for nested schema](#nestedblock--line_properties)) - `phone_meta_base_id` (String) Phone Meta Base ID. - `properties` (String) phone properties - `state` (String) Indicates if the resource is active, inactive, or deleted. Valid values: active, inactive, deleted. Defaults to `active`. @@ -82,3 +82,12 @@ Optional: - `provisions` (Boolean) Provisions - `registers` (Boolean) Registers + + +### Nested Schema for `line_properties` + +Optional: + +- `line_address` (List of String) DID for standalone phones. Each phone number must be in an E.164 phone number format. +- `remote_address` (List of String) Station remote property for phones. No validation is provided + diff --git a/docs/resources/webdeployments_configuration.md b/docs/resources/webdeployments_configuration.md index cb3d040f9..f3d258b66 100644 --- a/docs/resources/webdeployments_configuration.md +++ b/docs/resources/webdeployments_configuration.md @@ -100,6 +100,10 @@ resource "genesyscloud_webdeployments_configuration" "exampleConfiguration" { channels = ["Webmessaging", "Voice"] mask_selectors = [".my-class", "#my-id"] readonly_selectors = [".my-class", "#my-id"] + pause_criteria = { + url_fragment = "/sensitive" + condition = "includes" + } } journey_events { enabled = true @@ -213,8 +217,18 @@ Optional: - `channels` (List of String) List of channels through which cobrowse is available (for now only Webmessaging and Voice) - `enabled` (Boolean) Whether or not cobrowse is enabled - `mask_selectors` (List of String) List of CSS selectors which should be masked when screen sharing is active +- `pause_criteria` (Block List) Pause criteria that will pause cobrowse if some of them are met in the user's URL (see [below for nested schema](#nestedblock--cobrowse--pause_criteria)) - `readonly_selectors` (List of String) List of CSS selectors which should be read-only when screen sharing is active + +### Nested Schema for `cobrowse.pause_criteria` + +Required: + +- `condition` (String) The condition to be applied to the `url_fragment`. Conditions are 'includes', 'does_not_include', 'starts_with', 'ends_with', 'equals' +- `url_fragment` (String) A string representing a part of the URL that, when matched according to the specified condition, will trigger a pause in the cobrowse session + + ### Nested Schema for `custom_i18n_labels` diff --git a/examples/resources/genesyscloud_webdeployments_configuration/resource.tf b/examples/resources/genesyscloud_webdeployments_configuration/resource.tf index ff8944c76..982c2b1fc 100644 --- a/examples/resources/genesyscloud_webdeployments_configuration/resource.tf +++ b/examples/resources/genesyscloud_webdeployments_configuration/resource.tf @@ -75,6 +75,10 @@ resource "genesyscloud_webdeployments_configuration" "exampleConfiguration" { channels = ["Webmessaging", "Voice"] mask_selectors = [".my-class", "#my-id"] readonly_selectors = [".my-class", "#my-id"] + pause_criteria = { + url_fragment = "/sensitive" + condition = "includes" + } } journey_events { enabled = true diff --git a/genesyscloud/architect_datatable/data_source_genesyscloud_architect_datatable.go b/genesyscloud/architect_datatable/data_source_genesyscloud_architect_datatable.go index fe8f6f8e6..8ec505d59 100644 --- a/genesyscloud/architect_datatable/data_source_genesyscloud_architect_datatable.go +++ b/genesyscloud/architect_datatable/data_source_genesyscloud_architect_datatable.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceArchitectDatatableRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { diff --git a/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable.go b/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable.go index 0aa344ef2..10739a8d2 100644 --- a/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable.go +++ b/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type Datatableproperty struct { diff --git a/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_proxy.go b/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_proxy.go index 9223c15f3..232263a12 100644 --- a/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_proxy.go +++ b/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_proxy.go @@ -6,7 +6,7 @@ import ( "errors" "net/http" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // internalProxy holds a proxy instance that can be used throughout the package diff --git a/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_test.go b/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_test.go index bd6b97a9e..d2df0544c 100644 --- a/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_test.go +++ b/genesyscloud/architect_datatable/resource_genesyscloud_architect_datatable_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectDatatable(t *testing.T) { 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 a346d63de..134f773ad 100644 --- a/genesyscloud/architect_datatable_row/genesyscloud_architect_datatable_row_utils.go +++ b/genesyscloud/architect_datatable_row/genesyscloud_architect_datatable_row_utils.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // Row IDs structured as {table-id}/{key-value} 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 74a126ee4..d75e6d836 100644 --- a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row.go +++ b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type Datatableproperty struct { diff --git a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_proxy.go b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_proxy.go index 1f94400bc..eddc171ee 100644 --- a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_proxy.go +++ b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_proxy.go @@ -4,11 +4,12 @@ import ( "context" "encoding/json" "errors" - "github.com/mitchellh/mapstructure" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "net/http" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" + + "github.com/mitchellh/mapstructure" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // internalProxy holds a proxy instance that can be used throughout the package diff --git a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_test.go b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_test.go index 070e1bc05..5a277203b 100644 --- a/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_test.go +++ b/genesyscloud/architect_datatable_row/resource_genesyscloud_architect_datatable_row_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectDatatableRow(t *testing.T) { diff --git a/genesyscloud/architect_emergencygroup/genesyscloud_architect_emergencygroup_proxy.go b/genesyscloud/architect_emergencygroup/genesyscloud_architect_emergencygroup_proxy.go index 01d41745a..d4d565748 100644 --- a/genesyscloud/architect_emergencygroup/genesyscloud_architect_emergencygroup_proxy.go +++ b/genesyscloud/architect_emergencygroup/genesyscloud_architect_emergencygroup_proxy.go @@ -3,7 +3,8 @@ package architect_emergencygroup import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *architectEmergencyGroupProxy diff --git a/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup.go b/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup.go index 9523a2472..e6640bc33 100644 --- a/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup.go +++ b/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllEmergencyGroups(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_test.go b/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_test.go index 0cf52ad50..7be483c9f 100644 --- a/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_test.go +++ b/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectEmergencyGroups(t *testing.T) { diff --git a/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_utils.go b/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_utils.go index 11ecb8e35..7d57c85ab 100644 --- a/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_utils.go +++ b/genesyscloud/architect_emergencygroup/resource_genesyscloud_architect_emergencygroup_utils.go @@ -2,7 +2,7 @@ package architect_emergencygroup import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildSdkEmergencyGroupCallFlows(d *schema.ResourceData) *[]platformclientv2.Emergencycallflow { diff --git a/genesyscloud/architect_flow/resource_genesyscloud_architect_flow_proxy.go b/genesyscloud/architect_flow/resource_genesyscloud_architect_flow_proxy.go index f0642e4e5..f4a1b6b73 100644 --- a/genesyscloud/architect_flow/resource_genesyscloud_architect_flow_proxy.go +++ b/genesyscloud/architect_flow/resource_genesyscloud_architect_flow_proxy.go @@ -3,9 +3,10 @@ package architect_flow import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *architectFlowProxy diff --git a/genesyscloud/architect_flow/resource_genesyscloud_flow.go b/genesyscloud/architect_flow/resource_genesyscloud_flow.go index 6c70707fd..2ad10f577 100644 --- a/genesyscloud/architect_flow/resource_genesyscloud_flow.go +++ b/genesyscloud/architect_flow/resource_genesyscloud_flow.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllFlows(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/architect_flow/resource_genesyscloud_flow_test.go b/genesyscloud/architect_flow/resource_genesyscloud_flow_test.go index bb721ed40..ddcfb05e4 100644 --- a/genesyscloud/architect_flow/resource_genesyscloud_flow_test.go +++ b/genesyscloud/architect_flow/resource_genesyscloud_flow_test.go @@ -17,7 +17,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // lockFlow will search for a specific flow and then lock it. This is to specifically test the force_unlock flag where I want to create a flow, simulate some one locking it and then attempt to diff --git a/genesyscloud/architect_grammar/genesyscloud_architect_grammar_proxy.go b/genesyscloud/architect_grammar/genesyscloud_architect_grammar_proxy.go index 36c73863d..cd0493219 100644 --- a/genesyscloud/architect_grammar/genesyscloud_architect_grammar_proxy.go +++ b/genesyscloud/architect_grammar/genesyscloud_architect_grammar_proxy.go @@ -6,7 +6,7 @@ import ( "log" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar.go b/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar.go index 6fe8bff54..e7a667976 100644 --- a/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar.go +++ b/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar.go @@ -15,7 +15,7 @@ import ( "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/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar_test.go b/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar_test.go index 6d81a2d27..a85bf3bd2 100644 --- a/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar_test.go +++ b/genesyscloud/architect_grammar/resource_genesyscloud_architect_grammar_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectGrammar(t *testing.T) { diff --git a/genesyscloud/architect_grammar_language/genesyscloud_architect_grammar_language_proxy.go b/genesyscloud/architect_grammar_language/genesyscloud_architect_grammar_language_proxy.go index 6647b9801..00051d1d7 100644 --- a/genesyscloud/architect_grammar_language/genesyscloud_architect_grammar_language_proxy.go +++ b/genesyscloud/architect_grammar_language/genesyscloud_architect_grammar_language_proxy.go @@ -8,7 +8,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/files" "time" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type FileType int diff --git a/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language.go b/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language.go index b8423f1a4..d1374d9f1 100644 --- a/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language.go +++ b/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language.go @@ -16,7 +16,7 @@ import ( "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/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_test.go b/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_test.go index 7bc029fd3..bbff62799 100644 --- a/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_test.go +++ b/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_test.go @@ -15,7 +15,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectGrammarLanguage(t *testing.T) { diff --git a/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_utils.go b/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_utils.go index 97f30023c..b4a6aa530 100644 --- a/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_utils.go +++ b/genesyscloud/architect_grammar_language/resource_genesyscloud_architect_grammar_language_utils.go @@ -13,7 +13,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_ivr/data_source_genesyscloud_architect_ivr_test.go b/genesyscloud/architect_ivr/data_source_genesyscloud_architect_ivr_test.go index 97345394d..0fb9de850 100644 --- a/genesyscloud/architect_ivr/data_source_genesyscloud_architect_ivr_test.go +++ b/genesyscloud/architect_ivr/data_source_genesyscloud_architect_ivr_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" "github.com/google/uuid" diff --git a/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go b/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go index fdd8c9c55..096f1fdbf 100644 --- a/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go +++ b/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy.go @@ -7,7 +7,7 @@ import ( utillists "terraform-provider-genesyscloud/genesyscloud/util/lists" "time" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy_unit_test.go b/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy_unit_test.go index 9c00434e0..a49095e59 100644 --- a/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy_unit_test.go +++ b/genesyscloud/architect_ivr/genesyscloud_architect_ivr_proxy_unit_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/google/uuid" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestUnitUploadIvrDnisChunksSuccess(t *testing.T) { diff --git a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr.go b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr.go index ab6fb8e76..c90727097 100644 --- a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr.go +++ b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // getAllIvrConfigs retrieves all architect IVRs and is used for the exporter diff --git a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_test.go b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_test.go index 166d0320e..7cb398da0 100644 --- a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_test.go +++ b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIvrConfigBasic(t *testing.T) { diff --git a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_unit_test.go b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_unit_test.go index b5c97be4b..6b8073966 100644 --- a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_unit_test.go +++ b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_unit_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" ) diff --git a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_utils.go b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_utils.go index cfe4f8446..4ef23a38a 100644 --- a/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_utils.go +++ b/genesyscloud/architect_ivr/resource_genesyscloud_architect_ivr_utils.go @@ -8,7 +8,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type IvrConfigStruct struct { diff --git a/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go b/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go index 44bf1b3ee..5072b3500 100644 --- a/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go +++ b/genesyscloud/architect_schedulegroups/genesyscloud_architect_schedulegroups_proxy.go @@ -3,8 +3,9 @@ package architect_schedulegroups import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go b/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go index 3b8bd4e45..85805b7a6 100644 --- a/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go +++ b/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups.go @@ -15,7 +15,7 @@ import ( "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/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups_test.go b/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups_test.go index b654c0254..1b2e57d71 100644 --- a/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups_test.go +++ b/genesyscloud/architect_schedulegroups/resource_genesyscloud_architect_schedulegroups_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectScheduleGroups(t *testing.T) { diff --git a/genesyscloud/architect_schedules/genesyscloud_architect_schedules_proxy.go b/genesyscloud/architect_schedules/genesyscloud_architect_schedules_proxy.go index 9fb733127..f19f33763 100644 --- a/genesyscloud/architect_schedules/genesyscloud_architect_schedules_proxy.go +++ b/genesyscloud/architect_schedules/genesyscloud_architect_schedules_proxy.go @@ -6,7 +6,7 @@ import ( "log" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules.go b/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules.go index 7d0c6ba1e..a5b53eba8 100644 --- a/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules.go +++ b/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules.go @@ -19,7 +19,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const timeFormat = "2006-01-02T15:04:05.000000" diff --git a/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules_test.go b/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules_test.go index f780c8d5e..41821062d 100644 --- a/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules_test.go +++ b/genesyscloud/architect_schedules/resource_genesyscloud_architect_schedules_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceArchitectSchedules(t *testing.T) { diff --git a/genesyscloud/architect_user_prompt/genesyscloud_architect_user_prompt_proxy.go b/genesyscloud/architect_user_prompt/genesyscloud_architect_user_prompt_proxy.go index 25ac10cb1..1f0467e5b 100644 --- a/genesyscloud/architect_user_prompt/genesyscloud_architect_user_prompt_proxy.go +++ b/genesyscloud/architect_user_prompt/genesyscloud_architect_user_prompt_proxy.go @@ -4,7 +4,7 @@ import ( "context" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // internalProxy holds a proxy instance that can be used throughout the package diff --git a/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt.go b/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt.go index 6c7a11825..823b8318c 100644 --- a/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt.go +++ b/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllUserPrompts(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_test.go b/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_test.go index 9ed5d9cce..f7c539930 100644 --- a/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_test.go +++ b/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_test.go @@ -16,7 +16,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceUserPromptBasic(t *testing.T) { diff --git a/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_utils.go b/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_utils.go index 615a715c3..5250ed023 100644 --- a/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_utils.go +++ b/genesyscloud/architect_user_prompt/resource_genesyscloud_architect_user_prompt_utils.go @@ -16,7 +16,7 @@ import ( files "terraform-provider-genesyscloud/genesyscloud/util/files" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type PromptAudioData struct { diff --git a/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go b/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go index a5539383f..5bce507ee 100644 --- a/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go +++ b/genesyscloud/auth_role/data_source_genesyscloud_auth_role.go @@ -3,13 +3,14 @@ package auth_role import ( "context" "fmt" - "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/v131/platformclientv2" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go b/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go index 07200518c..9bd760116 100644 --- a/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go +++ b/genesyscloud/auth_role/genesyscloud_auth_role_proxy.go @@ -6,7 +6,7 @@ import ( rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/auth_role/resource_genesyscloud_auth_role.go b/genesyscloud/auth_role/resource_genesyscloud_auth_role.go index 37b70ee8a..587e91ce9 100644 --- a/genesyscloud/auth_role/resource_genesyscloud_auth_role.go +++ b/genesyscloud/auth_role/resource_genesyscloud_auth_role.go @@ -3,10 +3,6 @@ package auth_role import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -16,6 +12,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go b/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go index 80782c374..d39dae8cd 100644 --- a/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go +++ b/genesyscloud/auth_role/resource_genesyscloud_auth_role_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceAuthRoleDefault(t *testing.T) { diff --git a/genesyscloud/auth_role/resource_genesyscloud_auth_role_utils.go b/genesyscloud/auth_role/resource_genesyscloud_auth_role_utils.go index 7efb5f4e1..85375d231 100644 --- a/genesyscloud/auth_role/resource_genesyscloud_auth_role_utils.go +++ b/genesyscloud/auth_role/resource_genesyscloud_auth_role_utils.go @@ -6,7 +6,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func validatePermissionPolicy(proxy *authRoleProxy, policy platformclientv2.Domainpermissionpolicy) (*platformclientv2.APIResponse, error) { diff --git a/genesyscloud/authorization_product/data_source_genesyscloud_authorization_product_test.go b/genesyscloud/authorization_product/data_source_genesyscloud_authorization_product_test.go index f26f62ca5..7629eb42b 100644 --- a/genesyscloud/authorization_product/data_source_genesyscloud_authorization_product_test.go +++ b/genesyscloud/authorization_product/data_source_genesyscloud_authorization_product_test.go @@ -7,7 +7,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" "golang.org/x/net/context" diff --git a/genesyscloud/authorization_product/genesyscloud_authorization_product_proxy.go b/genesyscloud/authorization_product/genesyscloud_authorization_product_proxy.go index 0a920b87a..fa0ce1465 100644 --- a/genesyscloud/authorization_product/genesyscloud_authorization_product_proxy.go +++ b/genesyscloud/authorization_product/genesyscloud_authorization_product_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/data_source_genesyscloud_architect_schedules.go b/genesyscloud/data_source_genesyscloud_architect_schedules.go index a1b604725..1d9411608 100644 --- a/genesyscloud/data_source_genesyscloud_architect_schedules.go +++ b/genesyscloud/data_source_genesyscloud_architect_schedules.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceSchedule() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_auth_division.go b/genesyscloud/data_source_genesyscloud_auth_division.go index dbf0c9e84..1bdacb2f1 100644 --- a/genesyscloud/data_source_genesyscloud_auth_division.go +++ b/genesyscloud/data_source_genesyscloud_auth_division.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceAuthDivision() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_auth_division_home.go b/genesyscloud/data_source_genesyscloud_auth_division_home.go index bf12bec4b..b49303d31 100644 --- a/genesyscloud/data_source_genesyscloud_auth_division_home.go +++ b/genesyscloud/data_source_genesyscloud_auth_division_home.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceAuthDivisionHome() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_journey_action_map.go b/genesyscloud/data_source_genesyscloud_journey_action_map.go index 4f02d9b46..33a8d112f 100644 --- a/genesyscloud/data_source_genesyscloud_journey_action_map.go +++ b/genesyscloud/data_source_genesyscloud_journey_action_map.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceJourneyActionMap() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_journey_action_template.go b/genesyscloud/data_source_genesyscloud_journey_action_template.go index 32f4f93e8..c24b722c3 100644 --- a/genesyscloud/data_source_genesyscloud_journey_action_template.go +++ b/genesyscloud/data_source_genesyscloud_journey_action_template.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceJourneyActionTemplate() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_journey_outcome.go b/genesyscloud/data_source_genesyscloud_journey_outcome.go index ec3473602..9ece86b26 100644 --- a/genesyscloud/data_source_genesyscloud_journey_outcome.go +++ b/genesyscloud/data_source_genesyscloud_journey_outcome.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceJourneyOutcome() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_journey_segment.go b/genesyscloud/data_source_genesyscloud_journey_segment.go index d870635b8..e66ad5fc7 100644 --- a/genesyscloud/data_source_genesyscloud_journey_segment.go +++ b/genesyscloud/data_source_genesyscloud_journey_segment.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceJourneySegment() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_knowledge_category.go b/genesyscloud/data_source_genesyscloud_knowledge_category.go index 27801fee5..c113709fb 100644 --- a/genesyscloud/data_source_genesyscloud_knowledge_category.go +++ b/genesyscloud/data_source_genesyscloud_knowledge_category.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceKnowledgeCategory() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_knowledge_knowledgebase.go b/genesyscloud/data_source_genesyscloud_knowledge_knowledgebase.go index 96f15c63c..94cea4a68 100644 --- a/genesyscloud/data_source_genesyscloud_knowledge_knowledgebase.go +++ b/genesyscloud/data_source_genesyscloud_knowledge_knowledgebase.go @@ -5,14 +5,14 @@ import ( "fmt" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" + "terraform-provider-genesyscloud/genesyscloud/validators" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceKnowledgeKnowledgebase() *schema.Resource { @@ -26,10 +26,10 @@ func dataSourceKnowledgeKnowledgebase() *schema.Resource { Required: true, }, "core_language": { - Description: "Core language for knowledge base in which initial content must be created, language codes [en-US, en-UK, en-AU, de-DE] are supported currently, however the new DX knowledge will support all these language codes", - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"en-US", "en-UK", "en-AU", "de-DE", "es-US", "es-ES", "fr-FR", "pt-BR", "nl-NL", "it-IT", "fr-CA"}, false), + Description: "Core language for knowledge base in which initial content must be created, language codes [en-US, en-UK, en-AU, de-DE] are supported currently, however the new DX knowledge will support all these language codes", + Type: schema.TypeString, + Required: true, + ValidateDiagFunc: validators.ValidateLanguageCode, }, }, } diff --git a/genesyscloud/data_source_genesyscloud_knowledge_label.go b/genesyscloud/data_source_genesyscloud_knowledge_label.go index 45312d9d4..bee3cddfe 100644 --- a/genesyscloud/data_source_genesyscloud_knowledge_label.go +++ b/genesyscloud/data_source_genesyscloud_knowledge_label.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceKnowledgeLabel() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_location.go b/genesyscloud/data_source_genesyscloud_location.go index 2063e68b5..611dbdf33 100644 --- a/genesyscloud/data_source_genesyscloud_location.go +++ b/genesyscloud/data_source_genesyscloud_location.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceLocation() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_organizations_me.go b/genesyscloud/data_source_genesyscloud_organizations_me.go index fe8a15dbe..018930170 100644 --- a/genesyscloud/data_source_genesyscloud_organizations_me.go +++ b/genesyscloud/data_source_genesyscloud_organizations_me.go @@ -3,11 +3,12 @@ package genesyscloud import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceOrganizationsMe() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_quality_forms_evaluation.go b/genesyscloud/data_source_genesyscloud_quality_forms_evaluation.go index a69e74b4a..52aef5fed 100644 --- a/genesyscloud/data_source_genesyscloud_quality_forms_evaluation.go +++ b/genesyscloud/data_source_genesyscloud_quality_forms_evaluation.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type EvaluationFormQuestionGroupStruct struct { diff --git a/genesyscloud/data_source_genesyscloud_quality_forms_survey.go b/genesyscloud/data_source_genesyscloud_quality_forms_survey.go index c3f3d84ae..7c7544614 100644 --- a/genesyscloud/data_source_genesyscloud_quality_forms_survey.go +++ b/genesyscloud/data_source_genesyscloud_quality_forms_survey.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceQualityFormsSurvey() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_routing_email_domain.go b/genesyscloud/data_source_genesyscloud_routing_email_domain.go index 2e9266932..dadf36ac9 100644 --- a/genesyscloud/data_source_genesyscloud_routing_email_domain.go +++ b/genesyscloud/data_source_genesyscloud_routing_email_domain.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // Returns the schema for the routing email domain diff --git a/genesyscloud/data_source_genesyscloud_routing_email_domain_test.go b/genesyscloud/data_source_genesyscloud_routing_email_domain_test.go index f155f18b3..5afcebfd5 100644 --- a/genesyscloud/data_source_genesyscloud_routing_email_domain_test.go +++ b/genesyscloud/data_source_genesyscloud_routing_email_domain_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccDataSourceRoutingEmailDomain(t *testing.T) { diff --git a/genesyscloud/data_source_genesyscloud_routing_language.go b/genesyscloud/data_source_genesyscloud_routing_language.go index eeebd35e8..729080fc8 100644 --- a/genesyscloud/data_source_genesyscloud_routing_language.go +++ b/genesyscloud/data_source_genesyscloud_routing_language.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceRoutingLanguage() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_routing_skill.go b/genesyscloud/data_source_genesyscloud_routing_skill.go index 22bdf02dd..bf82e832d 100644 --- a/genesyscloud/data_source_genesyscloud_routing_skill.go +++ b/genesyscloud/data_source_genesyscloud_routing_skill.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // The context is now added without Timeout , diff --git a/genesyscloud/data_source_genesyscloud_routing_skill_group.go b/genesyscloud/data_source_genesyscloud_routing_skill_group.go index 5bb30ae14..cb5b51cce 100644 --- a/genesyscloud/data_source_genesyscloud_routing_skill_group.go +++ b/genesyscloud/data_source_genesyscloud_routing_skill_group.go @@ -3,13 +3,14 @@ package genesyscloud import ( "context" "fmt" - "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/v131/platformclientv2" "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/v133/platformclientv2" ) func dataSourceRoutingSkillGroup() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_routing_wrapupcode.go b/genesyscloud/data_source_genesyscloud_routing_wrapupcode.go index 33d96f72b..c28a387e5 100644 --- a/genesyscloud/data_source_genesyscloud_routing_wrapupcode.go +++ b/genesyscloud/data_source_genesyscloud_routing_wrapupcode.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceRoutingWrapupcode() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_user.go b/genesyscloud/data_source_genesyscloud_user.go index 42ce5df10..eb9e5f24a 100644 --- a/genesyscloud/data_source_genesyscloud_user.go +++ b/genesyscloud/data_source_genesyscloud_user.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceUser() *schema.Resource { diff --git a/genesyscloud/data_source_genesyscloud_widget_deployment.go b/genesyscloud/data_source_genesyscloud_widget_deployment.go index 31b04b4de..472d8aa7e 100644 --- a/genesyscloud/data_source_genesyscloud_widget_deployment.go +++ b/genesyscloud/data_source_genesyscloud_widget_deployment.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceWidgetDeployments() *schema.Resource { diff --git a/genesyscloud/dependent_consumers/genesyscloud_dependent_consumer_proxy.go b/genesyscloud/dependent_consumers/genesyscloud_dependent_consumer_proxy.go index 1b806376d..5bfaea832 100644 --- a/genesyscloud/dependent_consumers/genesyscloud_dependent_consumer_proxy.go +++ b/genesyscloud/dependent_consumers/genesyscloud_dependent_consumer_proxy.go @@ -4,13 +4,14 @@ import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "strings" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" "terraform-provider-genesyscloud/genesyscloud/util/stringmap" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type DependentConsumerProxy struct { diff --git a/genesyscloud/employeeperformance_externalmetrics_definitions/genesyscloud_employeeperformance_externalmetrics_definitions_proxy.go b/genesyscloud/employeeperformance_externalmetrics_definitions/genesyscloud_employeeperformance_externalmetrics_definitions_proxy.go index 4f123630e..73fe26385 100644 --- a/genesyscloud/employeeperformance_externalmetrics_definitions/genesyscloud_employeeperformance_externalmetrics_definitions_proxy.go +++ b/genesyscloud/employeeperformance_externalmetrics_definitions/genesyscloud_employeeperformance_externalmetrics_definitions_proxy.go @@ -3,8 +3,9 @@ package employeeperformance_externalmetrics_definitions import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions.go b/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions.go index f8ff2b8c8..ff6b02b2c 100644 --- a/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions.go +++ b/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions.go @@ -3,9 +3,6 @@ package employeeperformance_externalmetrics_definitions import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -14,6 +11,10 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" diff --git a/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions_test.go b/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions_test.go index 105eb00e5..d988ab237 100644 --- a/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions_test.go +++ b/genesyscloud/employeeperformance_externalmetrics_definitions/resource_genesyscloud_employeeperformance_externalmetrics_definitions_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceEmployeePerformanceExternalMetricsDefintions(t *testing.T) { diff --git a/genesyscloud/external_contacts/genesyscloud_externalcontacts_contact_proxy.go b/genesyscloud/external_contacts/genesyscloud_externalcontacts_contact_proxy.go index f624411ce..4530e2812 100644 --- a/genesyscloud/external_contacts/genesyscloud_externalcontacts_contact_proxy.go +++ b/genesyscloud/external_contacts/genesyscloud_externalcontacts_contact_proxy.go @@ -7,7 +7,7 @@ import ( rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact.go b/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact.go index 98565b2ea..bc0f113fd 100644 --- a/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact.go +++ b/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_test.go b/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_test.go index bf6c6c2b0..31b245525 100644 --- a/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_test.go +++ b/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_utils.go b/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_utils.go index d7b3df901..2c2142ff6 100644 --- a/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_utils.go +++ b/genesyscloud/external_contacts/resource_genesyscloud_externalcontacts_contact_utils.go @@ -5,7 +5,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/nyaruka/phonenumbers" ) diff --git a/genesyscloud/flow_loglevel/genesyscloud_flow_loglevel_proxy.go b/genesyscloud/flow_loglevel/genesyscloud_flow_loglevel_proxy.go index 34437c34a..cd9193470 100644 --- a/genesyscloud/flow_loglevel/genesyscloud_flow_loglevel_proxy.go +++ b/genesyscloud/flow_loglevel/genesyscloud_flow_loglevel_proxy.go @@ -3,7 +3,8 @@ package flow_loglevel import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel.go b/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel.go index 0100e60ae..748ef1fd6 100644 --- a/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel.go +++ b/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel_test.go b/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel_test.go index acbf5cd6f..883241ef7 100644 --- a/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel_test.go +++ b/genesyscloud/flow_loglevel/resource_genesyscloud_flow_loglevel_test.go @@ -2,14 +2,15 @@ package flow_loglevel import ( "fmt" - "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/architect_flow" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "testing" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceFlowLogLevel(t *testing.T) { diff --git a/genesyscloud/flow_milestone/genesyscloud_flow_milestone_proxy.go b/genesyscloud/flow_milestone/genesyscloud_flow_milestone_proxy.go index 932a45cc7..e6fc37bc1 100644 --- a/genesyscloud/flow_milestone/genesyscloud_flow_milestone_proxy.go +++ b/genesyscloud/flow_milestone/genesyscloud_flow_milestone_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone.go b/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone.go index b83780b75..67538cb90 100644 --- a/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone.go +++ b/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_test.go b/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_test.go index 2f26afbd0..eedf346fb 100644 --- a/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_test.go +++ b/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceFlowMilestone(t *testing.T) { diff --git a/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_utils.go b/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_utils.go index 46b801e53..78cea07b5 100644 --- a/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_utils.go +++ b/genesyscloud/flow_milestone/resource_genesyscloud_flow_milestone_utils.go @@ -2,7 +2,7 @@ package flow_milestone import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/flow_outcome/genesyscloud_flow_outcome_proxy.go b/genesyscloud/flow_outcome/genesyscloud_flow_outcome_proxy.go index 4aa3507bc..b2790b6bc 100644 --- a/genesyscloud/flow_outcome/genesyscloud_flow_outcome_proxy.go +++ b/genesyscloud/flow_outcome/genesyscloud_flow_outcome_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome.go b/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome.go index b36bf8781..89037d9ad 100644 --- a/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome.go +++ b/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome_utils.go b/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome_utils.go index efde6651e..2d143eb77 100644 --- a/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome_utils.go +++ b/genesyscloud/flow_outcome/resource_genesyscloud_flow_outcome_utils.go @@ -2,7 +2,7 @@ package flow_outcome import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/group/data_source_genesyscloud_group_test.go b/genesyscloud/group/data_source_genesyscloud_group_test.go index f69c4f037..548649fc7 100644 --- a/genesyscloud/group/data_source_genesyscloud_group_test.go +++ b/genesyscloud/group/data_source_genesyscloud_group_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/google/uuid" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/genesyscloud/group/genesyscloud_group_proxy.go b/genesyscloud/group/genesyscloud_group_proxy.go index 956ba6d43..a6a380c1a 100644 --- a/genesyscloud/group/genesyscloud_group_proxy.go +++ b/genesyscloud/group/genesyscloud_group_proxy.go @@ -3,8 +3,9 @@ package group import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *groupProxy diff --git a/genesyscloud/group/resource_genesyscloud_group.go b/genesyscloud/group/resource_genesyscloud_group.go index 60faa5abc..59f47ced5 100644 --- a/genesyscloud/group/resource_genesyscloud_group.go +++ b/genesyscloud/group/resource_genesyscloud_group.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func GetAllGroups(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { @@ -46,6 +46,7 @@ func createGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) groupType := d.Get("type").(string) visibility := d.Get("visibility").(string) rulesVisible := d.Get("rules_visible").(bool) + rolesEnabled := d.Get("roles_enabled").(bool) sdkConfig := meta.(*provider.ProviderMeta).ClientConfig gp := getGroupProxy(sdkConfig) @@ -61,6 +62,7 @@ func createGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) Visibility: &visibility, RulesVisible: &rulesVisible, Addresses: addresses, + RolesEnabled: &rolesEnabled, OwnerIds: lists.BuildSdkStringListFromInterfaceArray(d, "owner_ids"), } log.Printf("Creating group %s", name) @@ -111,6 +113,7 @@ func readGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) di resourcedata.SetNillableValue(d, "visibility", group.Visibility) resourcedata.SetNillableValue(d, "rules_visible", group.RulesVisible) resourcedata.SetNillableValue(d, "description", group.Description) + resourcedata.SetNillableValue(d, "roles_enabled", group.RolesEnabled) resourcedata.SetNillableValueWithInterfaceArrayWithFunc(d, "owner_ids", group.Owners, flattenGroupOwners) @@ -136,6 +139,7 @@ func updateGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) description := d.Get("description").(string) visibility := d.Get("visibility").(string) rulesVisible := d.Get("rules_visible").(bool) + rolesEnabled := d.Get("roles_enabled").(bool) sdkConfig := meta.(*provider.ProviderMeta).ClientConfig gp := getGroupProxy(sdkConfig) @@ -160,6 +164,7 @@ func updateGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) Visibility: &visibility, RulesVisible: &rulesVisible, Addresses: addresses, + RolesEnabled: &rolesEnabled, OwnerIds: lists.BuildSdkStringListFromInterfaceArray(d, "owner_ids"), } _, resp, putErr := gp.updateGroup(ctx, d.Id(), updateGroup) diff --git a/genesyscloud/group/resource_genesyscloud_group_schema.go b/genesyscloud/group/resource_genesyscloud_group_schema.go index d4fcc109a..e26320623 100644 --- a/genesyscloud/group/resource_genesyscloud_group_schema.go +++ b/genesyscloud/group/resource_genesyscloud_group_schema.go @@ -1,12 +1,13 @@ package group import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" "terraform-provider-genesyscloud/genesyscloud/validators" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) const resourceName = "genesyscloud_group" @@ -120,6 +121,12 @@ func ResourceGroup() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "roles_enabled": { + Description: "Allow roles to be assigned to this group.", + Type: schema.TypeBool, + Optional: true, + Default: true, + }, }, } } diff --git a/genesyscloud/group/resource_genesyscloud_group_test.go b/genesyscloud/group/resource_genesyscloud_group_test.go index f9658b391..c889d8a4b 100644 --- a/genesyscloud/group/resource_genesyscloud_group_test.go +++ b/genesyscloud/group/resource_genesyscloud_group_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceGroupBasic(t *testing.T) { @@ -44,6 +44,7 @@ func TestAccResourceGroupBasic(t *testing.T) { util.NullValue, // Default type util.NullValue, // Default visibility util.NullValue, // Default rules_visible + "roles_enabled = false", GenerateGroupOwners("genesyscloud_user."+testUserResource+".id"), ), Check: resource.ComposeTestCheckFunc( @@ -52,6 +53,7 @@ func TestAccResourceGroupBasic(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "description", groupDesc1), resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "visibility", visPublic), resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "rules_visible", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "roles_enabled", util.FalseValue), ), }, { @@ -63,6 +65,7 @@ func TestAccResourceGroupBasic(t *testing.T) { strconv.Quote(typeOfficial), // Cannot change type strconv.Quote(visMembers), util.FalseValue, + "roles_enabled = true", GenerateGroupOwners("genesyscloud_user."+testUserResource+".id"), ), Check: resource.ComposeTestCheckFunc( @@ -71,6 +74,7 @@ func TestAccResourceGroupBasic(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "description", groupDesc2), resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "visibility", visMembers), resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "rules_visible", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_group."+groupResource1, "roles_enabled", util.TrueValue), func(s *terraform.State) error { time.Sleep(30 * time.Second) // Wait for 30 seconds for resources to get deleted properly return nil diff --git a/genesyscloud/group/resource_genesyscloud_group_utils.go b/genesyscloud/group/resource_genesyscloud_group_utils.go index b7b5652fe..1c93548fd 100644 --- a/genesyscloud/group/resource_genesyscloud_group_utils.go +++ b/genesyscloud/group/resource_genesyscloud_group_utils.go @@ -2,12 +2,13 @@ package group import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "strings" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // 'number' and 'extension' conflict with eachother. However, one must be set. diff --git a/genesyscloud/group_roles/genesyscloud_group_roles_proxy.go b/genesyscloud/group_roles/genesyscloud_group_roles_proxy.go index 87cb8703e..c868fe9c5 100644 --- a/genesyscloud/group_roles/genesyscloud_group_roles_proxy.go +++ b/genesyscloud/group_roles/genesyscloud_group_roles_proxy.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *groupRolesProxy diff --git a/genesyscloud/group_roles/resource_genesyscloud_group_roles_schema.go b/genesyscloud/group_roles/resource_genesyscloud_group_roles_schema.go index 7adf536f1..734573648 100644 --- a/genesyscloud/group_roles/resource_genesyscloud_group_roles_schema.go +++ b/genesyscloud/group_roles/resource_genesyscloud_group_roles_schema.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" diff --git a/genesyscloud/group_roles/resource_genesyscloud_group_roles_utils.go b/genesyscloud/group_roles/resource_genesyscloud_group_roles_utils.go index d1ecb34c9..3a9940d33 100644 --- a/genesyscloud/group_roles/resource_genesyscloud_group_roles_utils.go +++ b/genesyscloud/group_roles/resource_genesyscloud_group_roles_utils.go @@ -7,7 +7,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func flattenSubjectRoles(d *schema.ResourceData, p *groupRolesProxy) (*schema.Set, *platformclientv2.APIResponse, error) { diff --git a/genesyscloud/idp_adfs/genesyscloud_idp_adfs_proxy.go b/genesyscloud/idp_adfs/genesyscloud_idp_adfs_proxy.go index a1825f1c1..d2284ab71 100644 --- a/genesyscloud/idp_adfs/genesyscloud_idp_adfs_proxy.go +++ b/genesyscloud/idp_adfs/genesyscloud_idp_adfs_proxy.go @@ -3,7 +3,7 @@ package idp_adfs import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs.go b/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs.go index cde86dead..c747406f9 100644 --- a/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs.go +++ b/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" @@ -69,10 +69,13 @@ func readIdpAdfs(ctx context.Context, d *schema.ResourceData, meta interface{}) return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP ADFS: %s", getErr), resp)) } + resourcedata.SetNillableValue(d, "name", aDFS.Name) resourcedata.SetNillableValue(d, "disabled", aDFS.Disabled) resourcedata.SetNillableValue(d, "issuer_uri", aDFS.IssuerURI) resourcedata.SetNillableValue(d, "target_uri", aDFS.SsoTargetURI) resourcedata.SetNillableValue(d, "relying_party_identifier", aDFS.RelyingPartyIdentifier) + resourcedata.SetNillableValue(d, "slo_uri", aDFS.SloURI) + resourcedata.SetNillableValue(d, "slo_binding", aDFS.SloBinding) if aDFS.Certificate != nil { d.Set("certificates", lists.StringListToInterfaceList([]string{*aDFS.Certificate})) @@ -137,9 +140,12 @@ func deleteIdpAdfs(ctx context.Context, d *schema.ResourceData, meta interface{} // getIdpAdfsFromResourceData maps data from schema ResourceData object to a platformclientv2.Adfs func getIdpAdfsFromResourceData(d *schema.ResourceData) platformclientv2.Adfs { return platformclientv2.Adfs{ + Name: platformclientv2.String(d.Get("name").(string)), Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), RelyingPartyIdentifier: platformclientv2.String(d.Get("relying_party_identifier").(string)), + SloURI: platformclientv2.String(d.Get("slo_uri").(string)), + SloBinding: platformclientv2.String(d.Get("slo_binding").(string)), } } diff --git a/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_schema.go b/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_schema.go index beb08620b..85e6db742 100644 --- a/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_schema.go +++ b/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_schema.go @@ -67,7 +67,7 @@ func ResourceIdpAdfs() *schema.Resource { Type: schema.TypeString, }, `slo_uri`: { - Description: `Provided by ADSF on app creation`, + Description: `Provided by ADFS on app creation`, Optional: true, Type: schema.TypeString, }, diff --git a/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_test.go b/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_test.go index ef089ab46..2f77a11f2 100644 --- a/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_test.go +++ b/genesyscloud/idp_adfs/resource_genesyscloud_idp_adfs_test.go @@ -7,17 +7,22 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "testing" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpAdfs(t *testing.T) { var ( + name1 = "Test ADFS " + uuid.NewString() uri1 = "https://test.com/1" uri2 = "https://test.com/2" relyingPartyID1 = "test-id1" relyingPartyID2 = "test-id2" + uri3 = "https://example.com" + slo_binding1 = "HTTP Redirect" + slo_binding2 = "HTTP Post" ) resource.Test(t, resource.TestCase{ @@ -27,83 +32,111 @@ func TestAccResourceIdpAdfs(t *testing.T) { { // Create Config: generateIdpAdfsResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri1, uri2, util.NullValue, // No relying party ID util.NullValue, // Not disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "name", name1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "issuer_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "target_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "relying_party_identifier", ""), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_binding", slo_binding1), ), }, { // Update with new values Config: generateIdpAdfsResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID1), util.TrueValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "name", name1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "relying_party_identifier", relyingPartyID1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "disabled", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_binding", slo_binding2), ), }, { // Update with multiple certs Config: generateIdpAdfsResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "name", name1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_binding", slo_binding1), ), }, { // Update to one cert in array Config: generateIdpAdfsResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "name", name1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "certificates.#", "1"), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_binding", slo_binding2), ), }, { // Update back to two certs in array Config: generateIdpAdfsResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "name", name1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_adfs.adfs", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "certificates.#", "2"), @@ -111,6 +144,8 @@ func TestAccResourceIdpAdfs(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_adfs.adfs", "slo_binding", slo_binding1), ), }, { @@ -125,19 +160,25 @@ func TestAccResourceIdpAdfs(t *testing.T) { } func generateIdpAdfsResource( + name string, certs string, issuerURI string, targetURI string, partyID string, - disabled string) string { + disabled string, + sloURI string, + sloBinding string) string { return fmt.Sprintf(`resource "genesyscloud_idp_adfs" "adfs" { + name = "%s" certificates = %s issuer_uri = "%s" target_uri = "%s" relying_party_identifier = %s disabled = %s + slo_uri = "%s" + slo_binding = "%s" } - `, certs, issuerURI, targetURI, partyID, disabled) + `, name, certs, issuerURI, targetURI, partyID, disabled, sloURI, sloBinding) } func testVerifyIdpAdfsDestroyed(state *terraform.State) error { diff --git a/genesyscloud/idp_generic/genesyscloud_idp_generic_proxy.go b/genesyscloud/idp_generic/genesyscloud_idp_generic_proxy.go new file mode 100644 index 000000000..8aeda9acc --- /dev/null +++ b/genesyscloud/idp_generic/genesyscloud_idp_generic_proxy.go @@ -0,0 +1,87 @@ +package idp_generic + +import ( + "context" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" +) + +/* +The genesyscloud_idp_generic_proxy.go file contains the proxy structures and methods that interact +with the Genesys Cloud SDK. We use composition here for each function on the proxy so individual functions can be stubbed +out during testing. +*/ + +// internalProxy holds a proxy instance that can be used throughout the package +var internalProxy *idpGenericProxy + +// Type definitions for each func on our proxy so we can easily mock them out later +type getIdpGenericFunc func(ctx context.Context, p *idpGenericProxy) (*platformclientv2.Genericsaml, *platformclientv2.APIResponse, error) +type updateIdpGenericFunc func(ctx context.Context, p *idpGenericProxy, id string, genericSAML *platformclientv2.Genericsaml) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) +type deleteIdpGenericFunc func(ctx context.Context, p *idpGenericProxy, id string) (response *platformclientv2.APIResponse, err error) + +// idpGenericProxy contains all of the methods that call genesys cloud APIs. +type idpGenericProxy struct { + clientConfig *platformclientv2.Configuration + identityProviderApi *platformclientv2.IdentityProviderApi + getIdpGenericAttr getIdpGenericFunc + updateIdpGenericAttr updateIdpGenericFunc + deleteIdpGenericAttr deleteIdpGenericFunc +} + +// newIdpGenericProxy initializes the idp generic proxy with all of the data needed to communicate with Genesys Cloud +func newIdpGenericProxy(clientConfig *platformclientv2.Configuration) *idpGenericProxy { + api := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) + return &idpGenericProxy{ + clientConfig: clientConfig, + identityProviderApi: api, + getIdpGenericAttr: getIdpGenericFn, + updateIdpGenericAttr: updateIdpGenericFn, + deleteIdpGenericAttr: deleteIdpGenericFn, + } +} + +// getIdpGenericProxy acts as a singleton to for the internalProxy. It also ensures +// that we can still proxy our tests by directly setting internalProxy package variable +func getIdpGenericProxy(clientConfig *platformclientv2.Configuration) *idpGenericProxy { + if internalProxy == nil { + internalProxy = newIdpGenericProxy(clientConfig) + } + + return internalProxy +} + +// getIdpGeneric retrieves all Genesys Cloud idp generic +func (p *idpGenericProxy) getIdpGeneric(ctx context.Context) (*platformclientv2.Genericsaml, *platformclientv2.APIResponse, error) { + return p.getIdpGenericAttr(ctx, p) +} + +// updateIdpGeneric updates a Genesys Cloud idp generic +func (p *idpGenericProxy) updateIdpGeneric(ctx context.Context, id string, idpGeneric *platformclientv2.Genericsaml) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.updateIdpGenericAttr(ctx, p, id, idpGeneric) +} + +// deleteIdpGeneric deletes a Genesys Cloud idp generic by Id +func (p *idpGenericProxy) deleteIdpGeneric(ctx context.Context, id string) (resp *platformclientv2.APIResponse, err error) { + return p.deleteIdpGenericAttr(ctx, p, id) +} + +// getIdpGenericFn is the implementation for retrieving all idp generic in Genesys Cloud +func getIdpGenericFn(ctx context.Context, p *idpGenericProxy) (*platformclientv2.Genericsaml, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.GetIdentityprovidersGeneric() +} + +// updateIdpGenericFn is an implementation of the function to update a Genesys Cloud idp generic +func updateIdpGenericFn(ctx context.Context, p *idpGenericProxy, id string, idpGeneric *platformclientv2.Genericsaml) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.PutIdentityprovidersGeneric(*idpGeneric) +} + +// deleteIdpGenericFn is an implementation function for deleting a Genesys Cloud idp generic +func deleteIdpGenericFn(ctx context.Context, p *idpGenericProxy, id string) (response *platformclientv2.APIResponse, err error) { + _, resp, err := p.identityProviderApi.DeleteIdentityprovidersGeneric() + if err != nil { + return resp, err + } + + return resp, err +} diff --git a/genesyscloud/idp_generic/resource_genesyscloud_idp_generic.go b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic.go new file mode 100644 index 000000000..a72f05274 --- /dev/null +++ b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic.go @@ -0,0 +1,162 @@ +package idp_generic + +import ( + "context" + "fmt" + "log" + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + "terraform-provider-genesyscloud/genesyscloud/util" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" + + "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/util/lists" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" +) + +/* +The resource_genesyscloud_idp_generic.go contains all of the methods that perform the core logic for a resource. +*/ + +// getAllAuthIdpGeneric retrieves all of the idp generic via Terraform in the Genesys Cloud and is used for the exporter +func getAllAuthIdpGenerics(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { + proxy := getIdpGenericProxy(clientConfig) + resources := make(resourceExporter.ResourceIDMetaMap) + + _, resp, getErr := proxy.getIdpGeneric(ctx) + if getErr != nil { + if util.IsStatus404(resp) { + // Don't export if config doesn't exist + return resources, nil + } + return nil, util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to get IDP Generic error: %s", getErr), resp) + } + + resources["0"] = &resourceExporter.ResourceMeta{Name: "generic"} + return resources, nil +} + +// createIdpGeneric is used by the idp_generic resource to create Genesys cloud idp generic +func createIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + log.Printf("Creating IDP Generic") + d.SetId("generic") + return updateIdpGeneric(ctx, d, meta) +} + +// readIdpGeneric is used by the idp_generic resource to read an idp generic from genesys cloud +func readIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpGenericProxy(sdkConfig) + + log.Printf("Reading idp generic %s", d.Id()) + + cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpGeneric(), constants.DefaultConsistencyChecks, resourceName) + + return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { + genericSAML, resp, getErr := proxy.getIdpGeneric(ctx) + if getErr != nil { + if util.IsStatus404(resp) { + createIdpGeneric(ctx, d, meta) + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP Generic: %s", getErr), resp)) + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP Generic: %s", getErr), resp)) + } + + resourcedata.SetNillableValue(d, "name", genericSAML.Name) + resourcedata.SetNillableValue(d, "disabled", genericSAML.Disabled) + resourcedata.SetNillableValue(d, "issuer_uri", genericSAML.IssuerURI) + resourcedata.SetNillableValue(d, "target_uri", genericSAML.SsoTargetURI) + resourcedata.SetNillableValue(d, "slo_uri", genericSAML.SloURI) + resourcedata.SetNillableValue(d, "slo_binding", genericSAML.SloBinding) + resourcedata.SetNillableValue(d, "relying_party_identifier", genericSAML.RelyingPartyIdentifier) + resourcedata.SetNillableValue(d, "logo_image_data", genericSAML.LogoImageData) + resourcedata.SetNillableValue(d, "endpoint_compression", genericSAML.EndpointCompression) + resourcedata.SetNillableValue(d, "name_identifier_format", genericSAML.NameIdentifierFormat) + + if genericSAML.Certificate != nil { + d.Set("certificates", lists.StringListToInterfaceList([]string{*genericSAML.Certificate})) + } else if genericSAML.Certificates != nil { + d.Set("certificates", lists.StringListToInterfaceList(*genericSAML.Certificates)) + } else { + d.Set("certificates", nil) + } + + log.Printf("Read idp generic %s %s", d.Id(), *genericSAML.Name) + return cc.CheckState(d) + }) +} + +// updateIdpGeneric is used by the idp_generic resource to update an idp generic in Genesys Cloud +func updateIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpGenericProxy(sdkConfig) + + idpGeneric := getIdpGenericFromResourceData(d) + + log.Printf("Updating idp generic %s", *idpGeneric.Name) + + certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") + if certificates != nil { + if len(*certificates) == 1 { + idpGeneric.Certificate = &(*certificates)[0] + } + idpGeneric.Certificates = certificates + } + + _, resp, err := proxy.updateIdpGeneric(ctx, d.Id(), &idpGeneric) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update IDP Generic %s error: %s", d.Id(), err), resp) + } + + log.Printf("Updated idp generic") + return readIdpGeneric(ctx, d, meta) +} + +// deleteIdpGeneric is used by the idp_generic resource to delete an idp generic from Genesys cloud +func deleteIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpGenericProxy(sdkConfig) + + resp, err := proxy.deleteIdpGeneric(ctx, d.Id()) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to delete IDP Generic %s error: %s", d.Id(), err), resp) + } + + return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { + _, resp, err := proxy.getIdpGeneric(ctx) + + if err != nil { + if util.IsStatus404(resp) { + // IDP Generic deleted + log.Printf("Deleted IDP Generic") + return nil + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Error deleting IDP Generic: %s", err), resp)) + } + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("IDP Generic still exists"), resp)) + }) +} + +// getIdpGenericFromResourceData maps data from schema ResourceData object to a platformclientv2.Genericsaml +func getIdpGenericFromResourceData(d *schema.ResourceData) platformclientv2.Genericsaml { + return platformclientv2.Genericsaml{ + Name: platformclientv2.String(d.Get("name").(string)), + Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), + IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), + SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), + RelyingPartyIdentifier: platformclientv2.String(d.Get("relying_party_identifier").(string)), + LogoImageData: platformclientv2.String(d.Get("logo_image_data").(string)), + EndpointCompression: platformclientv2.Bool(d.Get("endpoint_compression").(bool)), + NameIdentifierFormat: platformclientv2.String(d.Get("name_identifier_format").(string)), + SloURI: platformclientv2.String(d.Get("slo_uri").(string)), + SloBinding: platformclientv2.String(d.Get("slo_binding").(string)), + } +} diff --git a/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_init_test.go b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_init_test.go new file mode 100644 index 000000000..25e259220 --- /dev/null +++ b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_init_test.go @@ -0,0 +1,46 @@ +package idp_generic + +import ( + "sync" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +/* + The genesyscloud_idp_generic_init_test.go file is used to initialize the resources + used in testing the idp_generic resource. +*/ + +// providerResources holds a map of all registered resources +var providerResources map[string]*schema.Resource + +type registerTestInstance struct { + resourceMapMutex sync.RWMutex +} + +// registerTestResources registers all resources used in the tests +func (r *registerTestInstance) registerTestResources() { + r.resourceMapMutex.Lock() + defer r.resourceMapMutex.Unlock() + + providerResources[resourceName] = ResourceIdpGeneric() +} + +// initTestResources initializes all test_data resources. +func initTestResources() { + providerResources = make(map[string]*schema.Resource) + + regInstance := ®isterTestInstance{} + + regInstance.registerTestResources() +} + +// TestMain is a "setup" function called by the testing framework when run the test_data +func TestMain(m *testing.M) { + // Run setup function before starting the test_data suite for the idp_generic package + initTestResources() + + // Run the test_data suite for the idp_generic package + m.Run() +} diff --git a/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_schema.go b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_schema.go new file mode 100644 index 000000000..cb5806bca --- /dev/null +++ b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_schema.go @@ -0,0 +1,130 @@ +package idp_generic + +import ( + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" +) + +/* +resource_genesycloud_idp_generic_schema.go holds four functions within it: + +1. The registration code that registers the Datasource, Resource and Exporter for the package. +2. The resource schema definitions for the idp_generic resource. +3. The datasource schema definitions for the idp_generic datasource. +4. The resource exporter configuration for the idp_generic exporter. +*/ +const resourceName = "genesyscloud_idp_generic" + +// SetRegistrar registers all of the resources, datasources and exporters in the package +func SetRegistrar(regInstance registrar.Registrar) { + regInstance.RegisterResource(resourceName, ResourceIdpGeneric()) + regInstance.RegisterExporter(resourceName, IdpGenericExporter()) +} + +// ResourceIdpGeneric registers the genesyscloud_idp_generic resource with Terraform +func ResourceIdpGeneric() *schema.Resource { + return &schema.Resource{ + Description: `Genesys Cloud Single Sign-on Generic Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-a-generic-single-sign-on-provider/`, + + CreateContext: provider.CreateWithPooledClient(createIdpGeneric), + ReadContext: provider.ReadWithPooledClient(readIdpGeneric), + UpdateContext: provider.UpdateWithPooledClient(updateIdpGeneric), + DeleteContext: provider.DeleteWithPooledClient(deleteIdpGeneric), + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + SchemaVersion: 1, + Timeouts: &schema.ResourceTimeout{ + Update: schema.DefaultTimeout(8 * time.Minute), + Read: schema.DefaultTimeout(8 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + `name`: { + Description: `Name of the provider.`, + Required: true, + Type: schema.TypeString, + }, + `disabled`: { + Description: `True if Generic provider is disabled.`, + Optional: true, + Default: false, + Type: schema.TypeBool, + }, + `issuer_uri`: { + Description: `Issuer URI provided by the provider.`, + Required: true, + Type: schema.TypeString, + }, + `target_uri`: { + Description: `Target URI provided by the provider.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_uri`: { + Description: `Provided on app creation.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_binding`: { + Description: `Valid values: HTTP Redirect, HTTP Post`, + Optional: true, + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{`HTTP Redirect`, `HTTP Post`}, false), + }, + `relying_party_identifier`: { + Description: `String used to identify Genesys Cloud to the identity provider.`, + Optional: true, + Type: schema.TypeString, + }, + `certificates`: { + Description: `PEM or DER encoded public X.509 certificates for SAML signature validation.`, + Required: true, + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + `logo_image_data`: { + Description: `Base64 encoded SVG image.`, + Optional: true, + Type: schema.TypeString, + }, + `endpoint_compression`: { + Description: `True if the Genesys Cloud authentication request should be compressed.`, + Optional: true, + Type: schema.TypeBool, + Default: false, + }, + `name_identifier_format`: { + Description: `SAML name identifier format. (urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress | urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName | urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName | urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos | urn:oasis:names:tc:SAML:2.0:nameid-format:entity | urn:oasis:names:tc:SAML:2.0:nameid-format:persistent | urn:oasis:names:tc:SAML:2.0:nameid-format:transient)`, + Type: schema.TypeString, + Optional: true, + Default: `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`, + ValidateFunc: validation.StringInSlice([]string{ + `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`, + `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`, + `urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName`, + `urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName`, + `urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos`, + `urn:oasis:names:tc:SAML:2.0:nameid-format:entity`, + `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`, + `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`, + }, false), + }, + }, + } +} + +// IdpGenericExporter returns the resourceExporter object used to hold the genesyscloud_idp_generic exporter's config +func IdpGenericExporter() *resourceExporter.ResourceExporter { + return &resourceExporter.ResourceExporter{ + GetResourcesFunc: provider.GetAllWithPooledClient(getAllAuthIdpGenerics), + RefAttrs: map[string]*resourceExporter.RefAttrSettings{ + // TODO: Add any reference attributes here + }, + } +} diff --git a/genesyscloud/resource_genesyscloud_idp_generic_test.go b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_test.go similarity index 85% rename from genesyscloud/resource_genesyscloud_idp_generic_test.go rename to genesyscloud/idp_generic/resource_genesyscloud_idp_generic_test.go index 6043d440d..fa9a266f9 100644 --- a/genesyscloud/resource_genesyscloud_idp_generic_test.go +++ b/genesyscloud/idp_generic/resource_genesyscloud_idp_generic_test.go @@ -1,4 +1,4 @@ -package genesyscloud +package idp_generic import ( "fmt" @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpGeneric(t *testing.T) { @@ -23,11 +23,14 @@ func TestAccResourceIdpGeneric(t *testing.T) { nameIDFormatDefault = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" nameIDFormatEmail = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" base64Img = "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvM" + uri3 = "https://example.com" + slo_binding1 = "HTTP Redirect" + slo_binding2 = "HTTP Post" ) resource.Test(t, resource.TestCase{ PreCheck: func() { util.TestAccPreCheck(t) }, - ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), + ProviderFactories: provider.GetProviderFactories(providerResources, nil), Steps: []resource.TestStep{ { // Create @@ -41,6 +44,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { util.NullValue, // no image util.NullValue, // No endpoint compression util.NullValue, // Default name ID format + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name", name1), @@ -52,6 +57,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "logo_image_data", ""), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "endpoint_compression", util.FalseValue), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name_identifier_format", nameIDFormatDefault), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_binding", slo_binding1), ), }, { @@ -66,6 +73,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { strconv.Quote(base64Img), util.TrueValue, // Endpoint compression strconv.Quote(nameIDFormatEmail), + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name", name2), @@ -77,6 +86,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "logo_image_data", base64Img), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "endpoint_compression", util.TrueValue), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name_identifier_format", nameIDFormatEmail), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_binding", slo_binding2), ), }, { @@ -91,6 +102,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { strconv.Quote(base64Img), util.TrueValue, // Endpoint compression strconv.Quote(nameIDFormatEmail), + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name", name2), @@ -100,6 +113,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_binding", slo_binding1), ), }, { @@ -114,6 +129,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { strconv.Quote(base64Img), util.TrueValue, // Endpoint compression strconv.Quote(nameIDFormatEmail), + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name", name2), @@ -123,6 +140,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_binding", slo_binding2), ), }, { @@ -137,6 +156,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { strconv.Quote(base64Img), util.TrueValue, // Endpoint compression strconv.Quote(nameIDFormatEmail), + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "name", name2), @@ -147,6 +168,8 @@ func TestAccResourceIdpGeneric(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_generic.generic", "slo_binding", slo_binding1), ), }, { @@ -169,7 +192,9 @@ func generateIdpGenericResource( disabled string, logoImageData string, endpointCompression string, - nameIDFormat string) string { + nameIDFormat string, + sloURI string, + sloBinding string) string { return fmt.Sprintf(`resource "genesyscloud_idp_generic" "generic" { name = "%s" certificates = %s @@ -180,8 +205,10 @@ func generateIdpGenericResource( logo_image_data = %s endpoint_compression = %s name_identifier_format = %s + slo_uri = "%s" + slo_binding = "%s" } - `, name, certs, issuerURI, targetURI, partyID, disabled, logoImageData, endpointCompression, nameIDFormat) + `, name, certs, issuerURI, targetURI, partyID, disabled, logoImageData, endpointCompression, nameIDFormat, sloURI, sloBinding) } func testVerifyIdpGenericDestroyed(state *terraform.State) error { diff --git a/genesyscloud/idp_gsuite/genesyscloud_idp_gsuite_proxy.go b/genesyscloud/idp_gsuite/genesyscloud_idp_gsuite_proxy.go new file mode 100644 index 000000000..820b555d5 --- /dev/null +++ b/genesyscloud/idp_gsuite/genesyscloud_idp_gsuite_proxy.go @@ -0,0 +1,88 @@ +package idp_gsuite + +import ( + "context" + "fmt" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" +) + +/* +The genesyscloud_idp_gsuite_proxy.go file contains the proxy structures and methods that interact +with the Genesys Cloud SDK. We use composition here for each function on the proxy so individual functions can be stubbed +out during testing. +*/ + +// internalProxy holds a proxy instance that can be used throughout the package +var internalProxy *idpGsuiteProxy + +// Type definitions for each func on our proxy so we can easily mock them out later +type getIdpGsuiteFunc func(ctx context.Context, p *idpGsuiteProxy) (*platformclientv2.Gsuite, *platformclientv2.APIResponse, error) +type updateIdpGsuiteFunc func(ctx context.Context, p *idpGsuiteProxy, id string, gSuite *platformclientv2.Gsuite) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) +type deleteIdpGsuiteFunc func(ctx context.Context, p *idpGsuiteProxy, id string) (response *platformclientv2.APIResponse, err error) + +// idpGsuiteProxy contains all of the methods that call genesys cloud APIs. +type idpGsuiteProxy struct { + clientConfig *platformclientv2.Configuration + identityProviderApi *platformclientv2.IdentityProviderApi + getIdpGsuiteAttr getIdpGsuiteFunc + updateIdpGsuiteAttr updateIdpGsuiteFunc + deleteIdpGsuiteAttr deleteIdpGsuiteFunc +} + +// newIdpGsuiteProxy initializes the idp gsuite proxy with all of the data needed to communicate with Genesys Cloud +func newIdpGsuiteProxy(clientConfig *platformclientv2.Configuration) *idpGsuiteProxy { + api := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) + return &idpGsuiteProxy{ + clientConfig: clientConfig, + identityProviderApi: api, + getIdpGsuiteAttr: getIdpGsuiteFn, + updateIdpGsuiteAttr: updateIdpGsuiteFn, + deleteIdpGsuiteAttr: deleteIdpGsuiteFn, + } +} + +// getIdpGsuiteProxy acts as a singleton to for the internalProxy. It also ensures +// that we can still proxy our tests by directly setting internalProxy package variable +func getIdpGsuiteProxy(clientConfig *platformclientv2.Configuration) *idpGsuiteProxy { + if internalProxy == nil { + internalProxy = newIdpGsuiteProxy(clientConfig) + } + + return internalProxy +} + +// getIdpGsuite retrieves all Genesys Cloud idp gsuite +func (p *idpGsuiteProxy) getIdpGsuite(ctx context.Context) (*platformclientv2.Gsuite, *platformclientv2.APIResponse, error) { + return p.getIdpGsuiteAttr(ctx, p) +} + +// updateIdpGsuite updates a Genesys Cloud idp gsuite +func (p *idpGsuiteProxy) updateIdpGsuite(ctx context.Context, id string, idpGsuite *platformclientv2.Gsuite) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.updateIdpGsuiteAttr(ctx, p, id, idpGsuite) +} + +// deleteIdpGsuite deletes a Genesys Cloud idp gsuite by Id +func (p *idpGsuiteProxy) deleteIdpGsuite(ctx context.Context, id string) (response *platformclientv2.APIResponse, err error) { + return p.deleteIdpGsuiteAttr(ctx, p, id) +} + +// getIdpGsuiteFn is the implementation for retrieving all idp gsuite in Genesys Cloud +func getIdpGsuiteFn(ctx context.Context, p *idpGsuiteProxy) (*platformclientv2.Gsuite, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.GetIdentityprovidersGsuite() +} + +// updateIdpGsuiteFn is an implementation of the function to update a Genesys Cloud idp gsuite +func updateIdpGsuiteFn(ctx context.Context, p *idpGsuiteProxy, id string, idpGsuite *platformclientv2.Gsuite) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.PutIdentityprovidersGsuite(*idpGsuite) +} + +// deleteIdpGsuiteFn is an implementation function for deleting a Genesys Cloud idp gsuite +func deleteIdpGsuiteFn(ctx context.Context, p *idpGsuiteProxy, id string) (response *platformclientv2.APIResponse, err error) { + _, resp, err := p.identityProviderApi.DeleteIdentityprovidersGsuite() + if err != nil { + return resp, fmt.Errorf("Failed to delete idp gsuite: %s", err) + } + + return resp, err +} diff --git a/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite.go b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite.go new file mode 100644 index 000000000..e9b32c0e3 --- /dev/null +++ b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite.go @@ -0,0 +1,156 @@ +package idp_gsuite + +import ( + "context" + "fmt" + "log" + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + "terraform-provider-genesyscloud/genesyscloud/util" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" + + "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/util/lists" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" +) + +/* +The resource_genesyscloud_idp_gsuite.go contains all of the methods that perform the core logic for a resource. +*/ + +// getAllAuthIdpGsuite retrieves all of the idp gsuite via Terraform in the Genesys Cloud and is used for the exporter +func getAllAuthIdpGsuites(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { + proxy := getIdpGsuiteProxy(clientConfig) + resources := make(resourceExporter.ResourceIDMetaMap) + + _, resp, err := proxy.getIdpGsuite(ctx) + if err != nil { + if util.IsStatus404(resp) { + // Don't export if config doesn't exist + return resources, nil + } + return nil, util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to get IDP GSuite error: %s", err), resp) + } + + resources["0"] = &resourceExporter.ResourceMeta{Name: "gsuite"} + return resources, nil +} + +// createIdpGsuite is used by the idp_gsuite resource to create Genesys cloud idp gsuite +func createIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + log.Printf("Creating IDP GSuite") + d.SetId("gsuite") + return updateIdpGsuite(ctx, d, meta) +} + +// readIdpGsuite is used by the idp_gsuite resource to read an idp gsuite from genesys cloud +func readIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpGsuiteProxy(sdkConfig) + + log.Printf("Reading idp gsuite") + + cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpGsuite(), constants.DefaultConsistencyChecks, resourceName) + + return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { + gSuite, resp, getErr := proxy.getIdpGsuite(ctx) + if getErr != nil { + if util.IsStatus404(resp) { + createIdpGsuite(ctx, d, meta) + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP GSuite: %s", getErr), resp)) + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP GSuite: %s", getErr), resp)) + } + + resourcedata.SetNillableValue(d, "name", gSuite.Name) + resourcedata.SetNillableValue(d, "disabled", gSuite.Disabled) + resourcedata.SetNillableValue(d, "issuer_uri", gSuite.IssuerURI) + resourcedata.SetNillableValue(d, "target_uri", gSuite.SsoTargetURI) + resourcedata.SetNillableValue(d, "relying_party_identifier", gSuite.RelyingPartyIdentifier) + resourcedata.SetNillableValue(d, "slo_uri", gSuite.SloURI) + resourcedata.SetNillableValue(d, "slo_binding", gSuite.SloBinding) + + if gSuite.Certificate != nil { + d.Set("certificates", lists.StringListToInterfaceList([]string{*gSuite.Certificate})) + } else if gSuite.Certificates != nil { + d.Set("certificates", lists.StringListToInterfaceList(*gSuite.Certificates)) + } else { + d.Set("certificates", nil) + } + + log.Printf("Read idp gsuite") + return cc.CheckState(d) + }) +} + +// updateIdpGsuite is used by the idp_gsuite resource to update an idp gsuite in Genesys Cloud +func updateIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpGsuiteProxy(sdkConfig) + + idpGsuite := getIdpGsuiteFromResourceData(d) + + log.Printf("Updating idp gsuite") + + certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") + if certificates != nil { + if len(*certificates) == 1 { + idpGsuite.Certificate = &(*certificates)[0] + } + idpGsuite.Certificates = certificates + } + + _, resp, err := proxy.updateIdpGsuite(ctx, d.Id(), &idpGsuite) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update IDP GSuite %s error: %s", d.Id(), err), resp) + } + + log.Printf("Updated idp gsuite") + return readIdpGsuite(ctx, d, meta) +} + +// deleteIdpGsuite is used by the idp_gsuite resource to delete an idp gsuite from Genesys cloud +func deleteIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpGsuiteProxy(sdkConfig) + + resp, err := proxy.deleteIdpGsuite(ctx, d.Id()) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to delete IDP GSuite %s error: %s", d.Id(), err), resp) + } + + return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { + _, resp, err := proxy.getIdpGsuite(ctx) + + if err != nil { + if util.IsStatus404(resp) { + // IDP GSuite deleted + log.Printf("Deleted IDP GSuite") + return nil + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Error deleting IDP GSuite: %s", err), resp)) + } + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("IDP GSuite still exists"), resp)) + }) +} + +// getIdpGsuiteFromResourceData maps data from schema ResourceData object to a platformclientv2.Gsuite +func getIdpGsuiteFromResourceData(d *schema.ResourceData) platformclientv2.Gsuite { + return platformclientv2.Gsuite{ + Name: platformclientv2.String(d.Get("name").(string)), + Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), + IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), + SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), + RelyingPartyIdentifier: platformclientv2.String(d.Get("relying_party_identifier").(string)), + SloURI: platformclientv2.String(d.Get("slo_uri").(string)), + SloBinding: platformclientv2.String(d.Get("slo_binding").(string)), + } +} diff --git a/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_init_test.go b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_init_test.go new file mode 100644 index 000000000..bde036306 --- /dev/null +++ b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_init_test.go @@ -0,0 +1,46 @@ +package idp_gsuite + +import ( + "sync" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +/* + The genesyscloud_idp_gsuite_init_test.go file is used to initialize the resources + used in testing the idp_gsuite resource. +*/ + +// providerResources holds a map of all registered resources +var providerResources map[string]*schema.Resource + +type registerTestInstance struct { + resourceMapMutex sync.RWMutex +} + +// registerTestResources registers all resources used in the tests +func (r *registerTestInstance) registerTestResources() { + r.resourceMapMutex.Lock() + defer r.resourceMapMutex.Unlock() + + providerResources[resourceName] = ResourceIdpGsuite() +} + +// initTestResources initializes all test_data resources. +func initTestResources() { + providerResources = make(map[string]*schema.Resource) + + regInstance := ®isterTestInstance{} + + regInstance.registerTestResources() +} + +// TestMain is a "setup" function called by the testing framework when run the test_data +func TestMain(m *testing.M) { + // Run setup function before starting the test_data suite for the idp_gsuite package + initTestResources() + + // Run the test_data suite for the idp_gsuite package + m.Run() +} diff --git a/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_schema.go b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_schema.go new file mode 100644 index 000000000..6a9f80034 --- /dev/null +++ b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_schema.go @@ -0,0 +1,103 @@ +package idp_gsuite + +import ( + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" +) + +/* +resource_genesycloud_idp_gsuite_schema.go holds four functions within it: + +1. The registration code that registers the Datasource, Resource and Exporter for the package. +2. The resource schema definitions for the idp_gsuite resource. +3. The datasource schema definitions for the idp_gsuite datasource. +4. The resource exporter configuration for the idp_gsuite exporter. +*/ +const resourceName = "genesyscloud_idp_gsuite" + +// SetRegistrar registers all of the resources, datasources and exporters in the package +func SetRegistrar(regInstance registrar.Registrar) { + regInstance.RegisterResource(resourceName, ResourceIdpGsuite()) + regInstance.RegisterExporter(resourceName, IdpGsuiteExporter()) +} + +// ResourceIdpGsuite registers the genesyscloud_idp_gsuite resource with Terraform +func ResourceIdpGsuite() *schema.Resource { + return &schema.Resource{ + Description: `Genesys Cloud Single Sign-on GSuite Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-google-g-suite-single-sign-provider/`, + + CreateContext: provider.CreateWithPooledClient(createIdpGsuite), + ReadContext: provider.ReadWithPooledClient(readIdpGsuite), + UpdateContext: provider.UpdateWithPooledClient(updateIdpGsuite), + DeleteContext: provider.DeleteWithPooledClient(deleteIdpGsuite), + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + SchemaVersion: 1, + Timeouts: &schema.ResourceTimeout{ + Update: schema.DefaultTimeout(8 * time.Minute), + Read: schema.DefaultTimeout(8 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + `name`: { + Description: `Name of the provider.`, + Optional: true, + Type: schema.TypeString, + }, + `disabled`: { + Description: `True if GSuite is disabled.`, + Optional: true, + Type: schema.TypeBool, + Default: false, + }, + `issuer_uri`: { + Description: `Issuer URI provided by GSuite.`, + Required: true, + Type: schema.TypeString, + }, + `target_uri`: { + Description: `Target URI provided by GSuite.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_uri`: { + Description: `Provided on app creation.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_binding`: { + Description: `Valid values: HTTP Redirect, HTTP Post`, + Optional: true, + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{`HTTP Redirect`, `HTTP Post`}, false), + }, + `relying_party_identifier`: { + Description: `String used to identify Genesys Cloud to GSuite.`, + Optional: true, + Type: schema.TypeString, + }, + `certificates`: { + Description: `PEM or DER encoded public X.509 certificates for SAML signature validation.`, + Required: true, + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +// IdpGsuiteExporter returns the resourceExporter object used to hold the genesyscloud_idp_gsuite exporter's config +func IdpGsuiteExporter() *resourceExporter.ResourceExporter { + return &resourceExporter.ResourceExporter{ + GetResourcesFunc: provider.GetAllWithPooledClient(getAllAuthIdpGsuites), + RefAttrs: map[string]*resourceExporter.RefAttrSettings{ + // TODO: Add any reference attributes here + }, + } +} diff --git a/genesyscloud/resource_genesyscloud_idp_gsuite_test.go b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_test.go similarity index 74% rename from genesyscloud/resource_genesyscloud_idp_gsuite_test.go rename to genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_test.go index 38e02fab6..c93f1a188 100644 --- a/genesyscloud/resource_genesyscloud_idp_gsuite_test.go +++ b/genesyscloud/idp_gsuite/resource_genesyscloud_idp_gsuite_test.go @@ -1,4 +1,4 @@ -package genesyscloud +package idp_gsuite import ( "fmt" @@ -7,103 +7,136 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "testing" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpGsuite(t *testing.T) { var ( + name1 = "Test gsuite " + uuid.NewString() uri1 = "https://test.com/1" uri2 = "https://test.com/2" relyingPartyID1 = "test-id1" relyingPartyID2 = "test-id2" + uri3 = "https://example.com" + slo_binding1 = "HTTP Redirect" + slo_binding2 = "HTTP Post" ) resource.Test(t, resource.TestCase{ PreCheck: func() { util.TestAccPreCheck(t) }, - ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), + ProviderFactories: provider.GetProviderFactories(providerResources, nil), Steps: []resource.TestStep{ { // Create Config: generateIdpGsuiteResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri1, uri2, util.NullValue, // No relying party ID util.NullValue, // Not disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "name", name1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "issuer_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "target_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "relying_party_identifier", ""), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_binding", slo_binding1), ), }, { // Update with new values Config: generateIdpGsuiteResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID1), util.TrueValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "name", name1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "relying_party_identifier", relyingPartyID1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "disabled", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_binding", slo_binding2), ), }, { // Update with multiple certs Config: generateIdpGsuiteResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "name", name1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_binding", slo_binding1), ), }, { // Update to one cert in array Config: generateIdpGsuiteResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "name", name1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "certificates.#", "1"), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_binding", slo_binding2), ), }, { // Update back to two certs in array Config: generateIdpGsuiteResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "name", name1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_gsuite.gsuite", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "certificates.#", "2"), @@ -111,6 +144,8 @@ func TestAccResourceIdpGsuite(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_gsuite.gsuite", "slo_binding", slo_binding1), ), }, { @@ -125,19 +160,25 @@ func TestAccResourceIdpGsuite(t *testing.T) { } func generateIdpGsuiteResource( + name string, certs string, issuerURI string, targetURI string, partyID string, - disabled string) string { + disabled string, + sloURI string, + sloBinding string) string { return fmt.Sprintf(`resource "genesyscloud_idp_gsuite" "gsuite" { + name = "%s" certificates = %s issuer_uri = "%s" target_uri = "%s" relying_party_identifier = %s disabled = %s + slo_uri = "%s" + slo_binding = "%s" } - `, certs, issuerURI, targetURI, partyID, disabled) + `, name, certs, issuerURI, targetURI, partyID, disabled, sloURI, sloBinding) } func testVerifyIdpGsuiteDestroyed(state *terraform.State) error { diff --git a/genesyscloud/idp_okta/genesyscloud_idp_okta_proxy.go b/genesyscloud/idp_okta/genesyscloud_idp_okta_proxy.go index 1af69517d..252806870 100644 --- a/genesyscloud/idp_okta/genesyscloud_idp_okta_proxy.go +++ b/genesyscloud/idp_okta/genesyscloud_idp_okta_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/idp_okta/resource_genesyscloud_idp_okta.go b/genesyscloud/idp_okta/resource_genesyscloud_idp_okta.go index 7f0de2a14..b4b1517f5 100644 --- a/genesyscloud/idp_okta/resource_genesyscloud_idp_okta.go +++ b/genesyscloud/idp_okta/resource_genesyscloud_idp_okta.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/lists" @@ -70,9 +70,13 @@ func readIdpOkta(ctx context.Context, d *schema.ResourceData, meta interface{}) cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpOkta(), constants.DefaultConsistencyChecks, "genesyscloud_idp_okta") + resourcedata.SetNillableValue(d, "name", okta.Name) resourcedata.SetNillableValue(d, "disabled", okta.Disabled) resourcedata.SetNillableValue(d, "issuer_uri", okta.IssuerURI) resourcedata.SetNillableValue(d, "target_uri", okta.SsoTargetURI) + resourcedata.SetNillableValue(d, "relying_party_identifier", okta.RelyingPartyIdentifier) + resourcedata.SetNillableValue(d, "slo_uri", okta.SloURI) + resourcedata.SetNillableValue(d, "slo_binding", okta.SloBinding) if okta.Certificate != nil { d.Set("certificates", lists.StringListToInterfaceList([]string{*okta.Certificate})) @@ -140,8 +144,12 @@ func deleteIdpOkta(ctx context.Context, d *schema.ResourceData, meta interface{} // getIdpOktaFromResourceData maps data from schema ResourceData object to a platformclientv2.Okta func getIdpOktaFromResourceData(d *schema.ResourceData) platformclientv2.Okta { return platformclientv2.Okta{ - Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), - IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), - SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), + Name: platformclientv2.String(d.Get("name").(string)), + Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), + IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), + SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), + RelyingPartyIdentifier: platformclientv2.String(d.Get("relying_party_identifier").(string)), + SloURI: platformclientv2.String(d.Get("slo_uri").(string)), + SloBinding: platformclientv2.String(d.Get("slo_binding").(string)), } } diff --git a/genesyscloud/idp_okta/resource_genesyscloud_idp_okta_test.go b/genesyscloud/idp_okta/resource_genesyscloud_idp_okta_test.go index 3b2e770aa..003b2f2f6 100644 --- a/genesyscloud/idp_okta/resource_genesyscloud_idp_okta_test.go +++ b/genesyscloud/idp_okta/resource_genesyscloud_idp_okta_test.go @@ -7,15 +7,22 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "testing" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpOkta(t *testing.T) { var ( - uri1 = "https://test.com/1" - uri2 = "https://test.com/2" + name1 = "Test okta " + uuid.NewString() + uri1 = "https://test.com/1" + uri2 = "https://test.com/2" + relyingPartyID1 = "test-id1" + relyingPartyID2 = "test-id2" + uri3 = "https://example.com" + slo_binding1 = "HTTP Redirect" + slo_binding2 = "HTTP Post" ) resource.Test(t, resource.TestCase{ @@ -25,80 +32,120 @@ func TestAccResourceIdpOkta(t *testing.T) { { // Create Config: generateIdpOktaResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri1, uri2, util.NullValue, // Not disabled + util.NullValue, // No relying party ID + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "name", name1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "issuer_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "target_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "relying_party_identifier", ""), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_binding", slo_binding1), ), }, { // Update with new values Config: generateIdpOktaResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert2)), uri2, uri1, util.TrueValue, // disabled + strconv.Quote(relyingPartyID1), + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "name", name1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "disabled", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "relying_party_identifier", relyingPartyID1), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_binding", slo_binding2), ), }, { // Update with multiple certs Config: generateIdpOktaResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, util.FalseValue, // disabled + strconv.Quote(relyingPartyID2), + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "name", name1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "relying_party_identifier", relyingPartyID2), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_binding", slo_binding1), ), }, { // Update to one cert in array Config: generateIdpOktaResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri2, uri1, util.FalseValue, // disabled + strconv.Quote(relyingPartyID2), + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "name", name1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "certificates.#", "1"), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "relying_party_identifier", relyingPartyID2), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_binding", slo_binding2), ), }, { // Update back to two certs in array Config: generateIdpOktaResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, util.FalseValue, // disabled + strconv.Quote(relyingPartyID2), + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "name", name1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_okta.okta", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "certificates.#", "2"), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "relying_party_identifier", relyingPartyID2), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_okta.okta", "slo_binding", slo_binding1), ), }, { @@ -113,17 +160,25 @@ func TestAccResourceIdpOkta(t *testing.T) { } func generateIdpOktaResource( + name string, certs string, issuerURI string, targetURI string, - disabled string) string { + disabled string, + partyID string, + sloURI string, + sloBinding string) string { return fmt.Sprintf(`resource "genesyscloud_idp_okta" "okta" { + name = "%s" certificates = %s issuer_uri = "%s" target_uri = "%s" disabled = %s + relying_party_identifier = %s + slo_uri = "%s" + slo_binding = "%s" } - `, certs, issuerURI, targetURI, disabled) + `, name, certs, issuerURI, targetURI, disabled, partyID, sloURI, sloBinding) } func testVerifyIdpOktaDestroyed(state *terraform.State) error { diff --git a/genesyscloud/idp_onelogin/genesyscloud_idp_onelogin_proxy.go b/genesyscloud/idp_onelogin/genesyscloud_idp_onelogin_proxy.go new file mode 100644 index 000000000..25e1c8f96 --- /dev/null +++ b/genesyscloud/idp_onelogin/genesyscloud_idp_onelogin_proxy.go @@ -0,0 +1,88 @@ +package idp_onelogin + +import ( + "context" + "fmt" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" +) + +/* +The genesyscloud_idp_onelogin_proxy.go file contains the proxy structures and methods that interact +with the Genesys Cloud SDK. We use composition here for each function on the proxy so individual functions can be stubbed +out during testing. +*/ + +// internalProxy holds a proxy instance that can be used throughout the package +var internalProxy *idpOneloginProxy + +// Type definitions for each func on our proxy so we can easily mock them out later +type getIdpOneloginFunc func(ctx context.Context, p *idpOneloginProxy) (*platformclientv2.Onelogin, *platformclientv2.APIResponse, error) +type updateIdpOneloginFunc func(ctx context.Context, p *idpOneloginProxy, id string, oneLogin *platformclientv2.Onelogin) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) +type deleteIdpOneloginFunc func(ctx context.Context, p *idpOneloginProxy, id string) (response *platformclientv2.APIResponse, err error) + +// idpOneloginProxy contains all of the methods that call genesys cloud APIs. +type idpOneloginProxy struct { + clientConfig *platformclientv2.Configuration + identityProviderApi *platformclientv2.IdentityProviderApi + getIdpOneloginAttr getIdpOneloginFunc + updateIdpOneloginAttr updateIdpOneloginFunc + deleteIdpOneloginAttr deleteIdpOneloginFunc +} + +// newIdpOneloginProxy initializes the idp onelogin proxy with all of the data needed to communicate with Genesys Cloud +func newIdpOneloginProxy(clientConfig *platformclientv2.Configuration) *idpOneloginProxy { + api := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) + return &idpOneloginProxy{ + clientConfig: clientConfig, + identityProviderApi: api, + getIdpOneloginAttr: getIdpOneloginFn, + updateIdpOneloginAttr: updateIdpOneloginFn, + deleteIdpOneloginAttr: deleteIdpOneloginFn, + } +} + +// getIdpOneloginProxy acts as a singleton to for the internalProxy. It also ensures +// that we can still proxy our tests by directly setting internalProxy package variable +func getIdpOneloginProxy(clientConfig *platformclientv2.Configuration) *idpOneloginProxy { + if internalProxy == nil { + internalProxy = newIdpOneloginProxy(clientConfig) + } + + return internalProxy +} + +// getIdpOnelogin retrieves all Genesys Cloud idp onelogin +func (p *idpOneloginProxy) getIdpOnelogin(ctx context.Context) (*platformclientv2.Onelogin, *platformclientv2.APIResponse, error) { + return p.getIdpOneloginAttr(ctx, p) +} + +// updateIdpOnelogin updates a Genesys Cloud idp onelogin +func (p *idpOneloginProxy) updateIdpOnelogin(ctx context.Context, id string, idpOnelogin *platformclientv2.Onelogin) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.updateIdpOneloginAttr(ctx, p, id, idpOnelogin) +} + +// deleteIdpOnelogin deletes a Genesys Cloud idp onelogin by Id +func (p *idpOneloginProxy) deleteIdpOnelogin(ctx context.Context, id string) (response *platformclientv2.APIResponse, err error) { + return p.deleteIdpOneloginAttr(ctx, p, id) +} + +// getAllIdpOneloginFn is the implementation for retrieving all idp onelogin in Genesys Cloud +func getIdpOneloginFn(ctx context.Context, p *idpOneloginProxy) (*platformclientv2.Onelogin, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.GetIdentityprovidersOnelogin() +} + +// updateIdpOneloginFn is an implementation of the function to update a Genesys Cloud idp onelogin +func updateIdpOneloginFn(ctx context.Context, p *idpOneloginProxy, id string, idpOnelogin *platformclientv2.Onelogin) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.PutIdentityprovidersOnelogin(*idpOnelogin) +} + +// deleteIdpOneloginFn is an implementation function for deleting a Genesys Cloud idp onelogin +func deleteIdpOneloginFn(ctx context.Context, p *idpOneloginProxy, id string) (response *platformclientv2.APIResponse, err error) { + _, resp, err := p.identityProviderApi.DeleteIdentityprovidersOnelogin() + if err != nil { + return resp, fmt.Errorf("Failed to delete idp onelogin: %s", err) + } + + return resp, err +} diff --git a/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin.go b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin.go new file mode 100644 index 000000000..c7de09046 --- /dev/null +++ b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin.go @@ -0,0 +1,157 @@ +package idp_onelogin + +import ( + "context" + "fmt" + "log" + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + "terraform-provider-genesyscloud/genesyscloud/util" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" + + "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/util/lists" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" +) + +/* +The resource_genesyscloud_idp_onelogin.go contains all of the methods that perform the core logic for a resource. +*/ + +// getAllAuthIdpOnelogin retrieves all of the idp onelogin via Terraform in the Genesys Cloud and is used for the exporter +func getAllAuthIdpOnelogins(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { + proxy := getIdpOneloginProxy(clientConfig) + resources := make(resourceExporter.ResourceIDMetaMap) + + _, resp, err := proxy.getIdpOnelogin(ctx) + if err != nil { + if util.IsStatus404(resp) { + // Don't export if config doesn't exist + return resources, nil + } + return nil, util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to get IDP Onelogin error: %s", err), resp) + } + + resources["0"] = &resourceExporter.ResourceMeta{Name: "onelogin"} + return resources, nil +} + +// createIdpOnelogin is used by the idp_onelogin resource to create Genesys cloud idp onelogin +func createIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + log.Printf("Creating IDP Onelogin") + d.SetId("onelogin") + return updateIdpOnelogin(ctx, d, meta) +} + +// readIdpOnelogin is used by the idp_onelogin resource to read an idp onelogin from genesys cloud +func readIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpOneloginProxy(sdkConfig) + + log.Printf("Reading idp onelogin") + + return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { + oneLogin, resp, getErr := proxy.getIdpOnelogin(ctx) + if getErr != nil { + if util.IsStatus404(resp) { + createIdpOnelogin(ctx, d, meta) + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP Onelogin: %s", getErr), resp)) + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP Onelogin: %s", getErr), resp)) + } + + cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpOnelogin(), constants.DefaultConsistencyChecks, resourceName) + + if oneLogin.Certificate != nil { + d.Set("certificates", lists.StringListToInterfaceList([]string{*oneLogin.Certificate})) + } else if oneLogin.Certificates != nil { + d.Set("certificates", lists.StringListToInterfaceList(*oneLogin.Certificates)) + } else { + d.Set("certificates", nil) + } + + resourcedata.SetNillableValue(d, "name", oneLogin.Name) + resourcedata.SetNillableValue(d, "disabled", oneLogin.Disabled) + resourcedata.SetNillableValue(d, "issuer_uri", oneLogin.IssuerURI) + resourcedata.SetNillableValue(d, "target_uri", oneLogin.SsoTargetURI) + resourcedata.SetNillableValue(d, "slo_uri", oneLogin.SloURI) + resourcedata.SetNillableValue(d, "slo_binding", oneLogin.SloBinding) + resourcedata.SetNillableValue(d, "relying_party_identifier", oneLogin.RelyingPartyIdentifier) + + log.Printf("Read idp onelogin") + return cc.CheckState(d) + }) +} + +// updateIdpOnelogin is used by the idp_onelogin resource to update an idp onelogin in Genesys Cloud +func updateIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpOneloginProxy(sdkConfig) + + idpOnelogin := getIdpOneloginFromResourceData(d) + + certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") + if certificates != nil { + if len(*certificates) == 1 { + idpOnelogin.Certificate = &(*certificates)[0] + } + idpOnelogin.Certificates = certificates + } + + log.Printf("Updating idp onelogin") + _, resp, err := proxy.updateIdpOnelogin(ctx, d.Id(), &idpOnelogin) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update IDP Onelogin %s error: %s", d.Id(), err), resp) + } + + log.Printf("Updated idp onelogin") + return readIdpOnelogin(ctx, d, meta) +} + +// deleteIdpOnelogin is used by the idp_onelogin resource to delete an idp onelogin from Genesys cloud +func deleteIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpOneloginProxy(sdkConfig) + + log.Printf("Deleting IDP Onelogin") + + resp, err := proxy.deleteIdpOnelogin(ctx, d.Id()) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to updadeletete IDP Onelogin %s error: %s", d.Id(), err), resp) + } + + return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { + _, resp, err := proxy.getIdpOnelogin(ctx) + + if err != nil { + if util.IsStatus404(resp) { + // IDP Onelogin deleted + log.Printf("Deleted IDP Onelogin") + return nil + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Error deleting IDP Onelogin: %s", err), resp)) + } + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("IDP Onelogin still exists"), resp)) + }) +} + +// getIdpOneloginFromResourceData maps data from schema ResourceData object to a platformclientv2.Onelogin +func getIdpOneloginFromResourceData(d *schema.ResourceData) platformclientv2.Onelogin { + return platformclientv2.Onelogin{ + Name: platformclientv2.String(d.Get("name").(string)), + Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), + IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), + SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), + SloURI: platformclientv2.String(d.Get("slo_uri").(string)), + SloBinding: platformclientv2.String(d.Get("slo_binding").(string)), + RelyingPartyIdentifier: platformclientv2.String(d.Get("relying_party_identifier").(string)), + } +} diff --git a/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_init_test.go b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_init_test.go new file mode 100644 index 000000000..266eebab0 --- /dev/null +++ b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_init_test.go @@ -0,0 +1,46 @@ +package idp_onelogin + +import ( + "sync" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +/* + The genesyscloud_idp_onelogin_init_test.go file is used to initialize the data sources and resources + used in testing the idp_onelogin resource. +*/ + +// providerResources holds a map of all registered resources +var providerResources map[string]*schema.Resource + +type registerTestInstance struct { + resourceMapMutex sync.RWMutex +} + +// registerTestResources registers all resources used in the tests +func (r *registerTestInstance) registerTestResources() { + r.resourceMapMutex.Lock() + defer r.resourceMapMutex.Unlock() + + providerResources[resourceName] = ResourceIdpOnelogin() +} + +// initTestResources initializes all test_data resources and data sources. +func initTestResources() { + providerResources = make(map[string]*schema.Resource) + + regInstance := ®isterTestInstance{} + + regInstance.registerTestResources() +} + +// TestMain is a "setup" function called by the testing framework when run the test_data +func TestMain(m *testing.M) { + // Run setup function before starting the test_data suite for the idp_onelogin package + initTestResources() + + // Run the test_data suite for the idp_onelogin package + m.Run() +} diff --git a/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_schema.go b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_schema.go new file mode 100644 index 000000000..4cd3b9cc8 --- /dev/null +++ b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_schema.go @@ -0,0 +1,103 @@ +package idp_onelogin + +import ( + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" +) + +/* +resource_genesycloud_idp_onelogin_schema.go holds four functions within it: + +1. The registration code that registers the Datasource, Resource and Exporter for the package. +2. The resource schema definitions for the idp_onelogin resource. +3. The datasource schema definitions for the idp_onelogin datasource. +4. The resource exporter configuration for the idp_onelogin exporter. +*/ +const resourceName = "genesyscloud_idp_onelogin" + +// SetRegistrar registers all of the resources, datasources and exporters in the package +func SetRegistrar(regInstance registrar.Registrar) { + regInstance.RegisterResource(resourceName, ResourceIdpOnelogin()) + regInstance.RegisterExporter(resourceName, IdpOneloginExporter()) +} + +// ResourceIdpOnelogin registers the genesyscloud_idp_onelogin resource with Terraform +func ResourceIdpOnelogin() *schema.Resource { + return &schema.Resource{ + Description: `Genesys Cloud Single Sign-on OneLogin Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-onelogin-as-single-sign-on-provider/`, + + CreateContext: provider.CreateWithPooledClient(createIdpOnelogin), + ReadContext: provider.ReadWithPooledClient(readIdpOnelogin), + UpdateContext: provider.UpdateWithPooledClient(updateIdpOnelogin), + DeleteContext: provider.DeleteWithPooledClient(deleteIdpOnelogin), + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + SchemaVersion: 1, + Timeouts: &schema.ResourceTimeout{ + Update: schema.DefaultTimeout(8 * time.Minute), + Read: schema.DefaultTimeout(8 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + `name`: { + Description: `IDP OneLogin resource name`, + Optional: true, + Type: schema.TypeString, + }, + `disabled`: { + Description: `True if OneLogin is disabled.`, + Optional: true, + Type: schema.TypeBool, + Default: false, + }, + `issuer_uri`: { + Description: `Issuer URI provided by OneLogin.`, + Required: true, + Type: schema.TypeString, + }, + `target_uri`: { + Description: `Target URI provided by OneLogin.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_uri`: { + Description: `Provided by OneLogin on app creation`, + Optional: true, + Type: schema.TypeString, + }, + `slo_binding`: { + Description: `Valid values: HTTP Redirect, HTTP Post`, + Optional: true, + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{`HTTP Redirect`, `HTTP Post`}, false), + }, + `relying_party_identifier`: { + Description: `String used to identify Genesys Cloud to OneLogin.`, + Optional: true, + Type: schema.TypeString, + }, + `certificates`: { + Description: `PEM or DER encoded public X.509 certificates for SAML signature validation.`, + Optional: true, + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +// IdpOneloginExporter returns the resourceExporter object used to hold the genesyscloud_idp_onelogin exporter's config +func IdpOneloginExporter() *resourceExporter.ResourceExporter { + return &resourceExporter.ResourceExporter{ + GetResourcesFunc: provider.GetAllWithPooledClient(getAllAuthIdpOnelogins), + RefAttrs: map[string]*resourceExporter.RefAttrSettings{ + // TODO: Add any reference attributes here + }, + } +} diff --git a/genesyscloud/resource_genesyscloud_idp_onelogin_test.go b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_test.go similarity index 63% rename from genesyscloud/resource_genesyscloud_idp_onelogin_test.go rename to genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_test.go index fcd55469b..f3e0d5c90 100644 --- a/genesyscloud/resource_genesyscloud_idp_onelogin_test.go +++ b/genesyscloud/idp_onelogin/resource_genesyscloud_idp_onelogin_test.go @@ -1,4 +1,4 @@ -package genesyscloud +package idp_onelogin import ( "fmt" @@ -7,98 +7,145 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "testing" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpOnelogin(t *testing.T) { var ( - uri1 = "https://test.com/1" - uri2 = "https://test.com/2" + name1 = "Test onelogin " + uuid.NewString() + uri1 = "https://test.com/1" + uri2 = "https://test.com/2" + relyingPartyID1 = "test-id1" + relyingPartyID2 = "test-id2" + uri3 = "https://example.com" + slo_binding1 = "HTTP Redirect" + slo_binding2 = "HTTP Post" ) resource.Test(t, resource.TestCase{ PreCheck: func() { util.TestAccPreCheck(t) }, - ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), + ProviderFactories: provider.GetProviderFactories(providerResources, nil), Steps: []resource.TestStep{ { // Create Config: generateIdpOneloginResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri1, uri2, util.NullValue, // Not disabled + util.NullValue, // No relying party ID + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "name", name1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "issuer_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "target_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "relying_party_identifier", ""), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_binding", slo_binding1), ), }, { // Update with new values Config: generateIdpOneloginResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert2)), uri2, uri1, util.TrueValue, // disabled + strconv.Quote(relyingPartyID1), + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "name", name1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "disabled", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "relying_party_identifier", relyingPartyID1), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_binding", slo_binding2), ), }, { // Update with multiple certs Config: generateIdpOneloginResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, util.FalseValue, // disabled + strconv.Quote(relyingPartyID2), + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "name", name1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "relying_party_identifier", relyingPartyID2), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_binding", slo_binding1), ), }, { // Update to one cert in array Config: generateIdpOneloginResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri2, uri1, util.FalseValue, // disabled + strconv.Quote(relyingPartyID2), + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "name", name1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "certificates.#", "1"), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "relying_party_identifier", relyingPartyID2), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_binding", slo_binding2), ), }, { // Update back to two certs in array Config: generateIdpOneloginResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, util.FalseValue, // disabled + strconv.Quote(relyingPartyID2), + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "name", name1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_onelogin.onelogin", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "certificates.#", "2"), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "relying_party_identifier", relyingPartyID2), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_onelogin.onelogin", "slo_binding", slo_binding1), ), }, { @@ -113,17 +160,25 @@ func TestAccResourceIdpOnelogin(t *testing.T) { } func generateIdpOneloginResource( + name string, certs string, issuerURI string, targetURI string, - disabled string) string { + disabled string, + partyID string, + sloURI string, + sloBinding string) string { return fmt.Sprintf(`resource "genesyscloud_idp_onelogin" "onelogin" { + name = "%s" certificates = %s issuer_uri = "%s" target_uri = "%s" disabled = %s + relying_party_identifier = %s + slo_uri = "%s" + slo_binding = "%s" } - `, certs, issuerURI, targetURI, disabled) + `, name, certs, issuerURI, targetURI, disabled, partyID, sloURI, sloBinding) } func testVerifyIdpOneloginDestroyed(state *terraform.State) error { diff --git a/genesyscloud/idp_ping/genesyscloud_idp_ping_proxy.go b/genesyscloud/idp_ping/genesyscloud_idp_ping_proxy.go new file mode 100644 index 000000000..2c9fc61db --- /dev/null +++ b/genesyscloud/idp_ping/genesyscloud_idp_ping_proxy.go @@ -0,0 +1,88 @@ +package idp_ping + +import ( + "context" + "fmt" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" +) + +/* +The genesyscloud_idp_ping_proxy.go file contains the proxy structures and methods that interact +with the Genesys Cloud SDK. We use composition here for each function on the proxy so individual functions can be stubbed +out during testing. +*/ + +// internalProxy holds a proxy instance that can be used throughout the package +var internalProxy *idpPingProxy + +// Type definitions for each func on our proxy so we can easily mock them out later +type getIdpPingFunc func(ctx context.Context, p *idpPingProxy) (*platformclientv2.Pingidentity, *platformclientv2.APIResponse, error) +type updateIdpPingFunc func(ctx context.Context, p *idpPingProxy, id string, pingIdentity *platformclientv2.Pingidentity) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) +type deleteIdpPingFunc func(ctx context.Context, p *idpPingProxy, id string) (response *platformclientv2.APIResponse, err error) + +// idpPingProxy contains all of the methods that call genesys cloud APIs. +type idpPingProxy struct { + clientConfig *platformclientv2.Configuration + identityProviderApi *platformclientv2.IdentityProviderApi + getIdpPingAttr getIdpPingFunc + updateIdpPingAttr updateIdpPingFunc + deleteIdpPingAttr deleteIdpPingFunc +} + +// newIdpPingProxy initializes the idp ping proxy with all of the data needed to communicate with Genesys Cloud +func newIdpPingProxy(clientConfig *platformclientv2.Configuration) *idpPingProxy { + api := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) + return &idpPingProxy{ + clientConfig: clientConfig, + identityProviderApi: api, + getIdpPingAttr: getIdpPingFn, + updateIdpPingAttr: updateIdpPingFn, + deleteIdpPingAttr: deleteIdpPingFn, + } +} + +// getIdpPingProxy acts as a singleton to for the internalProxy. It also ensures +// that we can still proxy our tests by directly setting internalProxy package variable +func getIdpPingProxy(clientConfig *platformclientv2.Configuration) *idpPingProxy { + if internalProxy == nil { + internalProxy = newIdpPingProxy(clientConfig) + } + + return internalProxy +} + +// getIdpPing retrieves all Genesys Cloud idp ping +func (p *idpPingProxy) getIdpPing(ctx context.Context) (*platformclientv2.Pingidentity, *platformclientv2.APIResponse, error) { + return p.getIdpPingAttr(ctx, p) +} + +// updateIdpPing updates a Genesys Cloud idp ping +func (p *idpPingProxy) updateIdpPing(ctx context.Context, id string, idpPing *platformclientv2.Pingidentity) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.updateIdpPingAttr(ctx, p, id, idpPing) +} + +// deleteIdpPing deletes a Genesys Cloud idp ping by Id +func (p *idpPingProxy) deleteIdpPing(ctx context.Context, id string) (response *platformclientv2.APIResponse, err error) { + return p.deleteIdpPingAttr(ctx, p, id) +} + +// getAllIdpPingFn is the implementation for retrieving all idp ping in Genesys Cloud +func getIdpPingFn(ctx context.Context, p *idpPingProxy) (*platformclientv2.Pingidentity, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.GetIdentityprovidersPing() +} + +// updateIdpPingFn is an implementation of the function to update a Genesys Cloud idp ping +func updateIdpPingFn(ctx context.Context, p *idpPingProxy, id string, idpPing *platformclientv2.Pingidentity) (*platformclientv2.Identityprovider, *platformclientv2.APIResponse, error) { + return p.identityProviderApi.PutIdentityprovidersPing(*idpPing) +} + +// deleteIdpPingFn is an implementation function for deleting a Genesys Cloud idp ping +func deleteIdpPingFn(ctx context.Context, p *idpPingProxy, id string) (response *platformclientv2.APIResponse, err error) { + _, resp, err := p.identityProviderApi.DeleteIdentityprovidersPing() + if err != nil { + return resp, fmt.Errorf("Failed to delete idp ping: %s", err) + } + + return resp, err +} diff --git a/genesyscloud/idp_ping/resource_genesyscloud_idp_ping.go b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping.go new file mode 100644 index 000000000..7fb4ba610 --- /dev/null +++ b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping.go @@ -0,0 +1,155 @@ +package idp_ping + +import ( + "context" + "fmt" + "log" + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + "terraform-provider-genesyscloud/genesyscloud/util" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" + + "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/util/lists" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" +) + +/* +The resource_genesyscloud_idp_ping.go contains all of the methods that perform the core logic for a resource. +*/ + +// getAllAuthIdpPing retrieves all of the idp ping via Terraform in the Genesys Cloud and is used for the exporter +func getAllAuthIdpPings(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { + proxy := getIdpPingProxy(clientConfig) + resources := make(resourceExporter.ResourceIDMetaMap) + + _, resp, err := proxy.getIdpPing(ctx) + if err != nil { + if util.IsStatus404(resp) { + // Don't export if config doesn't exist + return resources, nil + } + return nil, util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to get IDP Ping error: %s", err), resp) + } + + resources["0"] = &resourceExporter.ResourceMeta{Name: "ping"} + return resources, nil +} + +// createIdpPing is used by the idp_ping resource to create Genesys cloud idp ping +func createIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + log.Printf("Creating IDP Ping") + d.SetId("ping") + return updateIdpPing(ctx, d, meta) +} + +// readIdpPing is used by the idp_ping resource to read an idp ping from genesys cloud +func readIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpPingProxy(sdkConfig) + + log.Printf("Reading idp ping") + + cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpPing(), constants.DefaultConsistencyChecks, resourceName) + + return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { + pingIdentity, resp, getErr := proxy.getIdpPing(ctx) + if getErr != nil { + if util.IsStatus404(resp) { + createIdpPing(ctx, d, meta) + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP Ping: %s", getErr), resp)) + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read IDP Ping: %s", getErr), resp)) + } + + resourcedata.SetNillableValue(d, "name", pingIdentity.Name) + resourcedata.SetNillableValue(d, "disabled", pingIdentity.Disabled) + resourcedata.SetNillableValue(d, "issuer_uri", pingIdentity.IssuerURI) + resourcedata.SetNillableValue(d, "target_uri", pingIdentity.SsoTargetURI) + resourcedata.SetNillableValue(d, "relying_party_identifier", pingIdentity.RelyingPartyIdentifier) + resourcedata.SetNillableValue(d, "slo_uri", pingIdentity.SloURI) + resourcedata.SetNillableValue(d, "slo_binding", pingIdentity.SloBinding) + + if pingIdentity.Certificate != nil { + d.Set("certificates", lists.StringListToInterfaceList([]string{*pingIdentity.Certificate})) + } else if pingIdentity.Certificates != nil { + d.Set("certificates", lists.StringListToInterfaceList(*pingIdentity.Certificates)) + } else { + d.Set("certificates", nil) + } + + log.Printf("Read idp ping") + return cc.CheckState(d) + }) +} + +// updateIdpPing is used by the idp_ping resource to update an idp ping in Genesys Cloud +func updateIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpPingProxy(sdkConfig) + + idpPing := getIdpPingFromResourceData(d) + + certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") + if certificates != nil { + if len(*certificates) == 1 { + idpPing.Certificate = &(*certificates)[0] + } + idpPing.Certificates = certificates + } + + log.Printf("Updating idp ping") + _, resp, err := proxy.updateIdpPing(ctx, d.Id(), &idpPing) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update IDP Ping %s error: %s", d.Id(), err), resp) + } + + log.Printf("Updated idp ping") + return readIdpPing(ctx, d, meta) +} + +// deleteIdpPing is used by the idp_ping resource to delete an idp ping from Genesys cloud +func deleteIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + sdkConfig := meta.(*provider.ProviderMeta).ClientConfig + proxy := getIdpPingProxy(sdkConfig) + + resp, err := proxy.deleteIdpPing(ctx, d.Id()) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to delete IDP Ping %s error: %s", d.Id(), err), resp) + } + + return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { + _, resp, err := proxy.getIdpPing(ctx) + + if err != nil { + if util.IsStatus404(resp) { + // IDP Ping deleted + log.Printf("Deleted IDP Ping") + return nil + } + return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Error deleting IDP Ping: %s", err), resp)) + } + return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("IDP Ping still exists"), resp)) + }) +} + +// getIdpPingFromResourceData maps data from schema ResourceData object to a platformclientv2.Pingidentity +func getIdpPingFromResourceData(d *schema.ResourceData) platformclientv2.Pingidentity { + return platformclientv2.Pingidentity{ + Name: platformclientv2.String(d.Get("name").(string)), + Disabled: platformclientv2.Bool(d.Get("disabled").(bool)), + IssuerURI: platformclientv2.String(d.Get("issuer_uri").(string)), + SsoTargetURI: platformclientv2.String(d.Get("target_uri").(string)), + RelyingPartyIdentifier: platformclientv2.String(d.Get("relying_party_identifier").(string)), + SloURI: platformclientv2.String(d.Get("slo_uri").(string)), + SloBinding: platformclientv2.String(d.Get("slo_binding").(string)), + } +} diff --git a/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_init_test.go b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_init_test.go new file mode 100644 index 000000000..684a37221 --- /dev/null +++ b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_init_test.go @@ -0,0 +1,46 @@ +package idp_ping + +import ( + "sync" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +/* + The genesyscloud_idp_ping_init_test.go file is used to initialize the resources + used in testing the idp_ping resource. +*/ + +// providerResources holds a map of all registered resources +var providerResources map[string]*schema.Resource + +type registerTestInstance struct { + resourceMapMutex sync.RWMutex +} + +// registerTestResources registers all resources used in the tests +func (r *registerTestInstance) registerTestResources() { + r.resourceMapMutex.Lock() + defer r.resourceMapMutex.Unlock() + + providerResources[resourceName] = ResourceIdpPing() +} + +// initTestResources initializes all test_data resources. +func initTestResources() { + providerResources = make(map[string]*schema.Resource) + + regInstance := ®isterTestInstance{} + + regInstance.registerTestResources() +} + +// TestMain is a "setup" function called by the testing framework when run the test_data +func TestMain(m *testing.M) { + // Run setup function before starting the test_data suite for the idp_ping package + initTestResources() + + // Run the test_data suite for the idp_ping package + m.Run() +} diff --git a/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_schema.go b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_schema.go new file mode 100644 index 000000000..de778f1c2 --- /dev/null +++ b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_schema.go @@ -0,0 +1,103 @@ +package idp_ping + +import ( + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + "terraform-provider-genesyscloud/genesyscloud/provider" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" +) + +/* +resource_genesycloud_idp_ping_schema.go holds four functions within it: + +1. The registration code that registers the Datasource, Resource and Exporter for the package. +2. The resource schema definitions for the idp_ping resource. +3. The datasource schema definitions for the idp_ping datasource. +4. The resource exporter configuration for the idp_ping exporter. +*/ +const resourceName = "genesyscloud_idp_ping" + +// SetRegistrar registers all of the resources, datasources and exporters in the package +func SetRegistrar(regInstance registrar.Registrar) { + regInstance.RegisterResource(resourceName, ResourceIdpPing()) + regInstance.RegisterExporter(resourceName, IdpPingExporter()) +} + +// ResourceIdpPing registers the genesyscloud_idp_ping resource with Terraform +func ResourceIdpPing() *schema.Resource { + return &schema.Resource{ + Description: `Genesys Cloud Single Sign-on Ping Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-ping-identity-single-sign-provider/`, + + CreateContext: provider.CreateWithPooledClient(createIdpPing), + ReadContext: provider.ReadWithPooledClient(readIdpPing), + UpdateContext: provider.UpdateWithPooledClient(updateIdpPing), + DeleteContext: provider.DeleteWithPooledClient(deleteIdpPing), + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + SchemaVersion: 1, + Timeouts: &schema.ResourceTimeout{ + Update: schema.DefaultTimeout(8 * time.Minute), + Read: schema.DefaultTimeout(8 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + `name`: { + Description: `Name of the provider`, + Optional: true, + Type: schema.TypeString, + }, + `disabled`: { + Description: `True if Ping is disabled.`, + Optional: true, + Type: schema.TypeBool, + Default: false, + }, + `issuer_uri`: { + Description: `Issuer URI provided by Ping.`, + Required: true, + Type: schema.TypeString, + }, + `target_uri`: { + Description: `Target URI provided by Ping.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_uri`: { + Description: `Provided on app creation.`, + Optional: true, + Type: schema.TypeString, + }, + `slo_binding`: { + Description: `Valid values: HTTP Redirect, HTTP Post`, + Optional: true, + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{`HTTP Redirect`, `HTTP Post`}, false), + }, + `relying_party_identifier`: { + Description: `String used to identify Genesys Cloud to Ping.`, + Optional: true, + Type: schema.TypeString, + }, + `certificates`: { + Description: `PEM or DER encoded public X.509 certificates for SAML signature validation.`, + Required: true, + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +// IdpPingExporter returns the resourceExporter object used to hold the genesyscloud_idp_ping exporter's config +func IdpPingExporter() *resourceExporter.ResourceExporter { + return &resourceExporter.ResourceExporter{ + GetResourcesFunc: provider.GetAllWithPooledClient(getAllAuthIdpPings), + RefAttrs: map[string]*resourceExporter.RefAttrSettings{ + // TODO: Add any reference attributes here + }, + } +} diff --git a/genesyscloud/resource_genesyscloud_idp_ping_test.go b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_test.go similarity index 74% rename from genesyscloud/resource_genesyscloud_idp_ping_test.go rename to genesyscloud/idp_ping/resource_genesyscloud_idp_ping_test.go index 1211c8230..68f07dc76 100644 --- a/genesyscloud/resource_genesyscloud_idp_ping_test.go +++ b/genesyscloud/idp_ping/resource_genesyscloud_idp_ping_test.go @@ -1,4 +1,4 @@ -package genesyscloud +package idp_ping import ( "fmt" @@ -7,103 +7,136 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "testing" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpPing(t *testing.T) { var ( + name1 = "Test ping " + uuid.NewString() uri1 = "https://test.com/1" uri2 = "https://test.com/2" relyingPartyID1 = "test-id1" relyingPartyID2 = "test-id2" + uri3 = "https://example.com" + slo_binding1 = "HTTP Redirect" + slo_binding2 = "HTTP Post" ) resource.Test(t, resource.TestCase{ PreCheck: func() { util.TestAccPreCheck(t) }, - ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), + ProviderFactories: provider.GetProviderFactories(providerResources, nil), Steps: []resource.TestStep{ { // Create Config: generateIdpPingResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri1, uri2, util.NullValue, // No relying party ID util.NullValue, // Not disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "name", name1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "issuer_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "target_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "relying_party_identifier", ""), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_binding", slo_binding1), ), }, { // Update with new values Config: generateIdpPingResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID1), util.TrueValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "name", name1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "relying_party_identifier", relyingPartyID1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "disabled", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_binding", slo_binding2), ), }, { // Update with multiple certs Config: generateIdpPingResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding1, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "name", name1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_binding", slo_binding1), ), }, { // Update to one cert in array Config: generateIdpPingResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "name", name1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "certificates.#", "1"), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "issuer_uri", uri2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_binding", slo_binding2), ), }, { // Update back to two certs Config: generateIdpPingResource( + name1, util.GenerateStringArray(strconv.Quote(util.TestCert1), strconv.Quote(util.TestCert2)), uri2, uri1, strconv.Quote(relyingPartyID2), util.FalseValue, // disabled + uri3, + slo_binding2, ), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "name", name1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert1), util.ValidateStringInArray("genesyscloud_idp_ping.ping", "certificates", util.TestCert2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "certificates.#", "2"), @@ -111,6 +144,8 @@ func TestAccResourceIdpPing(t *testing.T) { resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "target_uri", uri1), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "relying_party_identifier", relyingPartyID2), resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "disabled", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_uri", uri3), + resource.TestCheckResourceAttr("genesyscloud_idp_ping.ping", "slo_binding", slo_binding2), ), }, { @@ -125,19 +160,25 @@ func TestAccResourceIdpPing(t *testing.T) { } func generateIdpPingResource( + name string, certs string, issuerURI string, targetURI string, partyID string, - disabled string) string { + disabled string, + sloURI string, + sloBinding string) string { return fmt.Sprintf(`resource "genesyscloud_idp_ping" "ping" { + name = "%s" certificates = %s issuer_uri = "%s" target_uri = "%s" relying_party_identifier = %s disabled = %s + slo_uri = "%s" + slo_binding = "%s" } - `, certs, issuerURI, targetURI, partyID, disabled) + `, name, certs, issuerURI, targetURI, partyID, disabled, sloURI, sloBinding) } func testVerifyIdpPingDestroyed(state *terraform.State) error { diff --git a/genesyscloud/idp_salesforce/genesyscloud_idp_salesforce_proxy.go b/genesyscloud/idp_salesforce/genesyscloud_idp_salesforce_proxy.go index 0610597c8..12d674558 100644 --- a/genesyscloud/idp_salesforce/genesyscloud_idp_salesforce_proxy.go +++ b/genesyscloud/idp_salesforce/genesyscloud_idp_salesforce_proxy.go @@ -2,7 +2,8 @@ package idp_salesforce import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce.go b/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce.go index eadc684c1..7408150da 100644 --- a/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce.go +++ b/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce.go @@ -3,10 +3,6 @@ package idp_salesforce import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -16,6 +12,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce_test.go b/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce_test.go index d891e5601..2d5e43a9a 100644 --- a/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce_test.go +++ b/genesyscloud/idp_salesforce/resource_genesyscloud_idp_salesforce_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceIdpSalesforce(t *testing.T) { diff --git a/genesyscloud/integration/genesyscloud_integration_proxy.go b/genesyscloud/integration/genesyscloud_integration_proxy.go index 5f40e21a4..d88f700c7 100644 --- a/genesyscloud/integration/genesyscloud_integration_proxy.go +++ b/genesyscloud/integration/genesyscloud_integration_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration/resource_genesyscloud_integration.go b/genesyscloud/integration/resource_genesyscloud_integration.go index d164f75a6..e801c945b 100644 --- a/genesyscloud/integration/resource_genesyscloud_integration.go +++ b/genesyscloud/integration/resource_genesyscloud_integration.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration/resource_genesyscloud_integration_test.go b/genesyscloud/integration/resource_genesyscloud_integration_test.go index 4f0476236..41a195fd3 100644 --- a/genesyscloud/integration/resource_genesyscloud_integration_test.go +++ b/genesyscloud/integration/resource_genesyscloud_integration_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration/resource_genesyscloud_integration_utils.go b/genesyscloud/integration/resource_genesyscloud_integration_utils.go index b28c17d00..24e2b6385 100644 --- a/genesyscloud/integration/resource_genesyscloud_integration_utils.go +++ b/genesyscloud/integration/resource_genesyscloud_integration_utils.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_action/genesyscloud_integration_action_proxy.go b/genesyscloud/integration_action/genesyscloud_integration_action_proxy.go index bc7f7591a..2f6fbffce 100644 --- a/genesyscloud/integration_action/genesyscloud_integration_action_proxy.go +++ b/genesyscloud/integration_action/genesyscloud_integration_action_proxy.go @@ -4,8 +4,9 @@ import ( "context" "encoding/json" "errors" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "net/http" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_action/resource_genesyscloud_integration_action.go b/genesyscloud/integration_action/resource_genesyscloud_integration_action.go index b2d9139c9..7ba76039e 100644 --- a/genesyscloud/integration_action/resource_genesyscloud_integration_action.go +++ b/genesyscloud/integration_action/resource_genesyscloud_integration_action.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_action/resource_genesyscloud_integration_action_test.go b/genesyscloud/integration_action/resource_genesyscloud_integration_action_test.go index 24fe588ff..5f5cf9478 100644 --- a/genesyscloud/integration_action/resource_genesyscloud_integration_action_test.go +++ b/genesyscloud/integration_action/resource_genesyscloud_integration_action_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_action/resource_genesyscloud_integration_action_utils.go b/genesyscloud/integration_action/resource_genesyscloud_integration_action_utils.go index f74621600..7d6362e49 100644 --- a/genesyscloud/integration_action/resource_genesyscloud_integration_action_utils.go +++ b/genesyscloud/integration_action/resource_genesyscloud_integration_action_utils.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" ) diff --git a/genesyscloud/integration_credential/genesyscloud_integration_credential_proxy.go b/genesyscloud/integration_credential/genesyscloud_integration_credential_proxy.go index 31f0da8df..f74d2148f 100644 --- a/genesyscloud/integration_credential/genesyscloud_integration_credential_proxy.go +++ b/genesyscloud/integration_credential/genesyscloud_integration_credential_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_credential/resource_genesyscloud_integration_credential.go b/genesyscloud/integration_credential/resource_genesyscloud_integration_credential.go index e82c6ca79..f0cae5e89 100644 --- a/genesyscloud/integration_credential/resource_genesyscloud_integration_credential.go +++ b/genesyscloud/integration_credential/resource_genesyscloud_integration_credential.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_credential/resource_genesyscloud_integration_credential_test.go b/genesyscloud/integration_credential/resource_genesyscloud_integration_credential_test.go index f401541ac..2b3c6ca3c 100644 --- a/genesyscloud/integration_credential/resource_genesyscloud_integration_credential_test.go +++ b/genesyscloud/integration_credential/resource_genesyscloud_integration_credential_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_custom_auth_action/genesyscloud_integration_custom_auth_action_proxy.go b/genesyscloud/integration_custom_auth_action/genesyscloud_integration_custom_auth_action_proxy.go index dda4e4553..a38118540 100644 --- a/genesyscloud/integration_custom_auth_action/genesyscloud_integration_custom_auth_action_proxy.go +++ b/genesyscloud/integration_custom_auth_action/genesyscloud_integration_custom_auth_action_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action.go b/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action.go index 8839fee9b..6e33849ea 100644 --- a/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action.go +++ b/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_test.go b/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_test.go index 3d2e51163..9e9ec4361 100644 --- a/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_test.go +++ b/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_test.go @@ -15,7 +15,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type customAuthActionResource struct { diff --git a/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_utils.go b/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_utils.go index 209c4e24d..0dc80f639 100644 --- a/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_utils.go +++ b/genesyscloud/integration_custom_auth_action/resource_genesyscloud_integration_custom_auth_action_utils.go @@ -6,7 +6,7 @@ import ( integrationAction "terraform-provider-genesyscloud/genesyscloud/integration_action" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/journey_outcome_predictor/genesyscloud_journey_outcome_predictor_proxy.go b/genesyscloud/journey_outcome_predictor/genesyscloud_journey_outcome_predictor_proxy.go index e5846292b..6d1a11ce6 100644 --- a/genesyscloud/journey_outcome_predictor/genesyscloud_journey_outcome_predictor_proxy.go +++ b/genesyscloud/journey_outcome_predictor/genesyscloud_journey_outcome_predictor_proxy.go @@ -2,7 +2,8 @@ package journey_outcome_predictor import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor.go b/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor.go index cda54b354..ba39ce936 100644 --- a/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor.go +++ b/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor_test.go b/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor_test.go index 98872d160..fdcbbd1ec 100644 --- a/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor_test.go +++ b/genesyscloud/journey_outcome_predictor/resource_genesyscloud_journey_outcome_predictor_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceJourneyOutcomePredictor(t *testing.T) { diff --git a/genesyscloud/journey_views/genesyscloud_journey_views_proxy.go b/genesyscloud/journey_views/genesyscloud_journey_views_proxy.go index 4964990b3..5503209a0 100644 --- a/genesyscloud/journey_views/genesyscloud_journey_views_proxy.go +++ b/genesyscloud/journey_views/genesyscloud_journey_views_proxy.go @@ -2,8 +2,9 @@ package journey_views import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *journeyViewsProxy diff --git a/genesyscloud/journey_views/resource_genesyscloud_journey_views.go b/genesyscloud/journey_views/resource_genesyscloud_journey_views.go index 2d6b4f702..2ec96bddd 100644 --- a/genesyscloud/journey_views/resource_genesyscloud_journey_views.go +++ b/genesyscloud/journey_views/resource_genesyscloud_journey_views.go @@ -3,10 +3,6 @@ package journey_views import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -14,6 +10,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) func createJourneyView(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/genesyscloud/journey_views/resource_genesyscloud_journey_views_test.go b/genesyscloud/journey_views/resource_genesyscloud_journey_views_test.go index 8116ced64..6e0588a7e 100644 --- a/genesyscloud/journey_views/resource_genesyscloud_journey_views_test.go +++ b/genesyscloud/journey_views/resource_genesyscloud_journey_views_test.go @@ -2,14 +2,15 @@ package journey_views import ( "fmt" - "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "strings" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "testing" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceJourneyViewsBasic(t *testing.T) { diff --git a/genesyscloud/journey_views/resource_genesyscloud_journey_views_utils.go b/genesyscloud/journey_views/resource_genesyscloud_journey_views_utils.go index 7c8254f7d..a6e3b35fb 100644 --- a/genesyscloud/journey_views/resource_genesyscloud_journey_views_utils.go +++ b/genesyscloud/journey_views/resource_genesyscloud_journey_views_utils.go @@ -2,9 +2,10 @@ package journey_views import ( "errors" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildElements(d *schema.ResourceData) (*[]platformclientv2.Journeyviewelement, error) { diff --git a/genesyscloud/oauth_client/resource_genesyscloud_oauth_client.go b/genesyscloud/oauth_client/resource_genesyscloud_oauth_client.go index 851bf78cc..3693ad9a0 100644 --- a/genesyscloud/oauth_client/resource_genesyscloud_oauth_client.go +++ b/genesyscloud/oauth_client/resource_genesyscloud_oauth_client.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllOAuthClients(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_proxy.go b/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_proxy.go index f4b0416f6..673342dc7 100644 --- a/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_proxy.go +++ b/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_proxy.go @@ -5,7 +5,7 @@ import ( "log" "sync" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *oauthClientProxy diff --git a/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_utils.go b/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_utils.go index dcdacc228..ef33c44ea 100644 --- a/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_utils.go +++ b/genesyscloud/oauth_client/resource_genesyscloud_oauth_client_utils.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildOAuthRedirectURIs(d *schema.ResourceData) *[]string { diff --git a/genesyscloud/oauth_client/resource_genesyscloude_oauth_client_unit_test.go b/genesyscloud/oauth_client/resource_genesyscloude_oauth_client_unit_test.go index 2f8b9e9fb..f4a20d830 100644 --- a/genesyscloud/oauth_client/resource_genesyscloude_oauth_client_unit_test.go +++ b/genesyscloud/oauth_client/resource_genesyscloude_oauth_client_unit_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" ) diff --git a/genesyscloud/organization_authentication_settings/genesyscloud_organization_authentication_settings_proxy.go b/genesyscloud/organization_authentication_settings/genesyscloud_organization_authentication_settings_proxy.go index bd316f7db..b4a1f3920 100644 --- a/genesyscloud/organization_authentication_settings/genesyscloud_organization_authentication_settings_proxy.go +++ b/genesyscloud/organization_authentication_settings/genesyscloud_organization_authentication_settings_proxy.go @@ -3,7 +3,8 @@ package organization_authentication_settings import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings.go b/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings.go index 00e0e5f2f..18f951c6b 100644 --- a/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings.go +++ b/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings.go @@ -3,9 +3,6 @@ package organization_authentication_settings import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -13,6 +10,10 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" diff --git a/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_unit_test.go b/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_unit_test.go index 2d65d7a8b..6d9e2a9c3 100644 --- a/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_unit_test.go +++ b/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_unit_test.go @@ -2,14 +2,15 @@ package organization_authentication_settings import ( "context" + "net/http" + "terraform-provider-genesyscloud/genesyscloud/provider" + "testing" + "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" - "net/http" - "terraform-provider-genesyscloud/genesyscloud/provider" - "testing" ) // Unit Test diff --git a/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_utils.go b/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_utils.go index d981238fd..cdd63df6a 100644 --- a/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_utils.go +++ b/genesyscloud/organization_authentication_settings/resource_genesyscloud_organization_authentication_settings_utils.go @@ -5,7 +5,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/orgauthorization_pairing/genesyscloud_orgauthorization_pairing_proxy.go b/genesyscloud/orgauthorization_pairing/genesyscloud_orgauthorization_pairing_proxy.go index 5cfb68125..dda0b1368 100644 --- a/genesyscloud/orgauthorization_pairing/genesyscloud_orgauthorization_pairing_proxy.go +++ b/genesyscloud/orgauthorization_pairing/genesyscloud_orgauthorization_pairing_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *orgauthorizationPairingProxy diff --git a/genesyscloud/orgauthorization_pairing/resource_genesyscloud_orgauthorization_pairing.go b/genesyscloud/orgauthorization_pairing/resource_genesyscloud_orgauthorization_pairing.go index 5f4bc6923..87c15d137 100644 --- a/genesyscloud/orgauthorization_pairing/resource_genesyscloud_orgauthorization_pairing.go +++ b/genesyscloud/orgauthorization_pairing/resource_genesyscloud_orgauthorization_pairing.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func createOrgauthorizationPairing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/genesyscloud/outbound/data_source_genesyscloud_outbound_cattemptlimit.go b/genesyscloud/outbound/data_source_genesyscloud_outbound_cattemptlimit.go index 25a84f122..a76adebbc 100644 --- a/genesyscloud/outbound/data_source_genesyscloud_outbound_cattemptlimit.go +++ b/genesyscloud/outbound/data_source_genesyscloud_outbound_cattemptlimit.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceOutboundAttemptLimit() *schema.Resource { diff --git a/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign.go b/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign.go index 391bbdbf2..a6b3bae39 100644 --- a/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign.go +++ b/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceOutboundMessagingcampaign() *schema.Resource { diff --git a/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign_test.go b/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign_test.go index a95ebc65b..56192696e 100644 --- a/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign_test.go +++ b/genesyscloud/outbound/data_source_genesyscloud_outbound_messagingcampaign_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var TrueValue = "true" diff --git a/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign.go b/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign.go index b497d5851..1c1a11c11 100644 --- a/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign.go +++ b/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign_test.go b/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign_test.go index c0d206474..7f4e83de3 100644 --- a/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign_test.go +++ b/genesyscloud/outbound/resource_genesyscloud_outbound_messagingcampaign_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" obCallableTimeset "terraform-provider-genesyscloud/genesyscloud/outbound_callabletimeset" obContactList "terraform-provider-genesyscloud/genesyscloud/outbound_contact_list" diff --git a/genesyscloud/outbound_attempt_limit/data_source_genesyscloud_outbound_attemptlimit.go b/genesyscloud/outbound_attempt_limit/data_source_genesyscloud_outbound_attemptlimit.go index 1d330796b..36308b5a8 100644 --- a/genesyscloud/outbound_attempt_limit/data_source_genesyscloud_outbound_attemptlimit.go +++ b/genesyscloud/outbound_attempt_limit/data_source_genesyscloud_outbound_attemptlimit.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceOutboundAttemptLimit() *schema.Resource { diff --git a/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit.go b/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit.go index febb736c6..501055d4f 100644 --- a/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit.go +++ b/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit_test.go b/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit_test.go index d9d1292be..53880070f 100644 --- a/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit_test.go +++ b/genesyscloud/outbound_attempt_limit/resource_genesyscloud_outbound_attemptlimit_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // func init() { diff --git a/genesyscloud/outbound_callabletimeset/genesyscloud_outbound_callabletimeset_proxy.go b/genesyscloud/outbound_callabletimeset/genesyscloud_outbound_callabletimeset_proxy.go index 96f564262..9e07b4c83 100644 --- a/genesyscloud/outbound_callabletimeset/genesyscloud_outbound_callabletimeset_proxy.go +++ b/genesyscloud/outbound_callabletimeset/genesyscloud_outbound_callabletimeset_proxy.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset.go b/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset.go index c9eb25331..3252e41c7 100644 --- a/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset.go +++ b/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_test.go b/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_test.go index 12f28a9d2..f899b1fea 100644 --- a/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_test.go +++ b/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundCallabletimeset(t *testing.T) { diff --git a/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_utils.go b/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_utils.go index acba89881..7186d9656 100644 --- a/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_utils.go +++ b/genesyscloud/outbound_callabletimeset/resource_genesyscloud_outbound_callabletimeset_utils.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_callanalysisresponseset/genesyscloud_outbound_callanalysisresponseset_proxy.go b/genesyscloud/outbound_callanalysisresponseset/genesyscloud_outbound_callanalysisresponseset_proxy.go index 5eded85c3..d2be5cd95 100644 --- a/genesyscloud/outbound_callanalysisresponseset/genesyscloud_outbound_callanalysisresponseset_proxy.go +++ b/genesyscloud/outbound_callanalysisresponseset/genesyscloud_outbound_callanalysisresponseset_proxy.go @@ -3,8 +3,9 @@ package outbound_callanalysisresponseset import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset.go b/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset.go index 90744ea1f..4a78aa3ef 100644 --- a/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset.go +++ b/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset.go @@ -3,10 +3,6 @@ package outbound_callanalysisresponseset import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -15,6 +11,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_test.go b/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_test.go index 74cd9f5fd..7083040f3 100644 --- a/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_test.go +++ b/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundCallAnalysisResponseSet(t *testing.T) { diff --git a/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_utils.go b/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_utils.go index d48a46401..766684c0d 100644 --- a/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_utils.go +++ b/genesyscloud/outbound_callanalysisresponseset/resource_genesyscloud_outbound_callanalysisresponseset_utils.go @@ -2,10 +2,11 @@ package outbound_callanalysisresponseset import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "strings" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getResponseSetFromResourceData(d *schema.ResourceData) platformclientv2.Responseset { diff --git a/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_init_test.go b/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_init_test.go index 03bdbd559..fe001444c 100644 --- a/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_init_test.go +++ b/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_init_test.go @@ -16,7 +16,7 @@ import ( telephonyProvidersEdgesSite "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site" "testing" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_proxy.go b/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_proxy.go index 8105cebb3..c73561bab 100644 --- a/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_proxy.go +++ b/genesyscloud/outbound_campaign/genesyscloud_outbound_campaign_proxy.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign.go b/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign.go index bdcd48c47..26ca8308c 100644 --- a/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign.go +++ b/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign.go @@ -15,7 +15,7 @@ import ( "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/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_test.go b/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_test.go index 2ada8f3fa..55a7c5004 100644 --- a/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_test.go +++ b/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_test.go @@ -23,7 +23,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // Add a special generator DEVENGAGE-1646. Basically, the API makes it look like you need a full phone_columns field here. However, the API ignores the type because the devs reused the phone_columns object. However, diff --git a/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_utils.go b/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_utils.go index 6f8fdc95a..dbd2b3d46 100644 --- a/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_utils.go +++ b/genesyscloud/outbound_campaign/resource_genesyscloud_outbound_campaign_utils.go @@ -18,7 +18,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_campaignrule/data_source_genesyscloud_outbound_campaignrule.go b/genesyscloud/outbound_campaignrule/data_source_genesyscloud_outbound_campaignrule.go index e6694ebb2..9bd8ae0b5 100644 --- a/genesyscloud/outbound_campaignrule/data_source_genesyscloud_outbound_campaignrule.go +++ b/genesyscloud/outbound_campaignrule/data_source_genesyscloud_outbound_campaignrule.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceOutboundCampaignruleRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { diff --git a/genesyscloud/outbound_campaignrule/genesyscloud_outbound_campaignrule_proxy.go b/genesyscloud/outbound_campaignrule/genesyscloud_outbound_campaignrule_proxy.go index 0af2b5ba4..9d5fce2b3 100644 --- a/genesyscloud/outbound_campaignrule/genesyscloud_outbound_campaignrule_proxy.go +++ b/genesyscloud/outbound_campaignrule/genesyscloud_outbound_campaignrule_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule.go b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule.go index f94ae8fe3..b94076b68 100644 --- a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule.go +++ b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllAuthCampaignRules(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_test.go b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_test.go index 2a1726d2f..2e4353e1e 100644 --- a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_test.go +++ b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundCampaignRuleBasic(t *testing.T) { diff --git a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_unit_test.go b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_unit_test.go index aa5a5196c..314548cf4 100644 --- a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_unit_test.go +++ b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_unit_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" ) diff --git a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_utils.go b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_utils.go index 0d3240299..152bef57b 100644 --- a/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_utils.go +++ b/genesyscloud/outbound_campaignrule/resource_genesyscloud_outbound_campaignrule_utils.go @@ -5,7 +5,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getCampaignruleFromResourceData(d *schema.ResourceData) platformclientv2.Campaignrule { diff --git a/genesyscloud/outbound_contact_list/data_source_genesyscloud_outbound_contactlist.go b/genesyscloud/outbound_contact_list/data_source_genesyscloud_outbound_contactlist.go index 3c2f58501..b3fb96131 100644 --- a/genesyscloud/outbound_contact_list/data_source_genesyscloud_outbound_contactlist.go +++ b/genesyscloud/outbound_contact_list/data_source_genesyscloud_outbound_contactlist.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func DataSourceOutboundContactList() *schema.Resource { diff --git a/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist.go b/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist.go index 144afc54a..3e0b05fdf 100644 --- a/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist.go +++ b/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist_test.go b/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist_test.go index fd80cce10..a07bfdedf 100644 --- a/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist_test.go +++ b/genesyscloud/outbound_contact_list/resource_genesyscloud_outbound_contactlist_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundContactListBasic(t *testing.T) { diff --git a/genesyscloud/outbound_contact_list_contact/genesyscloud_outbound_contact_list_contact_proxy.go b/genesyscloud/outbound_contact_list_contact/genesyscloud_outbound_contact_list_contact_proxy.go index 021e5b804..805bdb53b 100644 --- a/genesyscloud/outbound_contact_list_contact/genesyscloud_outbound_contact_list_contact_proxy.go +++ b/genesyscloud/outbound_contact_list_contact/genesyscloud_outbound_contact_list_contact_proxy.go @@ -2,8 +2,9 @@ package outbound_contact_list_contact import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *contactProxy diff --git a/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact.go b/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact.go index d8e4cdab6..5aa60af40 100644 --- a/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact.go +++ b/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact.go @@ -3,10 +3,6 @@ package outbound_contact_list_contact import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -15,6 +11,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) func getAllContacts(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact_utils.go b/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact_utils.go index 797624746..e7bf542f0 100644 --- a/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact_utils.go +++ b/genesyscloud/outbound_contact_list_contact/resource_genesyscloud_outbound_contact_list_contact_utils.go @@ -2,11 +2,12 @@ package outbound_contact_list_contact import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "strings" utillists "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // buildWritableContactFromResourceData used to build the request body for contact creation diff --git a/genesyscloud/outbound_contactlistfilter/genesyscloud_outbound_contactlistfilter_proxy.go b/genesyscloud/outbound_contactlistfilter/genesyscloud_outbound_contactlistfilter_proxy.go index b1e9651bb..f31cd1302 100644 --- a/genesyscloud/outbound_contactlistfilter/genesyscloud_outbound_contactlistfilter_proxy.go +++ b/genesyscloud/outbound_contactlistfilter/genesyscloud_outbound_contactlistfilter_proxy.go @@ -3,8 +3,9 @@ package outbound_contactlistfilter import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter.go b/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter.go index 135ed9a44..ec48254e9 100644 --- a/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter.go +++ b/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter.go @@ -3,10 +3,6 @@ package outbound_contactlistfilter import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -15,6 +11,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_test.go b/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_test.go index 385842ec2..2b11c3dae 100644 --- a/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_test.go +++ b/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundContactListFilter(t *testing.T) { diff --git a/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_utils.go b/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_utils.go index ae8aa6042..c76d07fdc 100644 --- a/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_utils.go +++ b/genesyscloud/outbound_contactlistfilter/resource_genesyscloud_outbound_contactlistfilter_utils.go @@ -2,11 +2,12 @@ package outbound_contactlistfilter import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "strings" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getContactlistfilterFromResourceData(d *schema.ResourceData) platformclientv2.Contactlistfilter { diff --git a/genesyscloud/outbound_dnclist/genesyscloud_outbound_dnclist_proxy.go b/genesyscloud/outbound_dnclist/genesyscloud_outbound_dnclist_proxy.go index dc051f755..1e2833edc 100644 --- a/genesyscloud/outbound_dnclist/genesyscloud_outbound_dnclist_proxy.go +++ b/genesyscloud/outbound_dnclist/genesyscloud_outbound_dnclist_proxy.go @@ -3,10 +3,11 @@ package outbound_dnclist import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/util" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *outboundDnclistProxy diff --git a/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist.go b/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist.go index 5a98e1aa7..d77595ba2 100644 --- a/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist.go +++ b/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllOutboundDncLists(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist_test.go b/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist_test.go index 1eed72464..5b24ce8af 100644 --- a/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist_test.go +++ b/genesyscloud/outbound_dnclist/resource_genesyscloud_outbound_dnclist_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const NullValue = "null" diff --git a/genesyscloud/outbound_filespecificationtemplate/genesyscloud_outbound_filespecificationtemplate_proxy.go b/genesyscloud/outbound_filespecificationtemplate/genesyscloud_outbound_filespecificationtemplate_proxy.go index 189cc266b..31a27000f 100644 --- a/genesyscloud/outbound_filespecificationtemplate/genesyscloud_outbound_filespecificationtemplate_proxy.go +++ b/genesyscloud/outbound_filespecificationtemplate/genesyscloud_outbound_filespecificationtemplate_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate.go b/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate.go index 8aaed672a..01905de0f 100644 --- a/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate.go +++ b/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllFileSpecificationTemplates(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_test.go b/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_test.go index 7e272fa62..36765840d 100644 --- a/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_test.go +++ b/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundFileSpecificationTemplate(t *testing.T) { diff --git a/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_utils.go b/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_utils.go index f765fa485..db00f47d2 100644 --- a/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_utils.go +++ b/genesyscloud/outbound_filespecificationtemplate/resource_genesyscloud_outbound_filespecificationtemplate_utils.go @@ -1,9 +1,10 @@ package outbound_filespecificationtemplate import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getFilespecificationtemplateFromResourceData(d *schema.ResourceData) platformclientv2.Filespecificationtemplate { diff --git a/genesyscloud/outbound_ruleset/genesyscloud_outbound_ruleset_proxy.go b/genesyscloud/outbound_ruleset/genesyscloud_outbound_ruleset_proxy.go index 5e12b64ee..303e62e84 100644 --- a/genesyscloud/outbound_ruleset/genesyscloud_outbound_ruleset_proxy.go +++ b/genesyscloud/outbound_ruleset/genesyscloud_outbound_ruleset_proxy.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset.go b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset.go index 37cfa4574..932a5cda7 100644 --- a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset.go +++ b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_test.go b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_test.go index d25b21570..36f0b7f28 100644 --- a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_test.go +++ b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" obContactList "terraform-provider-genesyscloud/genesyscloud/outbound_contact_list" ) diff --git a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_unit_test.go b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_unit_test.go index d39433a83..9013a7365 100644 --- a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_unit_test.go +++ b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_unit_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestUnitDoesRuleConditionsRefDeletedSkill(t *testing.T) { diff --git a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_utils.go b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_utils.go index 6266b7a65..fd89ccf42 100644 --- a/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_utils.go +++ b/genesyscloud/outbound_ruleset/resource_genesyscloud_outbound_ruleset_utils.go @@ -9,7 +9,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_init_test.go b/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_init_test.go index 35029a3e7..c9d70d283 100644 --- a/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_init_test.go +++ b/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_init_test.go @@ -12,7 +12,7 @@ import ( edgeSite "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site" "testing" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_proxy.go b/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_proxy.go index 85532bf50..d3fec81b8 100644 --- a/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_proxy.go +++ b/genesyscloud/outbound_sequence/genesyscloud_outbound_sequence_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence.go b/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence.go index 5bb9e88d7..375c4cfcc 100644 --- a/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence.go +++ b/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_test.go b/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_test.go index 3740a0da7..1ed0faccd 100644 --- a/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_test.go +++ b/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceOutboundSequence(t *testing.T) { diff --git a/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_utils.go b/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_utils.go index 3040db3dc..e0118f77f 100644 --- a/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_utils.go +++ b/genesyscloud/outbound_sequence/resource_genesyscloud_outbound_sequence_utils.go @@ -6,7 +6,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_settings/genesyscloud_outbound_settings_proxy.go b/genesyscloud/outbound_settings/genesyscloud_outbound_settings_proxy.go index 1c30b0a12..e3f9843ea 100644 --- a/genesyscloud/outbound_settings/genesyscloud_outbound_settings_proxy.go +++ b/genesyscloud/outbound_settings/genesyscloud_outbound_settings_proxy.go @@ -3,7 +3,8 @@ package outbound_settings import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings.go b/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings.go index 0febb5174..1a62d1dd3 100644 --- a/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings.go +++ b/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings.go @@ -3,10 +3,6 @@ package outbound_settings import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -15,6 +11,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings_utils.go b/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings_utils.go index 06c3989a6..65af76bfe 100644 --- a/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings_utils.go +++ b/genesyscloud/outbound_settings/resource_genesyscloud_outbound_settings_utils.go @@ -1,11 +1,12 @@ package outbound_settings import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/tfexporter_state" "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildOutboundSettingsAutomaticTimeZoneMapping(d *schema.ResourceData) *platformclientv2.Automatictimezonemappingsettings { diff --git a/genesyscloud/outbound_wrapupcode_mappings/genesyscloud_wrapupcode_mappings_proxy.go b/genesyscloud/outbound_wrapupcode_mappings/genesyscloud_wrapupcode_mappings_proxy.go index 16e688455..c706d4d96 100644 --- a/genesyscloud/outbound_wrapupcode_mappings/genesyscloud_wrapupcode_mappings_proxy.go +++ b/genesyscloud/outbound_wrapupcode_mappings/genesyscloud_wrapupcode_mappings_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *outboundWrapupCodeMappingsProxy diff --git a/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcode_mappings_utils.go b/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcode_mappings_utils.go index 1785d9808..8303ab14b 100644 --- a/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcode_mappings_utils.go +++ b/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcode_mappings_utils.go @@ -4,7 +4,7 @@ import ( lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // flattenOutboundWrapupCodeMappings maps a Genesys Cloud Wrapupcodemapping to a schema.Set diff --git a/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcodemappings.go b/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcodemappings.go index cccca5eb1..bab81ed6e 100644 --- a/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcodemappings.go +++ b/genesyscloud/outbound_wrapupcode_mappings/resource_genesyscloud_outbound_wrapupcodemappings.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // getOutboundWrapupCodeMappings is used by the exporter to return all wrapupcode mappings diff --git a/genesyscloud/process_automation_trigger/data_source_genesyscloud_processautomation_trigger.go b/genesyscloud/process_automation_trigger/data_source_genesyscloud_processautomation_trigger.go index 0a8ee565b..e321312d8 100644 --- a/genesyscloud/process_automation_trigger/data_source_genesyscloud_processautomation_trigger.go +++ b/genesyscloud/process_automation_trigger/data_source_genesyscloud_processautomation_trigger.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type ProcessAutomationTriggers struct { diff --git a/genesyscloud/process_automation_trigger/process_automation_triggers_proxy.go b/genesyscloud/process_automation_trigger/process_automation_triggers_proxy.go index 3f6b07371..a2eb9daa3 100644 --- a/genesyscloud/process_automation_trigger/process_automation_triggers_proxy.go +++ b/genesyscloud/process_automation_trigger/process_automation_triggers_proxy.go @@ -11,7 +11,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func postProcessAutomationTrigger(pat *ProcessAutomationTrigger, api *platformclientv2.IntegrationsApi) (*ProcessAutomationTrigger, *platformclientv2.APIResponse, error) { diff --git a/genesyscloud/process_automation_trigger/process_automations_triggers_struct.go b/genesyscloud/process_automation_trigger/process_automations_triggers_struct.go index 539b80dfd..947625597 100644 --- a/genesyscloud/process_automation_trigger/process_automations_triggers_struct.go +++ b/genesyscloud/process_automation_trigger/process_automations_triggers_struct.go @@ -3,7 +3,7 @@ package process_automation_trigger import ( "encoding/json" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type ProcessAutomationTrigger struct { diff --git a/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger.go b/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger.go index b6878f8a7..b301d73a0 100644 --- a/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger.go +++ b/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger.go @@ -2,17 +2,18 @@ package process_automation_trigger import ( "context" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "fmt" "log" "time" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger_test.go b/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger_test.go index e2905376f..363fcab19 100644 --- a/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger_test.go +++ b/genesyscloud/process_automation_trigger/resource_genesyscloud_processautomation_trigger_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceProcessAutomationTrigger(t *testing.T) { diff --git a/genesyscloud/provider/division.go b/genesyscloud/provider/division.go index 9fefad4a8..e13afe209 100644 --- a/genesyscloud/provider/division.go +++ b/genesyscloud/provider/division.go @@ -1,9 +1,10 @@ package provider import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "sync" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type JsonMap map[string]interface{} diff --git a/genesyscloud/provider/provider.go b/genesyscloud/provider/provider.go index 346a29ffb..52f3704ee 100644 --- a/genesyscloud/provider/provider.go +++ b/genesyscloud/provider/provider.go @@ -3,7 +3,6 @@ package provider import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "log" "net/http" "os" @@ -12,10 +11,12 @@ import ( "strings" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func init() { diff --git a/genesyscloud/provider/sdk_client_pool.go b/genesyscloud/provider/sdk_client_pool.go index 0123f541c..944661c5c 100644 --- a/genesyscloud/provider/sdk_client_pool.go +++ b/genesyscloud/provider/sdk_client_pool.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // SDKClientPool holds a Pool of client configs for the Genesys Cloud SDK. One should be diff --git a/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_init_test.go b/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_init_test.go index 35700f2f1..21bafbcb0 100644 --- a/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_init_test.go +++ b/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_init_test.go @@ -14,7 +14,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_proxy.go b/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_proxy.go index 345294b53..43a61e614 100644 --- a/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_proxy.go +++ b/genesyscloud/recording_media_retention_policy/genesyscloud_recording_media_retention_policy_proxy.go @@ -7,7 +7,7 @@ import ( "net/http" "net/url" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy.go b/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy.go index fc0777536..b89e8e7ce 100644 --- a/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy.go +++ b/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_test.go b/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_test.go index 0c1b4c0a8..9b7bcc10a 100644 --- a/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_test.go +++ b/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_test.go @@ -22,7 +22,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_utils.go b/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_utils.go index 62037798c..c3f69f1e3 100644 --- a/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_utils.go +++ b/genesyscloud/recording_media_retention_policy/resource_genesyscloud_recording_media_retention_policy_utils.go @@ -10,7 +10,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/resource_cache/datasource_cache.go b/genesyscloud/resource_cache/datasource_cache.go index 20559e103..231874c09 100644 --- a/genesyscloud/resource_cache/datasource_cache.go +++ b/genesyscloud/resource_cache/datasource_cache.go @@ -8,7 +8,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // Cache for Data Sources diff --git a/genesyscloud/resource_exporter/resource_exporter.go b/genesyscloud/resource_exporter/resource_exporter.go index 81d28fbd1..33c97cf31 100644 --- a/genesyscloud/resource_exporter/resource_exporter.go +++ b/genesyscloud/resource_exporter/resource_exporter.go @@ -2,14 +2,15 @@ package resource_exporter import ( "context" - "github.com/hashicorp/go-cty/cty" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "regexp" "strings" "sync" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" diff --git a/genesyscloud/resource_exporter/resource_exporter_custom.go b/genesyscloud/resource_exporter/resource_exporter_custom.go index 70c976f12..3543dd4b4 100644 --- a/genesyscloud/resource_exporter/resource_exporter_custom.go +++ b/genesyscloud/resource_exporter/resource_exporter_custom.go @@ -3,11 +3,12 @@ package resource_exporter import ( "encoding/json" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "regexp" "strings" "terraform-provider-genesyscloud/genesyscloud/util/constants" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/resource_genesyscloud_architect_schedules.go b/genesyscloud/resource_genesyscloud_architect_schedules.go index e8feb700c..038f0db78 100644 --- a/genesyscloud/resource_genesyscloud_architect_schedules.go +++ b/genesyscloud/resource_genesyscloud_architect_schedules.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/leekchan/timeutil" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllArchitectSchedules(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/resource_genesyscloud_auth_division.go b/genesyscloud/resource_genesyscloud_auth_division.go index 557ba05d2..59374191b 100644 --- a/genesyscloud/resource_genesyscloud_auth_division.go +++ b/genesyscloud/resource_genesyscloud_auth_division.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllAuthDivisions(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/resource_genesyscloud_auth_division_test.go b/genesyscloud/resource_genesyscloud_auth_division_test.go index cebf83c42..fab7c0fb0 100644 --- a/genesyscloud/resource_genesyscloud_auth_division_test.go +++ b/genesyscloud/resource_genesyscloud_auth_division_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceAuthDivisionBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_idp_generic.go b/genesyscloud/resource_genesyscloud_idp_generic.go deleted file mode 100644 index 8db0dad77..000000000 --- a/genesyscloud/resource_genesyscloud_idp_generic.go +++ /dev/null @@ -1,277 +0,0 @@ -package genesyscloud - -import ( - "context" - "fmt" - "log" - "terraform-provider-genesyscloud/genesyscloud/provider" - "terraform-provider-genesyscloud/genesyscloud/util" - "terraform-provider-genesyscloud/genesyscloud/util/constants" - "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - - "terraform-provider-genesyscloud/genesyscloud/consistency_checker" - - resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" - lists "terraform-provider-genesyscloud/genesyscloud/util/lists" - - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" -) - -func getAllIdpGeneric(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) - resources := make(resourceExporter.ResourceIDMetaMap) - - _, resp, getErr := idpAPI.GetIdentityprovidersGeneric() - if getErr != nil { - if util.IsStatus404(resp) { - // Don't export if config doesn't exist - return resources, nil - } - return nil, util.BuildAPIDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("Failed to get IDP Generic error: %s", getErr), resp) - } - - resources["0"] = &resourceExporter.ResourceMeta{Name: "generic"} - return resources, nil -} - -func IdpGenericExporter() *resourceExporter.ResourceExporter { - return &resourceExporter.ResourceExporter{ - GetResourcesFunc: provider.GetAllWithPooledClient(getAllIdpGeneric), - RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references - } -} - -func ResourceIdpGeneric() *schema.Resource { - return &schema.Resource{ - Description: "Genesys Cloud Single Sign-on Generic Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-a-generic-single-sign-on-provider/", - - CreateContext: provider.CreateWithPooledClient(createIdpGeneric), - ReadContext: provider.ReadWithPooledClient(readIdpGeneric), - UpdateContext: provider.UpdateWithPooledClient(updateIdpGeneric), - DeleteContext: provider.DeleteWithPooledClient(deleteIdpGeneric), - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - SchemaVersion: 1, - Timeouts: &schema.ResourceTimeout{ - Update: schema.DefaultTimeout(8 * time.Minute), - Read: schema.DefaultTimeout(8 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "name": { - Description: "Name of the provider.", - Type: schema.TypeString, - Required: true, - }, - "certificates": { - Description: "PEM or DER encoded public X.509 certificates for SAML signature validation.", - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "issuer_uri": { - Description: "Issuer URI provided by the provider.", - Type: schema.TypeString, - Required: true, - }, - "target_uri": { - Description: "Target URI provided by the provider.", - Type: schema.TypeString, - Optional: true, - }, - "relying_party_identifier": { - Description: "String used to identify Genesys Cloud to the identity provider.", - Type: schema.TypeString, - Optional: true, - }, - "disabled": { - Description: "True if Generic provider is disabled.", - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "logo_image_data": { - Description: "Base64 encoded SVG image.", - Type: schema.TypeString, - Optional: true, - }, - "endpoint_compression": { - Description: "True if the Genesys Cloud authentication request should be compressed.", - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - "name_identifier_format": { - Description: "SAML name identifier format. (urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress | urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName | urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName | urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos | urn:oasis:names:tc:SAML:2.0:nameid-format:entity | urn:oasis:names:tc:SAML:2.0:nameid-format:persistent | urn:oasis:names:tc:SAML:2.0:nameid-format:transient)", - Type: schema.TypeString, - Optional: true, - Default: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - ValidateFunc: validation.StringInSlice([]string{ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", - "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", - "urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos", - "urn:oasis:names:tc:SAML:2.0:nameid-format:entity", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - }, false), - }, - }, - } -} - -func createIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - log.Printf("Creating IDP Generic") - d.SetId("generic") - return updateIdpGeneric(ctx, d, meta) -} - -func readIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpGeneric(), constants.DefaultConsistencyChecks, "genesyscloud_idp_generic") - - log.Printf("Reading IDP Generic") - - return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { - generic, resp, getErr := idpAPI.GetIdentityprovidersGeneric() - if getErr != nil { - if util.IsStatus404(resp) { - createIdpGeneric(ctx, d, meta) - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("Failed to read IDP Generic: %s", getErr), resp)) - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("Failed to read IDP Generic: %s", getErr), resp)) - } - - if generic.Name != nil { - d.Set("name", *generic.Name) - } else { - d.Set("name", nil) - } - - if generic.Certificate != nil { - d.Set("certificates", lists.StringListToInterfaceList([]string{*generic.Certificate})) - } else if generic.Certificates != nil { - d.Set("certificates", lists.StringListToInterfaceList(*generic.Certificates)) - } else { - d.Set("certificates", nil) - } - - if generic.IssuerURI != nil { - d.Set("issuer_uri", *generic.IssuerURI) - } else { - d.Set("issuer_uri", nil) - } - - if generic.SsoTargetURI != nil { - d.Set("target_uri", *generic.SsoTargetURI) - } else { - d.Set("target_uri", nil) - } - - if generic.RelyingPartyIdentifier != nil { - d.Set("relying_party_identifier", *generic.RelyingPartyIdentifier) - } else { - d.Set("relying_party_identifier", nil) - } - - if generic.Disabled != nil { - d.Set("disabled", *generic.Disabled) - } else { - d.Set("disabled", nil) - } - - if generic.LogoImageData != nil { - d.Set("logo_image_data", *generic.LogoImageData) - } else { - d.Set("logo_image_data", nil) - } - - if generic.EndpointCompression != nil { - d.Set("endpoint_compression", *generic.EndpointCompression) - } else { - d.Set("endpoint_compression", nil) - } - - if generic.NameIdentifierFormat != nil { - d.Set("name_identifier_format", *generic.NameIdentifierFormat) - } else { - d.Set("name_identifier_format", nil) - } - - log.Printf("Read IDP Generic") - return cc.CheckState(d) - }) -} - -func updateIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - name := d.Get("name").(string) - issuerUri := d.Get("issuer_uri").(string) - targetUri := d.Get("target_uri").(string) - relyingPartyID := d.Get("relying_party_identifier").(string) - disabled := d.Get("disabled").(bool) - logoImageData := d.Get("logo_image_data").(string) - endpointCompression := d.Get("endpoint_compression").(bool) - nameIdentifierFormat := d.Get("name_identifier_format").(string) - - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Updating IDP Generic") - update := platformclientv2.Genericsaml{ - Name: &name, - IssuerURI: &issuerUri, - SsoTargetURI: &targetUri, - RelyingPartyIdentifier: &relyingPartyID, - Disabled: &disabled, - LogoImageData: &logoImageData, - EndpointCompression: &endpointCompression, - NameIdentifierFormat: &nameIdentifierFormat, - } - - certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") - if certificates != nil { - if len(*certificates) == 1 { - update.Certificate = &(*certificates)[0] - } - update.Certificates = certificates - } - - _, resp, err := idpAPI.PutIdentityprovidersGeneric(update) - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("Failed to update IDP Generic %s error: %s", d.Id(), err), resp) - } - - log.Printf("Updated IDP Generic") - return readIdpGeneric(ctx, d, meta) -} - -func deleteIdpGeneric(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Deleting IDP Generic") - _, resp, err := idpAPI.DeleteIdentityprovidersGeneric() - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("Failed to delete IDP Generic %s error: %s", d.Id(), err), resp) - } - - return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { - _, resp, err := idpAPI.GetIdentityprovidersGeneric() - if err != nil { - if util.IsStatus404(resp) { - // IDP Generic deleted - log.Printf("Deleted IDP Generic") - return nil - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("Error deleting IDP Generic: %s", err), resp)) - } - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_generic", fmt.Sprintf("IDP Generic still exists"), resp)) - }) -} diff --git a/genesyscloud/resource_genesyscloud_idp_gsuite.go b/genesyscloud/resource_genesyscloud_idp_gsuite.go deleted file mode 100644 index 75a412cdc..000000000 --- a/genesyscloud/resource_genesyscloud_idp_gsuite.go +++ /dev/null @@ -1,212 +0,0 @@ -package genesyscloud - -import ( - "context" - "fmt" - "log" - "terraform-provider-genesyscloud/genesyscloud/provider" - "terraform-provider-genesyscloud/genesyscloud/util" - "terraform-provider-genesyscloud/genesyscloud/util/constants" - "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - - "terraform-provider-genesyscloud/genesyscloud/consistency_checker" - - resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" - lists "terraform-provider-genesyscloud/genesyscloud/util/lists" - - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" -) - -func getAllIdpGsuite(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) - resources := make(resourceExporter.ResourceIDMetaMap) - - _, resp, getErr := idpAPI.GetIdentityprovidersGsuite() - if getErr != nil { - if util.IsStatus404(resp) { - // Don't export if config doesn't exist - return resources, nil - } - return nil, util.BuildAPIDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("Failed to get IDP GSuite error: %s", getErr), resp) - } - - resources["0"] = &resourceExporter.ResourceMeta{Name: "gsuite"} - return resources, nil -} - -func IdpGsuiteExporter() *resourceExporter.ResourceExporter { - return &resourceExporter.ResourceExporter{ - GetResourcesFunc: provider.GetAllWithPooledClient(getAllIdpGsuite), - RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references - } -} - -func ResourceIdpGsuite() *schema.Resource { - return &schema.Resource{ - Description: "Genesys Cloud Single Sign-on GSuite Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-google-g-suite-single-sign-provider/", - - CreateContext: provider.CreateWithPooledClient(createIdpGsuite), - ReadContext: provider.ReadWithPooledClient(readIdpGsuite), - UpdateContext: provider.UpdateWithPooledClient(updateIdpGsuite), - DeleteContext: provider.DeleteWithPooledClient(deleteIdpGsuite), - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - SchemaVersion: 1, - Timeouts: &schema.ResourceTimeout{ - Update: schema.DefaultTimeout(8 * time.Minute), - Read: schema.DefaultTimeout(8 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "certificates": { - Description: "PEM or DER encoded public X.509 certificates for SAML signature validation.", - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "issuer_uri": { - Description: "Issuer URI provided by GSuite.", - Type: schema.TypeString, - Required: true, - }, - "target_uri": { - Description: "Target URI provided by GSuite.", - Type: schema.TypeString, - Optional: true, - }, - "relying_party_identifier": { - Description: "String used to identify Genesys Cloud to GSuite.", - Type: schema.TypeString, - Optional: true, - }, - "disabled": { - Description: "True if GSuite is disabled.", - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func createIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - log.Printf("Creating IDP GSuite") - d.SetId("gsuite") - return updateIdpGsuite(ctx, d, meta) -} - -func readIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpGsuite(), constants.DefaultConsistencyChecks, "genesyscloud_idp_gsuite") - - log.Printf("Reading IDP GSuite") - - return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { - gsuite, resp, getErr := idpAPI.GetIdentityprovidersGsuite() - if getErr != nil { - if util.IsStatus404(resp) { - createIdpGsuite(ctx, d, meta) - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("Failed to read IDP GSuite: %s", getErr), resp)) - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("Failed to read IDP GSuite: %s", getErr), resp)) - } - - if gsuite.Certificate != nil { - d.Set("certificates", lists.StringListToInterfaceList([]string{*gsuite.Certificate})) - } else if gsuite.Certificates != nil { - d.Set("certificates", lists.StringListToInterfaceList(*gsuite.Certificates)) - } else { - d.Set("certificates", nil) - } - - if gsuite.IssuerURI != nil { - d.Set("issuer_uri", *gsuite.IssuerURI) - } else { - d.Set("issuer_uri", nil) - } - - if gsuite.SsoTargetURI != nil { - d.Set("target_uri", *gsuite.SsoTargetURI) - } else { - d.Set("target_uri", nil) - } - - if gsuite.RelyingPartyIdentifier != nil { - d.Set("relying_party_identifier", *gsuite.RelyingPartyIdentifier) - } else { - d.Set("relying_party_identifier", nil) - } - - if gsuite.Disabled != nil { - d.Set("disabled", *gsuite.Disabled) - } else { - d.Set("disabled", nil) - } - - log.Printf("Read IDP GSuite") - return cc.CheckState(d) - }) -} - -func updateIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - issuerUri := d.Get("issuer_uri").(string) - targetUri := d.Get("target_uri").(string) - relyingPartyID := d.Get("relying_party_identifier").(string) - disabled := d.Get("disabled").(bool) - - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Updating IDP GSuite") - update := platformclientv2.Gsuite{ - IssuerURI: &issuerUri, - SsoTargetURI: &targetUri, - RelyingPartyIdentifier: &relyingPartyID, - Disabled: &disabled, - } - - certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") - if certificates != nil { - if len(*certificates) == 1 { - update.Certificate = &(*certificates)[0] - } - update.Certificates = certificates - } - - _, resp, err := idpAPI.PutIdentityprovidersGsuite(update) - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("Failed to update IDP GSuite %s error: %s", d.Id(), err), resp) - } - - log.Printf("Updated IDP GSuite") - return readIdpGsuite(ctx, d, meta) -} - -func deleteIdpGsuite(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Deleting IDP GSuite") - _, resp, err := idpAPI.DeleteIdentityprovidersGsuite() - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("Failed to delete IDP GSuite %s error: %s", d.Id(), err), resp) - } - - return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { - _, resp, err := idpAPI.GetIdentityprovidersGsuite() - if err != nil { - if util.IsStatus404(resp) { - // IDP GSuite deleted - log.Printf("Deleted IDP GSuite") - return nil - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("Error deleting IDP GSuite: %s", err), resp)) - } - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_gsuite", fmt.Sprintf("IDP GSuite still exists"), resp)) - }) -} diff --git a/genesyscloud/resource_genesyscloud_idp_onelogin.go b/genesyscloud/resource_genesyscloud_idp_onelogin.go deleted file mode 100644 index 8191969da..000000000 --- a/genesyscloud/resource_genesyscloud_idp_onelogin.go +++ /dev/null @@ -1,199 +0,0 @@ -package genesyscloud - -import ( - "context" - "fmt" - "log" - "terraform-provider-genesyscloud/genesyscloud/provider" - "terraform-provider-genesyscloud/genesyscloud/util" - "terraform-provider-genesyscloud/genesyscloud/util/constants" - "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - - "terraform-provider-genesyscloud/genesyscloud/consistency_checker" - - resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" - lists "terraform-provider-genesyscloud/genesyscloud/util/lists" - - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" -) - -func getAllIdpOnelogin(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) - resources := make(resourceExporter.ResourceIDMetaMap) - - _, resp, getErr := idpAPI.GetIdentityprovidersOnelogin() - if getErr != nil { - if util.IsStatus404(resp) { - // Don't export if config doesn't exist - return resources, nil - } - return nil, util.BuildAPIDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("Failed to get IDP Onelogin error: %s", getErr), resp) - } - - resources["0"] = &resourceExporter.ResourceMeta{Name: "onelogin"} - return resources, nil -} - -func IdpOneloginExporter() *resourceExporter.ResourceExporter { - return &resourceExporter.ResourceExporter{ - GetResourcesFunc: provider.GetAllWithPooledClient(getAllIdpOnelogin), - RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references - } -} - -func ResourceIdpOnelogin() *schema.Resource { - return &schema.Resource{ - Description: "Genesys Cloud Single Sign-on OneLogin Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-onelogin-as-single-sign-on-provider/", - - CreateContext: provider.CreateWithPooledClient(createIdpOnelogin), - ReadContext: provider.ReadWithPooledClient(readIdpOnelogin), - UpdateContext: provider.UpdateWithPooledClient(updateIdpOnelogin), - DeleteContext: provider.DeleteWithPooledClient(deleteIdpOnelogin), - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - SchemaVersion: 1, - Timeouts: &schema.ResourceTimeout{ - Update: schema.DefaultTimeout(8 * time.Minute), - Read: schema.DefaultTimeout(8 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "certificates": { - Description: "PEM or DER encoded public X.509 certificates for SAML signature validation.", - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "issuer_uri": { - Description: "Issuer URI provided by OneLogin.", - Type: schema.TypeString, - Required: true, - }, - "target_uri": { - Description: "Target URI provided by OneLogin.", - Type: schema.TypeString, - Optional: true, - }, - "disabled": { - Description: "True if OneLogin is disabled.", - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func createIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - log.Printf("Creating IDP Onelogin") - d.SetId("onelogin") - return updateIdpOnelogin(ctx, d, meta) -} - -func readIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpOnelogin(), constants.DefaultConsistencyChecks, "genesyscloud_idp_onelogin") - - log.Printf("Reading IDP Onelogin") - - return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { - onelogin, resp, getErr := idpAPI.GetIdentityprovidersOnelogin() - if getErr != nil { - if util.IsStatus404(resp) { - createIdpOnelogin(ctx, d, meta) - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("Failed to read IDP Onelogin: %s", getErr), resp)) - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("Failed to read IDP Onelogin: %s", getErr), resp)) - } - - if onelogin.Certificate != nil { - d.Set("certificates", lists.StringListToInterfaceList([]string{*onelogin.Certificate})) - } else if onelogin.Certificates != nil { - d.Set("certificates", lists.StringListToInterfaceList(*onelogin.Certificates)) - } else { - d.Set("certificates", nil) - } - - if onelogin.IssuerURI != nil { - d.Set("issuer_uri", *onelogin.IssuerURI) - } else { - d.Set("issuer_uri", nil) - } - - if onelogin.SsoTargetURI != nil { - d.Set("target_uri", *onelogin.SsoTargetURI) - } else { - d.Set("target_uri", nil) - } - - if onelogin.Disabled != nil { - d.Set("disabled", *onelogin.Disabled) - } else { - d.Set("disabled", nil) - } - - log.Printf("Read IDP Onelogin") - return cc.CheckState(d) - }) -} - -func updateIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - issuerUri := d.Get("issuer_uri").(string) - targetUri := d.Get("target_uri").(string) - disabled := d.Get("disabled").(bool) - - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Updating IDP Onelogin") - update := platformclientv2.Onelogin{ - IssuerURI: &issuerUri, - SsoTargetURI: &targetUri, - Disabled: &disabled, - } - - certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") - if certificates != nil { - if len(*certificates) == 1 { - update.Certificate = &(*certificates)[0] - } - update.Certificates = certificates - } - - _, resp, err := idpAPI.PutIdentityprovidersOnelogin(update) - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("Failed to update IDP Onelogin %s error: %s", d.Id(), err), resp) - } - - log.Printf("Updated IDP Onelogin") - return readIdpOnelogin(ctx, d, meta) -} - -func deleteIdpOnelogin(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Deleting IDP Onelogin") - _, resp, err := idpAPI.DeleteIdentityprovidersOnelogin() - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("Failed to updadeletete IDP Onelogin %s error: %s", d.Id(), err), resp) - } - - return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { - _, resp, err := idpAPI.GetIdentityprovidersOnelogin() - if err != nil { - if util.IsStatus404(resp) { - // IDP Onelogin deleted - log.Printf("Deleted IDP Onelogin") - return nil - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("Error deleting IDP Onelogin: %s", err), resp)) - } - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_onelogin", fmt.Sprintf("IDP Onelogin still exists"), resp)) - }) -} diff --git a/genesyscloud/resource_genesyscloud_idp_ping.go b/genesyscloud/resource_genesyscloud_idp_ping.go deleted file mode 100644 index 5be98daf0..000000000 --- a/genesyscloud/resource_genesyscloud_idp_ping.go +++ /dev/null @@ -1,212 +0,0 @@ -package genesyscloud - -import ( - "context" - "fmt" - "log" - "terraform-provider-genesyscloud/genesyscloud/provider" - "terraform-provider-genesyscloud/genesyscloud/util" - "terraform-provider-genesyscloud/genesyscloud/util/constants" - "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - - "terraform-provider-genesyscloud/genesyscloud/consistency_checker" - - resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" - lists "terraform-provider-genesyscloud/genesyscloud/util/lists" - - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" -) - -func getAllIdpPing(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(clientConfig) - resources := make(resourceExporter.ResourceIDMetaMap) - - _, resp, getErr := idpAPI.GetIdentityprovidersPing() - if getErr != nil { - if util.IsStatus404(resp) { - // Don't export if config doesn't exist - return resources, nil - } - return nil, util.BuildAPIDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("Failed to get IDP Ping error: %s", getErr), resp) - } - - resources["0"] = &resourceExporter.ResourceMeta{Name: "ping"} - return resources, nil -} - -func IdpPingExporter() *resourceExporter.ResourceExporter { - return &resourceExporter.ResourceExporter{ - GetResourcesFunc: provider.GetAllWithPooledClient(getAllIdpPing), - RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references - } -} - -func ResourceIdpPing() *schema.Resource { - return &schema.Resource{ - Description: "Genesys Cloud Single Sign-on Ping Identity Provider. See this page for detailed configuration instructions: https://help.mypurecloud.com/articles/add-ping-identity-single-sign-provider/", - - CreateContext: provider.CreateWithPooledClient(createIdpPing), - ReadContext: provider.ReadWithPooledClient(readIdpPing), - UpdateContext: provider.UpdateWithPooledClient(updateIdpPing), - DeleteContext: provider.DeleteWithPooledClient(deleteIdpPing), - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - SchemaVersion: 1, - Timeouts: &schema.ResourceTimeout{ - Update: schema.DefaultTimeout(8 * time.Minute), - Read: schema.DefaultTimeout(8 * time.Minute), - }, - Schema: map[string]*schema.Schema{ - "certificates": { - Description: "PEM or DER encoded public X.509 certificates for SAML signature validation.", - Type: schema.TypeList, - Required: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "issuer_uri": { - Description: "Issuer URI provided by Ping.", - Type: schema.TypeString, - Required: true, - }, - "target_uri": { - Description: "Target URI provided by Ping.", - Type: schema.TypeString, - Optional: true, - }, - "relying_party_identifier": { - Description: "String used to identify Genesys Cloud to Ping.", - Type: schema.TypeString, - Optional: true, - }, - "disabled": { - Description: "True if Ping is disabled.", - Type: schema.TypeBool, - Optional: true, - Default: false, - }, - }, - } -} - -func createIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - log.Printf("Creating IDP Ping") - d.SetId("ping") - return updateIdpPing(ctx, d, meta) -} - -func readIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceIdpPing(), constants.DefaultConsistencyChecks, "genesyscloud_idp_ping") - - log.Printf("Reading IDP Ping") - - return util.WithRetriesForReadCustomTimeout(ctx, d.Timeout(schema.TimeoutRead), d, func() *retry.RetryError { - ping, resp, getErr := idpAPI.GetIdentityprovidersPing() - if getErr != nil { - if util.IsStatus404(resp) { - createIdpPing(ctx, d, meta) - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("Failed to read IDP Ping: %s", getErr), resp)) - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("Failed to read IDP Ping: %s", getErr), resp)) - } - - if ping.Certificate != nil { - d.Set("certificates", lists.StringListToInterfaceList([]string{*ping.Certificate})) - } else if ping.Certificates != nil { - d.Set("certificates", lists.StringListToInterfaceList(*ping.Certificates)) - } else { - d.Set("certificates", nil) - } - - if ping.IssuerURI != nil { - d.Set("issuer_uri", *ping.IssuerURI) - } else { - d.Set("issuer_uri", nil) - } - - if ping.SsoTargetURI != nil { - d.Set("target_uri", *ping.SsoTargetURI) - } else { - d.Set("target_uri", nil) - } - - if ping.RelyingPartyIdentifier != nil { - d.Set("relying_party_identifier", *ping.RelyingPartyIdentifier) - } else { - d.Set("relying_party_identifier", nil) - } - - if ping.Disabled != nil { - d.Set("disabled", *ping.Disabled) - } else { - d.Set("disabled", nil) - } - - log.Printf("Read IDP Ping") - return cc.CheckState(d) - }) -} - -func updateIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - issuerUri := d.Get("issuer_uri").(string) - targetUri := d.Get("target_uri").(string) - relyingPartyID := d.Get("relying_party_identifier").(string) - disabled := d.Get("disabled").(bool) - - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Updating IDP Ping") - update := platformclientv2.Pingidentity{ - IssuerURI: &issuerUri, - SsoTargetURI: &targetUri, - RelyingPartyIdentifier: &relyingPartyID, - Disabled: &disabled, - } - - certificates := lists.BuildSdkStringListFromInterfaceArray(d, "certificates") - if certificates != nil { - if len(*certificates) == 1 { - update.Certificate = &(*certificates)[0] - } - update.Certificates = certificates - } - - _, resp, err := idpAPI.PutIdentityprovidersPing(update) - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("Failed to update IDP Ping %s error: %s", d.Id(), err), resp) - } - - log.Printf("Updated IDP Ping") - return readIdpPing(ctx, d, meta) -} - -func deleteIdpPing(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - sdkConfig := meta.(*provider.ProviderMeta).ClientConfig - idpAPI := platformclientv2.NewIdentityProviderApiWithConfig(sdkConfig) - - log.Printf("Deleting IDP Ping") - _, resp, err := idpAPI.DeleteIdentityprovidersPing() - if err != nil { - return util.BuildAPIDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("Failed to delete IDP Ping %s error: %s", d.Id(), err), resp) - } - - return util.WithRetries(ctx, 60*time.Second, func() *retry.RetryError { - _, resp, err := idpAPI.GetIdentityprovidersPing() - if err != nil { - if util.IsStatus404(resp) { - // IDP Ping deleted - log.Printf("Deleted IDP Ping") - return nil - } - return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("Error deleting IDP Ping: %s", err), resp)) - } - return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_idp_ping", fmt.Sprintf("IDP Ping still exists"), resp)) - }) -} diff --git a/genesyscloud/resource_genesyscloud_init.go b/genesyscloud/resource_genesyscloud_init.go index d526a8439..d2a1a248f 100644 --- a/genesyscloud/resource_genesyscloud_init.go +++ b/genesyscloud/resource_genesyscloud_init.go @@ -42,10 +42,6 @@ func registerResources(l registrar.Registrar) { l.RegisterResource("genesyscloud_location", ResourceLocation()) l.RegisterResource("genesyscloud_auth_division", ResourceAuthDivision()) - l.RegisterResource("genesyscloud_idp_generic", ResourceIdpGeneric()) - l.RegisterResource("genesyscloud_idp_gsuite", ResourceIdpGsuite()) - l.RegisterResource("genesyscloud_idp_onelogin", ResourceIdpOnelogin()) - l.RegisterResource("genesyscloud_idp_ping", ResourceIdpPing()) l.RegisterResource("genesyscloud_journey_action_map", ResourceJourneyActionMap()) l.RegisterResource("genesyscloud_journey_action_template", ResourceJourneyActionTemplate()) l.RegisterResource("genesyscloud_journey_outcome", ResourceJourneyOutcome()) @@ -72,10 +68,6 @@ func registerResources(l registrar.Registrar) { func registerExporters(l registrar.Registrar) { l.RegisterExporter("genesyscloud_auth_division", AuthDivisionExporter()) - l.RegisterExporter("genesyscloud_idp_generic", IdpGenericExporter()) - l.RegisterExporter("genesyscloud_idp_gsuite", IdpGsuiteExporter()) - l.RegisterExporter("genesyscloud_idp_onelogin", IdpOneloginExporter()) - l.RegisterExporter("genesyscloud_idp_ping", IdpPingExporter()) l.RegisterExporter("genesyscloud_journey_action_map", JourneyActionMapExporter()) l.RegisterExporter("genesyscloud_journey_action_template", JourneyActionTemplateExporter()) l.RegisterExporter("genesyscloud_journey_outcome", JourneyOutcomeExporter()) diff --git a/genesyscloud/resource_genesyscloud_init_test.go b/genesyscloud/resource_genesyscloud_init_test.go index 79c141fed..c1d69a24d 100644 --- a/genesyscloud/resource_genesyscloud_init_test.go +++ b/genesyscloud/resource_genesyscloud_init_test.go @@ -15,7 +15,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( @@ -41,10 +41,6 @@ func (r *registerTestInstance) registerTestResources() { providerResources["genesyscloud_routing_queue"] = routingQueue.ResourceRoutingQueue() providerResources["genesyscloud_location"] = ResourceLocation() providerResources["genesyscloud_auth_division"] = ResourceAuthDivision() - providerResources["genesyscloud_idp_generic"] = ResourceIdpGeneric() - providerResources["genesyscloud_idp_gsuite"] = ResourceIdpGsuite() - providerResources["genesyscloud_idp_onelogin"] = ResourceIdpOnelogin() - providerResources["genesyscloud_idp_ping"] = ResourceIdpPing() providerResources["genesyscloud_journey_action_map"] = ResourceJourneyActionMap() providerResources["genesyscloud_journey_action_template"] = ResourceJourneyActionTemplate() providerResources["genesyscloud_journey_outcome"] = ResourceJourneyOutcome() diff --git a/genesyscloud/resource_genesyscloud_journey_action_map.go b/genesyscloud/resource_genesyscloud_journey_action_map.go index 7e1c583f0..2b9100ec4 100644 --- a/genesyscloud/resource_genesyscloud_journey_action_map.go +++ b/genesyscloud/resource_genesyscloud_journey_action_map.go @@ -25,7 +25,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( @@ -134,15 +134,16 @@ var ( ValidateFunc: validation.StringInSlice([]string{"containsAll", "containsAny", "notContainsAll", "notContainsAny", "equal", "notEqual", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "startsWith", "endsWith"}, false), }, "stream_type": { - Description: "The stream type for which this condition can be satisfied. Valid values: Web, Custom, Conversation.", + Description: "The stream type for which this condition can be satisfied. Valid values: Web, App.", Type: schema.TypeString, Required: true, - ValidateFunc: validation.StringInSlice([]string{"Web", "Custom", "Conversation"}, false), + ValidateFunc: validation.StringInSlice([]string{"Web", "App" /*,"Custom", "Conversation" */}, false), // Custom and Conversation seem not to be supported by the API despite the documentation (DEVENGSD-607) }, "session_type": { - Description: "The session type for which this condition can be satisfied.", + Description: "The session type for which this condition can be satisfied. Valid values: web, app.", Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{"web", "app"}, false), // custom value seems not to be supported by the API despite the documentation }, "event_name": { Description: "The name of the event for which this condition can be satisfied.", diff --git a/genesyscloud/resource_genesyscloud_journey_action_map_test.go b/genesyscloud/resource_genesyscloud_journey_action_map_test.go index 22fa108ea..69f62eaa6 100644 --- a/genesyscloud/resource_genesyscloud_journey_action_map_test.go +++ b/genesyscloud/resource_genesyscloud_journey_action_map_test.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const resourceName = "genesyscloud_journey_action_map" diff --git a/genesyscloud/resource_genesyscloud_journey_action_template.go b/genesyscloud/resource_genesyscloud_journey_action_template.go index ecd418113..c7b55a10f 100644 --- a/genesyscloud/resource_genesyscloud_journey_action_template.go +++ b/genesyscloud/resource_genesyscloud_journey_action_template.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_journey_action_template_test.go b/genesyscloud/resource_genesyscloud_journey_action_template_test.go index dd0cc9444..4fe521163 100644 --- a/genesyscloud/resource_genesyscloud_journey_action_template_test.go +++ b/genesyscloud/resource_genesyscloud_journey_action_template_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ActionTemplateResourceName = "genesyscloud_journey_action_template" diff --git a/genesyscloud/resource_genesyscloud_journey_outcome.go b/genesyscloud/resource_genesyscloud_journey_outcome.go index 40a1019ff..4e8ffe106 100644 --- a/genesyscloud/resource_genesyscloud_journey_outcome.go +++ b/genesyscloud/resource_genesyscloud_journey_outcome.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_journey_outcome_test.go b/genesyscloud/resource_genesyscloud_journey_outcome_test.go index 5f52a59bd..f89e638ce 100644 --- a/genesyscloud/resource_genesyscloud_journey_outcome_test.go +++ b/genesyscloud/resource_genesyscloud_journey_outcome_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceJourneyOutcome(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_journey_segment.go b/genesyscloud/resource_genesyscloud_journey_segment.go index 453d1191e..e4735692e 100644 --- a/genesyscloud/resource_genesyscloud_journey_segment.go +++ b/genesyscloud/resource_genesyscloud_journey_segment.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( @@ -162,16 +162,16 @@ var ( Required: true, }, "stream_type": { - Description: "The stream type for which this pattern can be matched on.Valid values: Web, Custom, Conversation.", + Description: "The stream type for which this pattern can be matched on. Valid values: Web, App.", Type: schema.TypeString, Required: true, - ValidateFunc: validation.StringInSlice([]string{"Web" /*, "Custom", "Conversation"*/}, false), // Custom and Conversation seem not to be supported by the API despite the documentation + ValidateFunc: validation.StringInSlice([]string{"Web", "App" /*, "Custom", "Conversation"*/}, false), // Custom and Conversation seem not to be supported by the API despite the documentation (DEVENGSD-607) }, "session_type": { - Description: "The session type for which this pattern can be matched on.", + Description: "The session type for which this pattern can be matched on. Valid values: web, app.", Type: schema.TypeString, Required: true, - ValidateFunc: validation.StringInSlice([]string{"web"}, false), // custom value seems not to be supported by the API despite the documentation + ValidateFunc: validation.StringInSlice([]string{"web", "app"}, false), // custom value seems not to be supported by the API despite the documentation }, "event_name": { Description: "The name of the event for which this pattern can be matched on.", diff --git a/genesyscloud/resource_genesyscloud_journey_segment_test.go b/genesyscloud/resource_genesyscloud_journey_segment_test.go index 7e0946b52..36dce3d5d 100644 --- a/genesyscloud/resource_genesyscloud_journey_segment_test.go +++ b/genesyscloud/resource_genesyscloud_journey_segment_test.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceJourneySegment(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_category.go b/genesyscloud/resource_genesyscloud_knowledge_category.go index dc097759d..6bdd76f52 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_category.go +++ b/genesyscloud/resource_genesyscloud_knowledge_category.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_knowledge_category_test.go b/genesyscloud/resource_genesyscloud_knowledge_category_test.go index 06ca7764f..795c60613 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_category_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_category_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceKnowledgeCategoryBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_document.go b/genesyscloud/resource_genesyscloud_knowledge_document.go index 7c91e51bf..c70f722ae 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_document.go +++ b/genesyscloud/resource_genesyscloud_knowledge_document.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_knowledge_document_test.go b/genesyscloud/resource_genesyscloud_knowledge_document_test.go index 0e47251ac..37a7b7e65 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_document_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_document_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceKnowledgeDocumentBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_document_variation.go b/genesyscloud/resource_genesyscloud_knowledge_document_variation.go index b0ed284f2..0a6906123 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_document_variation.go +++ b/genesyscloud/resource_genesyscloud_knowledge_document_variation.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_knowledge_document_variation_test.go b/genesyscloud/resource_genesyscloud_knowledge_document_variation_test.go index 72e6fbfc4..a61504e32 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_document_variation_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_document_variation_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceKnowledgeDocumentVariationBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_knowledgebase.go b/genesyscloud/resource_genesyscloud_knowledge_knowledgebase.go index 4e824d71e..ebf318da6 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_knowledgebase.go +++ b/genesyscloud/resource_genesyscloud_knowledge_knowledgebase.go @@ -9,6 +9,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + "terraform-provider-genesyscloud/genesyscloud/validators" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" @@ -17,8 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllKnowledgeKnowledgebases(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { @@ -112,10 +112,10 @@ func ResourceKnowledgeKnowledgebase() *schema.Resource { Optional: true, }, "core_language": { - Description: "Core language for knowledge base in which initial content must be created, language codes [en-US, en-UK, en-AU, de-DE] are supported currently, however the new DX knowledge will support all these language codes", - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"en-US", "en-UK", "en-AU", "de-DE", "es-US", "es-ES", "fr-FR", "pt-BR", "nl-NL", "it-IT", "fr-CA"}, false), + Description: "Core language for knowledge base in which initial content must be created, language codes [en-US, en-UK, en-AU, de-DE] are supported currently, however the new DX knowledge will support all these language codes", + Type: schema.TypeString, + Required: true, + ValidateDiagFunc: validators.ValidateLanguageCode, }, "published": { Description: "Flag that indicates the knowledge base is published", diff --git a/genesyscloud/resource_genesyscloud_knowledge_knowledgebase_test.go b/genesyscloud/resource_genesyscloud_knowledge_knowledgebase_test.go index 798715ee1..460b02cd8 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_knowledgebase_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_knowledgebase_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceKnowledgeKnowledgebaseBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_label.go b/genesyscloud/resource_genesyscloud_knowledge_label.go index 9b622e0ae..0e62c1ed5 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_label.go +++ b/genesyscloud/resource_genesyscloud_knowledge_label.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_knowledge_label_test.go b/genesyscloud/resource_genesyscloud_knowledge_label_test.go index 146fa7f36..c9fa514c7 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_label_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_label_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceKnowledgeLabelBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_v1_category.go b/genesyscloud/resource_genesyscloud_knowledge_v1_category.go index b5af3291e..ebe0aad6e 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_v1_category.go +++ b/genesyscloud/resource_genesyscloud_knowledge_v1_category.go @@ -8,6 +8,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/validators" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" @@ -18,8 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( @@ -144,10 +144,10 @@ func ResourceKnowledgeCategoryV1() *schema.Resource { Required: true, }, "language_code": { - Description: "language code of the category", - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"en-US", "en-UK", "en-AU", "de-DE", "es-US", "es-ES", "fr-FR", "pt-BR", "nl-NL", "it-IT", "fr-CA"}, false), + Description: "language code of the category", + Type: schema.TypeString, + Required: true, + ValidateDiagFunc: validators.ValidateLanguageCode, }, "knowledge_category": { Description: "Knowledge category parent id", diff --git a/genesyscloud/resource_genesyscloud_knowledge_v1_category_test.go b/genesyscloud/resource_genesyscloud_knowledge_v1_category_test.go index 578c23b26..ccd7370f4 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_v1_category_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_v1_category_test.go @@ -8,7 +8,7 @@ package genesyscloud // "github.com/google/uuid" // "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" // "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" -// "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" +// "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" // ) // func TestAccResourceKnowledgeV1CategoryBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_knowledge_v1_document.go b/genesyscloud/resource_genesyscloud_knowledge_v1_document.go index a87a90384..44ac81ff3 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_v1_document.go +++ b/genesyscloud/resource_genesyscloud_knowledge_v1_document.go @@ -8,6 +8,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" + "terraform-provider-genesyscloud/genesyscloud/validators" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" @@ -22,7 +23,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( @@ -208,10 +209,10 @@ func ResourceKnowledgeDocumentV1() *schema.Resource { Required: true, }, "language_code": { - Description: "Language code", - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{"en-US", "en-UK", "en-AU", "de-DE", "es-US", "es-ES", "fr-FR", "pt-BR", "nl-NL", "it-IT", "fr-CA"}, false), + Description: "Language code", + Type: schema.TypeString, + Required: true, + ValidateDiagFunc: validators.ValidateLanguageCode, }, "knowledge_document": { Description: "Knowledge document request body", diff --git a/genesyscloud/resource_genesyscloud_knowledge_v1_document_test.go b/genesyscloud/resource_genesyscloud_knowledge_v1_document_test.go index b9ef197c6..33a0bc435 100644 --- a/genesyscloud/resource_genesyscloud_knowledge_v1_document_test.go +++ b/genesyscloud/resource_genesyscloud_knowledge_v1_document_test.go @@ -8,7 +8,7 @@ package genesyscloud // "github.com/google/uuid" // "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" // "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" -// "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" +// "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" // ) // func TestAccResourceKnowledgeV1DocumentBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_location.go b/genesyscloud/resource_genesyscloud_location.go index eb2ac88e0..910a0521e 100644 --- a/genesyscloud/resource_genesyscloud_location.go +++ b/genesyscloud/resource_genesyscloud_location.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/nyaruka/phonenumbers" ) diff --git a/genesyscloud/resource_genesyscloud_location_test.go b/genesyscloud/resource_genesyscloud_location_test.go index b34a8c149..464de7e88 100644 --- a/genesyscloud/resource_genesyscloud_location_test.go +++ b/genesyscloud/resource_genesyscloud_location_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceLocationBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_quality_forms_evaluation.go b/genesyscloud/resource_genesyscloud_quality_forms_evaluation.go index b048bda93..46d25aaf5 100644 --- a/genesyscloud/resource_genesyscloud_quality_forms_evaluation.go +++ b/genesyscloud/resource_genesyscloud_quality_forms_evaluation.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/resource_genesyscloud_quality_forms_evaluation_test.go b/genesyscloud/resource_genesyscloud_quality_forms_evaluation_test.go index bceeeff41..bec7ffa7e 100644 --- a/genesyscloud/resource_genesyscloud_quality_forms_evaluation_test.go +++ b/genesyscloud/resource_genesyscloud_quality_forms_evaluation_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceEvaluationFormBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_quality_forms_survey.go b/genesyscloud/resource_genesyscloud_quality_forms_survey.go index a8941b378..9684600e1 100644 --- a/genesyscloud/resource_genesyscloud_quality_forms_survey.go +++ b/genesyscloud/resource_genesyscloud_quality_forms_survey.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type SurveyFormStruct struct { diff --git a/genesyscloud/resource_genesyscloud_quality_forms_survey_test.go b/genesyscloud/resource_genesyscloud_quality_forms_survey_test.go index cf763718c..f09b650fe 100644 --- a/genesyscloud/resource_genesyscloud_quality_forms_survey_test.go +++ b/genesyscloud/resource_genesyscloud_quality_forms_survey_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceSurveyFormBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_routing_email_domain.go b/genesyscloud/resource_genesyscloud_routing_email_domain.go index e17c91191..f49449257 100644 --- a/genesyscloud/resource_genesyscloud_routing_email_domain.go +++ b/genesyscloud/resource_genesyscloud_routing_email_domain.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingEmailDomains(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/resource_genesyscloud_routing_email_domain_test.go b/genesyscloud/resource_genesyscloud_routing_email_domain_test.go index 016f54c20..b01929e81 100644 --- a/genesyscloud/resource_genesyscloud_routing_email_domain_test.go +++ b/genesyscloud/resource_genesyscloud_routing_email_domain_test.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingEmailDomainSub(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_routing_language.go b/genesyscloud/resource_genesyscloud_routing_language.go index e30132331..9340ff2b7 100644 --- a/genesyscloud/resource_genesyscloud_routing_language.go +++ b/genesyscloud/resource_genesyscloud_routing_language.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingLanguages(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/resource_genesyscloud_routing_language_test.go b/genesyscloud/resource_genesyscloud_routing_language_test.go index a3f416a09..5d0349c8a 100644 --- a/genesyscloud/resource_genesyscloud_routing_language_test.go +++ b/genesyscloud/resource_genesyscloud_routing_language_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingLanguageBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_routing_skill.go b/genesyscloud/resource_genesyscloud_routing_skill.go index 91ccf0574..33093ab37 100644 --- a/genesyscloud/resource_genesyscloud_routing_skill.go +++ b/genesyscloud/resource_genesyscloud_routing_skill.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingSkills(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/resource_genesyscloud_routing_skill_group.go b/genesyscloud/resource_genesyscloud_routing_skill_group.go index 6508806de..5e47d30c1 100644 --- a/genesyscloud/resource_genesyscloud_routing_skill_group.go +++ b/genesyscloud/resource_genesyscloud_routing_skill_group.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type SkillGroupsRequest struct { diff --git a/genesyscloud/resource_genesyscloud_routing_skill_group_test.go b/genesyscloud/resource_genesyscloud_routing_skill_group_test.go index 311e08fc7..3fdf5e580 100644 --- a/genesyscloud/resource_genesyscloud_routing_skill_group_test.go +++ b/genesyscloud/resource_genesyscloud_routing_skill_group_test.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func testAccCheckSkillConditions(resourceName string, targetSkillConditionJson string) resource.TestCheckFunc { diff --git a/genesyscloud/resource_genesyscloud_routing_skill_test.go b/genesyscloud/resource_genesyscloud_routing_skill_test.go index 551c061a6..e847a18ff 100644 --- a/genesyscloud/resource_genesyscloud_routing_skill_test.go +++ b/genesyscloud/resource_genesyscloud_routing_skill_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingSkillBasic(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_routing_wrapupcode.go b/genesyscloud/resource_genesyscloud_routing_wrapupcode.go index 962e28073..210584bb5 100644 --- a/genesyscloud/resource_genesyscloud_routing_wrapupcode.go +++ b/genesyscloud/resource_genesyscloud_routing_wrapupcode.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingWrapupCodes(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/resource_genesyscloud_routing_wrapupcode_test.go b/genesyscloud/resource_genesyscloud_routing_wrapupcode_test.go index d4becc64d..6fc78d61d 100644 --- a/genesyscloud/resource_genesyscloud_routing_wrapupcode_test.go +++ b/genesyscloud/resource_genesyscloud_routing_wrapupcode_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingWrapupcode(t *testing.T) { diff --git a/genesyscloud/resource_genesyscloud_user.go b/genesyscloud/resource_genesyscloud_user.go index 79baca358..0276edaae 100644 --- a/genesyscloud/resource_genesyscloud_user.go +++ b/genesyscloud/resource_genesyscloud_user.go @@ -2,7 +2,6 @@ package genesyscloud import ( "context" - "encoding/json" "fmt" "log" "strings" @@ -24,16 +23,10 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/nyaruka/phonenumbers" ) -type AgentUtilizationWithLabels struct { - Utilization map[string]routingUtilization.MediaUtilization `json:"utilization"` - LabelUtilizations map[string]routingUtilization.LabelUtilization `json:"labelUtilizations"` - Level string `json:"level"` -} - var ( contactTypeEmail = "EMAIL" @@ -417,7 +410,7 @@ func ResourceUser() *schema.Resource { Elem: routingUtilization.UtilizationSettingsResource, }, "label_utilizations": { - Description: "Label utilization settings. If not set, default label settings will be applied. This is in PREVIEW and should not be used unless the feature is available to your organization.", + Description: "Label utilization settings. If not set, default label settings will be applied.", Type: schema.TypeList, Optional: true, Computed: true, @@ -531,7 +524,7 @@ func createUser(ctx context.Context, d *schema.ResourceData, meta interface{}) d return diagErr } - diagErr = updateUserRoutingUtilization(d, usersAPI, sdkConfig) + diagErr = updateUserRoutingUtilization(d, usersAPI) if diagErr != nil { return diagErr } @@ -602,7 +595,7 @@ func readUser(ctx context.Context, d *schema.ResourceData, meta interface{}) dia d.Set("certifications", flattenUserCertifications(currentUser.Certifications)) d.Set("employer_info", flattenUserEmployerInfo(currentUser.EmployerInfo)) - if diagErr := readUserRoutingUtilization(d, sdkConfig); diagErr != nil { + if diagErr := readUserRoutingUtilization(d, usersAPI); diagErr != nil { return retry.NonRetryableError(fmt.Errorf("%v", diagErr)) } @@ -677,7 +670,7 @@ func updateUser(ctx context.Context, d *schema.ResourceData, meta interface{}) d return diagErr } - diagErr = updateUserRoutingUtilization(d, usersAPI, sdkConfig) + diagErr = updateUserRoutingUtilization(d, usersAPI) if diagErr != nil { return diagErr } @@ -1044,30 +1037,21 @@ func flattenUserEmployerInfo(empInfo *platformclientv2.Employerinfo) []interface }} } -func readUserRoutingUtilization(d *schema.ResourceData, sdkConfig *platformclientv2.Configuration) diag.Diagnostics { +func readUserRoutingUtilization(d *schema.ResourceData, usersAPI *platformclientv2.UsersApi) diag.Diagnostics { log.Printf("Getting user utilization") - routingAPI := platformclientv2.NewRoutingApiWithConfig(sdkConfig) - apiClient := &routingAPI.Configuration.APIClient - - path := fmt.Sprintf("%s/api/v2/routing/users/%s/utilization", routingAPI.Configuration.BasePath, d.Id()) - headerParams := BuildHeaderParams(routingAPI) - response, err := apiClient.CallAPI(path, "GET", nil, headerParams, nil, nil, "", nil) - - if err != nil { - if util.IsStatus404(response) { + agentUtilization, resp, getErr := usersAPI.GetRoutingUserUtilization(d.Id()) + if getErr != nil { + if util.IsStatus404(resp) { d.SetId("") // User doesn't exist return nil } - return util.BuildAPIDiagnosticError("genesyscloud_user", fmt.Sprintf("Failed to read routing utilization for user %s error: %s", d.Id(), err), response) + return diag.Errorf("Failed to read Routing Utilization for user %s: %s", d.Id(), getErr) } - agentUtilization := &AgentUtilizationWithLabels{} - json.Unmarshal(response.RawBody, &agentUtilization) - if agentUtilization == nil { d.Set("routing_utilization", nil) - } else if agentUtilization.Level == "Organization" { + } else if *agentUtilization.Level == "Organization" { // If the settings are org-wide, set to empty to indicate no settings on the user d.Set("routing_utilization", []interface{}{}) } else { @@ -1075,8 +1059,8 @@ func readUserRoutingUtilization(d *schema.ResourceData, sdkConfig *platformclien if agentUtilization.Utilization != nil { for sdkType, schemaType := range routingUtilization.UtilizationMediaTypes { - if mediaSettings, ok := agentUtilization.Utilization[sdkType]; ok { - allSettings[schemaType] = routingUtilization.FlattenUtilizationSetting(mediaSettings) + if mediaSettings, ok := (*agentUtilization.Utilization)[sdkType]; ok { + allSettings[schemaType] = routingUtilization.FlattenMediaUtilization(mediaSettings) } } } @@ -1088,7 +1072,7 @@ func readUserRoutingUtilization(d *schema.ResourceData, sdkConfig *platformclien originalLabelUtilizations := originalSettings["label_utilizations"].([]interface{}) // Only add to the state the configured labels, in the configured order, but not any extras, to help terraform with matching new and old state. - filteredLabelUtilizations := routingUtilization.FilterAndFlattenLabelUtilizations(agentUtilization.LabelUtilizations, originalLabelUtilizations) + filteredLabelUtilizations := routingUtilization.FilterAndFlattenLabelUtilizations(*agentUtilization.LabelUtilizations, originalLabelUtilizations) allSettings["label_utilizations"] = filteredLabelUtilizations } else { @@ -1277,10 +1261,9 @@ func updateUserProfileSkills(d *schema.ResourceData, usersAPI *platformclientv2. return nil } -func updateUserRoutingUtilization(d *schema.ResourceData, usersAPI *platformclientv2.UsersApi, sdkConfig *platformclientv2.Configuration) diag.Diagnostics { +func updateUserRoutingUtilization(d *schema.ResourceData, usersAPI *platformclientv2.UsersApi) diag.Diagnostics { if d.HasChange("routing_utilization") { if utilConfig := d.Get("routing_utilization").([]interface{}); utilConfig != nil { - var err error log.Printf("Updating user utilization for user %s", d.Id()) @@ -1289,30 +1272,18 @@ func updateUserRoutingUtilization(d *schema.ResourceData, usersAPI *platformclie allSettings := utilConfig[0].(map[string]interface{}) labelUtilizations := allSettings["label_utilizations"].([]interface{}) - if labelUtilizations != nil && len(labelUtilizations) > 0 { - routingAPI := platformclientv2.NewRoutingApiWithConfig(sdkConfig) - apiClient := &routingAPI.Configuration.APIClient - - path := fmt.Sprintf("%s/api/v2/routing/users/%s/utilization", routingAPI.Configuration.BasePath, d.Id()) - headerParams := BuildHeaderParams(routingAPI) - requestPayload := make(map[string]interface{}) - requestPayload["utilization"] = buildMediaTypeUtilizations(allSettings) - - requestPayload["labelUtilizations"] = routingUtilization.BuildLabelUtilizationsRequest(labelUtilizations) - _, err = apiClient.CallAPI(path, "PUT", requestPayload, headerParams, nil, nil, "", nil) - } else { - sdkSettings := make(map[string]platformclientv2.Mediautilization) - for sdkType, schemaType := range routingUtilization.UtilizationMediaTypes { - if mediaSettings, ok := allSettings[schemaType]; ok && len(mediaSettings.([]interface{})) > 0 { - sdkSettings[sdkType] = routingUtilization.BuildSdkMediaUtilization(mediaSettings.([]interface{})) - } + sdkSettings := make(map[string]platformclientv2.Mediautilization) + for sdkType, schemaType := range routingUtilization.UtilizationMediaTypes { + if mediaSettings, ok := allSettings[schemaType]; ok && len(mediaSettings.([]interface{})) > 0 { + sdkSettings[sdkType] = routingUtilization.BuildSdkMediaUtilization(mediaSettings.([]interface{})) } - - _, _, err = usersAPI.PutRoutingUserUtilization(d.Id(), platformclientv2.Utilizationrequest{ - Utilization: &sdkSettings, - }) } + _, _, err := usersAPI.PutRoutingUserUtilization(d.Id(), platformclientv2.Utilizationrequest{ + Utilization: &sdkSettings, + LabelUtilizations: routingUtilization.BuildSdkLabelUtilizations(labelUtilizations), + }) + if err != nil { return util.BuildDiagnosticError("genesyscloud_user", fmt.Sprintf("Failed to update Routing Utilization for user %s", d.Id()), err) } diff --git a/genesyscloud/resource_genesyscloud_user_test.go b/genesyscloud/resource_genesyscloud_user_test.go index c064114ea..4dd536e5f 100644 --- a/genesyscloud/resource_genesyscloud_user_test.go +++ b/genesyscloud/resource_genesyscloud_user_test.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceUserBasic(t *testing.T) { @@ -709,7 +709,7 @@ func TestAccResourceUserEmployerInfo(t *testing.T) { }) } -func TestAccResourceUserroutingUtil(t *testing.T) { +func TestAccResourceUserroutingUtilBasic(t *testing.T) { t.Parallel() var ( userResource1 = "test-user-util" @@ -864,12 +864,7 @@ func TestAccResourceUserroutingUtilWithLabels(t *testing.T) { ) resource.Test(t, resource.TestCase{ - PreCheck: func() { - util.TestAccPreCheck(t) - if err := routingUtilizationLabel.CheckIfLabelsAreEnabled(); err != nil { - t.Skipf("%v", err) // be sure to skip the test and not fail it - } - }, + PreCheck: func() { util.TestAccPreCheck(t) }, ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), Steps: []resource.TestStep{ { diff --git a/genesyscloud/resource_genesyscloud_widget_deployment.go b/genesyscloud/resource_genesyscloud_widget_deployment.go index 54ef064af..989d19d87 100644 --- a/genesyscloud/resource_genesyscloud_widget_deployment.go +++ b/genesyscloud/resource_genesyscloud_widget_deployment.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/resource_genesyscloud_widget_deployment_test.go b/genesyscloud/resource_genesyscloud_widget_deployment_test.go index 2f4b56c25..cc8519ce1 100644 --- a/genesyscloud/resource_genesyscloud_widget_deployment_test.go +++ b/genesyscloud/resource_genesyscloud_widget_deployment_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type widgetDeploymentConfig struct { diff --git a/genesyscloud/responsemanagement_library/genesyscloud_responsemanagement_library_proxy.go b/genesyscloud/responsemanagement_library/genesyscloud_responsemanagement_library_proxy.go index 9478205ec..644d5de5b 100644 --- a/genesyscloud/responsemanagement_library/genesyscloud_responsemanagement_library_proxy.go +++ b/genesyscloud/responsemanagement_library/genesyscloud_responsemanagement_library_proxy.go @@ -3,8 +3,9 @@ package responsemanagement_library import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library.go b/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library.go index 2970dd174..0d922993b 100644 --- a/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library.go +++ b/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library.go @@ -3,9 +3,6 @@ package responsemanagement_library import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" @@ -13,6 +10,10 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" diff --git a/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library_test.go b/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library_test.go index 2724c81d1..6473a47d1 100644 --- a/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library_test.go +++ b/genesyscloud/responsemanagement_library/resource_genesyscloud_responsemanagement_library_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceResponseManagementLibrary(t *testing.T) { diff --git a/genesyscloud/responsemanagement_response/genesyscloud_responsemanagement_response_proxy.go b/genesyscloud/responsemanagement_response/genesyscloud_responsemanagement_response_proxy.go index 70921cbd8..15aa5c24e 100644 --- a/genesyscloud/responsemanagement_response/genesyscloud_responsemanagement_response_proxy.go +++ b/genesyscloud/responsemanagement_response/genesyscloud_responsemanagement_response_proxy.go @@ -3,8 +3,9 @@ package responsemanagement_response import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response.go b/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response.go index 5e7dec46c..2de69e6cb 100644 --- a/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response.go +++ b/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response.go @@ -3,10 +3,6 @@ package responsemanagement_response import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -15,6 +11,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_test.go b/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_test.go index c9dbca7a6..1a12a384a 100644 --- a/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_test.go +++ b/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_test.go @@ -16,7 +16,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceResponseManagementResponseFooterField(t *testing.T) { diff --git a/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_utils.go b/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_utils.go index f2dd8555f..45d6bb6f3 100644 --- a/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_utils.go +++ b/genesyscloud/responsemanagement_response/resource_genesyscloud_responsemanagement_response_utils.go @@ -1,11 +1,12 @@ package responsemanagement_response import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getResponseFromResourceData(d *schema.ResourceData) platformclientv2.Response { diff --git a/genesyscloud/responsemanagement_responseasset/genesyscloud_responsemanagement_responseasset_proxy.go b/genesyscloud/responsemanagement_responseasset/genesyscloud_responsemanagement_responseasset_proxy.go index fe64370e1..8495f4910 100644 --- a/genesyscloud/responsemanagement_responseasset/genesyscloud_responsemanagement_responseasset_proxy.go +++ b/genesyscloud/responsemanagement_responseasset/genesyscloud_responsemanagement_responseasset_proxy.go @@ -6,7 +6,7 @@ import ( "log" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset.go b/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset.go index 94a4a0c2e..b0e7d9470 100644 --- a/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset.go +++ b/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset.go @@ -3,10 +3,6 @@ package responsemanagement_responseasset import ( "context" "fmt" - "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/v131/platformclientv2" "log" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" @@ -15,6 +11,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "terraform-provider-genesyscloud/genesyscloud/util/files" "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset_test.go b/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset_test.go index 7cb665c73..8d222e26e 100644 --- a/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset_test.go +++ b/genesyscloud/responsemanagement_responseasset/resource_genesyscloud_responsemanagement_responseasset_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceResponseManagementResponseAsset(t *testing.T) { diff --git a/genesyscloud/routing_email_route/genesyscloud_routing_email_route_proxy.go b/genesyscloud/routing_email_route/genesyscloud_routing_email_route_proxy.go index 6c8df29b3..ac6ac1328 100644 --- a/genesyscloud/routing_email_route/genesyscloud_routing_email_route_proxy.go +++ b/genesyscloud/routing_email_route/genesyscloud_routing_email_route_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go index 8bdffc449..d2910fa3e 100644 --- a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go +++ b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_test.go b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_test.go index 4cec51ca3..075bd7b7c 100644 --- a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_test.go +++ b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_test.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingEmailRoute(t *testing.T) { diff --git a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_utils.go b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_utils.go index c47783f4b..7c5b58343 100644 --- a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_utils.go +++ b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route_utils.go @@ -8,7 +8,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/routing_queue/data_source_genesyscloud_routing_queue.go b/genesyscloud/routing_queue/data_source_genesyscloud_routing_queue.go index cd47befaa..08fa4fb5b 100644 --- a/genesyscloud/routing_queue/data_source_genesyscloud_routing_queue.go +++ b/genesyscloud/routing_queue/data_source_genesyscloud_routing_queue.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/routing_queue/genesyscloud_routing_queue_proxy.go b/genesyscloud/routing_queue/genesyscloud_routing_queue_proxy.go index 3a06aa969..2d27a41d0 100644 --- a/genesyscloud/routing_queue/genesyscloud_routing_queue_proxy.go +++ b/genesyscloud/routing_queue/genesyscloud_routing_queue_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/routing_queue/resource_genesyscloud_routing_queue.go b/genesyscloud/routing_queue/resource_genesyscloud_routing_queue.go index 46ae0cba6..4ee275d58 100644 --- a/genesyscloud/routing_queue/resource_genesyscloud_routing_queue.go +++ b/genesyscloud/routing_queue/resource_genesyscloud_routing_queue.go @@ -25,7 +25,7 @@ import ( "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var bullseyeExpansionTypeTimeout = "TIMEOUT_SECONDS" diff --git a/genesyscloud/routing_queue/resource_genesyscloud_routing_queue_test.go b/genesyscloud/routing_queue/resource_genesyscloud_routing_queue_test.go index 20252e1db..c1a359274 100644 --- a/genesyscloud/routing_queue/resource_genesyscloud_routing_queue_test.go +++ b/genesyscloud/routing_queue/resource_genesyscloud_routing_queue_test.go @@ -20,7 +20,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/routing_queue_conditional_group_routing/genesyscloud_routing_queue_conditional_group_routing_proxy.go b/genesyscloud/routing_queue_conditional_group_routing/genesyscloud_routing_queue_conditional_group_routing_proxy.go index 8072bfcc7..c30bd06f0 100644 --- a/genesyscloud/routing_queue_conditional_group_routing/genesyscloud_routing_queue_conditional_group_routing_proxy.go +++ b/genesyscloud/routing_queue_conditional_group_routing/genesyscloud_routing_queue_conditional_group_routing_proxy.go @@ -3,9 +3,10 @@ package routing_queue_conditional_group_routing import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // internalProxy holds a proxy instance that can be used throughout the package diff --git a/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing.go b/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing.go index a0d3b94a3..3877f16fd 100644 --- a/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing.go +++ b/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing.go @@ -3,10 +3,6 @@ package routing_queue_conditional_group_routing import ( "context" "fmt" - "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/v131/platformclientv2" "log" "strings" consistencyChecker "terraform-provider-genesyscloud/genesyscloud/consistency_checker" @@ -16,6 +12,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" featureToggles "terraform-provider-genesyscloud/genesyscloud/util/feature_toggles" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "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/v133/platformclientv2" ) /* diff --git a/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_test.go b/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_test.go index dadf085c8..e910fb72c 100644 --- a/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_test.go +++ b/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_test.go @@ -18,7 +18,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_unit_test.go b/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_unit_test.go index 16b682245..fc4f84f7f 100644 --- a/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_unit_test.go +++ b/genesyscloud/routing_queue_conditional_group_routing/resource_genesyscloud_routing_queue_conditional_group_routing_unit_test.go @@ -2,14 +2,15 @@ package routing_queue_conditional_group_routing import ( "context" + "net/http" + "terraform-provider-genesyscloud/genesyscloud/provider" + "testing" + "github.com/google/go-cmp/cmp" "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" - "net/http" - "terraform-provider-genesyscloud/genesyscloud/provider" - "testing" ) func TestUnitResourceRoutingQueueConditionalGroupRoutingUpdate(t *testing.T) { diff --git a/genesyscloud/routing_queue_outbound_email_address/genesyscloud_routing_queue_outbound_email_address_proxy.go b/genesyscloud/routing_queue_outbound_email_address/genesyscloud_routing_queue_outbound_email_address_proxy.go index e12da7114..b79e9f767 100644 --- a/genesyscloud/routing_queue_outbound_email_address/genesyscloud_routing_queue_outbound_email_address_proxy.go +++ b/genesyscloud/routing_queue_outbound_email_address/genesyscloud_routing_queue_outbound_email_address_proxy.go @@ -3,9 +3,10 @@ package routing_queue_outbound_email_address import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // internalProxy holds a proxy instance that can be used throughout the package diff --git a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address.go b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address.go index e94fdaee1..e9f412963 100644 --- a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address.go +++ b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address.go @@ -3,10 +3,6 @@ package routing_queue_outbound_email_address import ( "context" "fmt" - "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/v131/platformclientv2" "log" "strings" consistencyChecker "terraform-provider-genesyscloud/genesyscloud/consistency_checker" @@ -16,6 +12,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" featureToggles "terraform-provider-genesyscloud/genesyscloud/util/feature_toggles" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "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/v133/platformclientv2" ) /* @@ -37,7 +38,7 @@ func getAllAuthRoutingQueueOutboundEmailAddress(ctx context.Context, clientConfi } for _, queue := range *queues { - if queue.OutboundEmailAddress != nil && *queue.OutboundEmailAddress != nil { + if queue.OutboundEmailAddress != nil && !isQueueEmailAddressEmpty(*queue.OutboundEmailAddress) { resources[*queue.Id] = &resourceExporter.ResourceMeta{Name: *queue.Name + "-email-address"} } } diff --git a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_schema.go b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_schema.go index f78e264c3..3a1c71f69 100644 --- a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_schema.go +++ b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_schema.go @@ -1,10 +1,11 @@ package routing_queue_outbound_email_address import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) const resourceName = "genesyscloud_routing_queue_outbound_email_address" diff --git a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_test.go b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_test.go index cfac071ce..534bd35bf 100644 --- a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_test.go +++ b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_test.go @@ -2,10 +2,6 @@ package routing_queue_outbound_email_address import ( "fmt" - "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "os" "strings" @@ -17,6 +13,11 @@ import ( featureToggles "terraform-provider-genesyscloud/genesyscloud/util/feature_toggles" "testing" "time" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingQueueOutboundEmailAddress(t *testing.T) { diff --git a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_unit_test.go b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_unit_test.go index 6ef38582c..00f239f42 100644 --- a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_unit_test.go +++ b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_unit_test.go @@ -2,13 +2,14 @@ package routing_queue_outbound_email_address import ( "context" - "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" - "github.com/stretchr/testify/assert" "net/http" "terraform-provider-genesyscloud/genesyscloud/provider" "testing" + + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "github.com/stretchr/testify/assert" ) func TestUnitResourceRoutingQueueOutboundEmailAddressUpdate(t *testing.T) { diff --git a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils.go b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils.go new file mode 100644 index 000000000..e6c7a51e2 --- /dev/null +++ b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils.go @@ -0,0 +1,25 @@ +package routing_queue_outbound_email_address + +import "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + +func isQueueEmailAddressEmpty(qea *platformclientv2.Queueemailaddress) bool { + if qea == nil { + return true + } + + // Compare relevant fields of the struct + if qea.Domain == nil || qea.Domain.Id == nil || *qea.Domain.Id == "" { + return true + } + + if qea.Route != nil && *qea.Route != nil { + routeId := (*qea.Route).Id + if routeId == nil || *routeId == "" { + return true + } + } else { + return true + } + + return false +} diff --git a/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils_unit_test.go b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils_unit_test.go new file mode 100644 index 000000000..bf9230f0c --- /dev/null +++ b/genesyscloud/routing_queue_outbound_email_address/resource_genesyscloud_routing_queue_outbound_email_address_utils_unit_test.go @@ -0,0 +1,30 @@ +package routing_queue_outbound_email_address + +import ( + "testing" + + "github.com/google/uuid" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "github.com/stretchr/testify/assert" +) + +func TestUnitResourceRoutingQueueOutboundEmailAddressEmpty(t *testing.T) { + address := platformclientv2.Queueemailaddress{} + result := isQueueEmailAddressEmpty(&address) + assert.Equal(t, true, result) +} + +func TestUnitResourceRoutingQueueOutboundEmailAddressNotEmpty(t *testing.T) { + tDomainId := uuid.NewString() + tRouteId := uuid.NewString() + + route := &platformclientv2.Inboundroute{ + Id: &tRouteId, + } + address := platformclientv2.Queueemailaddress{ + Domain: &platformclientv2.Domainentityref{Id: &tDomainId}, + Route: &route, + } + result := isQueueEmailAddressEmpty(&address) + assert.Equal(t, false, result) +} diff --git a/genesyscloud/routing_settings/genesyscloud_routing_settings_proxy.go b/genesyscloud/routing_settings/genesyscloud_routing_settings_proxy.go index 111dcf6f1..00fc3df53 100644 --- a/genesyscloud/routing_settings/genesyscloud_routing_settings_proxy.go +++ b/genesyscloud/routing_settings/genesyscloud_routing_settings_proxy.go @@ -2,7 +2,8 @@ package routing_settings import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *routingSettingsProxy diff --git a/genesyscloud/routing_settings/resource_genesyscloud_routing_settings.go b/genesyscloud/routing_settings/resource_genesyscloud_routing_settings.go index 3f4a4f2e8..24faf3c06 100644 --- a/genesyscloud/routing_settings/resource_genesyscloud_routing_settings.go +++ b/genesyscloud/routing_settings/resource_genesyscloud_routing_settings.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingSettings(_ context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/routing_sms_addresses/genesyscloud_routing_sms_addresses_proxy.go b/genesyscloud/routing_sms_addresses/genesyscloud_routing_sms_addresses_proxy.go index 4da161286..85212774a 100644 --- a/genesyscloud/routing_sms_addresses/genesyscloud_routing_sms_addresses_proxy.go +++ b/genesyscloud/routing_sms_addresses/genesyscloud_routing_sms_addresses_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // Type definitions for each func on our proxy so we can easily mock them out later diff --git a/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses.go b/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses.go index d578d8b0c..1da47bc0d 100644 --- a/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses.go +++ b/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const resourceName = "genesyscloud_routing_sms_address" diff --git a/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses_test.go b/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses_test.go index 4d4185ee8..5ea01bb2c 100644 --- a/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses_test.go +++ b/genesyscloud/routing_sms_addresses/resource_genesyscloud_routing_sms_addresses_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingSmsAddressesProdOrg(t *testing.T) { diff --git a/genesyscloud/routing_utilization/genesyscloud_routing_utilization_proxy.go b/genesyscloud/routing_utilization/genesyscloud_routing_utilization_proxy.go index 776d9664a..401e954ef 100644 --- a/genesyscloud/routing_utilization/genesyscloud_routing_utilization_proxy.go +++ b/genesyscloud/routing_utilization/genesyscloud_routing_utilization_proxy.go @@ -2,27 +2,22 @@ package routing_utilization import ( "context" - "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *routingUtilizationProxy -type getRoutingUtilizationFunc func(ctx context.Context, p *routingUtilizationProxy) (*platformclientv2.APIResponse, error) +type getRoutingUtilizationFunc func(ctx context.Context, p *routingUtilizationProxy) (*platformclientv2.Utilizationresponse, *platformclientv2.APIResponse, error) type updateRoutingUtilizationFunc func(ctx context.Context, p *routingUtilizationProxy, request *platformclientv2.Utilizationrequest) (*platformclientv2.Utilizationresponse, *platformclientv2.APIResponse, error) type deleteRoutingUtilizationFunc func(ctx context.Context, p *routingUtilizationProxy) (*platformclientv2.APIResponse, error) -type updateDirectlyFunc func(ctx context.Context, p *routingUtilizationProxy, d *schema.ResourceData, utilizationRequest []interface{}) (*platformclientv2.APIResponse, error) - type routingUtilizationProxy struct { clientConfig *platformclientv2.Configuration routingApi *platformclientv2.RoutingApi getRoutingUtilizationAttr getRoutingUtilizationFunc updateRoutingUtilizationAttr updateRoutingUtilizationFunc deleteRoutingUtilizationAttr deleteRoutingUtilizationFunc - - updateDirectlyAttr updateDirectlyFunc } func newRoutingUtilizationProxy(clientConfig *platformclientv2.Configuration) *routingUtilizationProxy { @@ -33,8 +28,6 @@ func newRoutingUtilizationProxy(clientConfig *platformclientv2.Configuration) *r getRoutingUtilizationAttr: getRoutingUtilizationFn, updateRoutingUtilizationAttr: updateRoutingUtilizationFn, deleteRoutingUtilizationAttr: deleteRoutingUtilizationFn, - - updateDirectlyAttr: updateDirectlyFn, } } @@ -45,31 +38,20 @@ func getRoutingUtilizationProxy(clientConfig *platformclientv2.Configuration) *r return internalProxy } -func (p *routingUtilizationProxy) getRoutingUtilization(ctx context.Context) (*platformclientv2.APIResponse, error) { +func (p *routingUtilizationProxy) getRoutingUtilization(ctx context.Context) (*platformclientv2.Utilizationresponse, *platformclientv2.APIResponse, error) { return p.getRoutingUtilizationAttr(ctx, p) } + func (p *routingUtilizationProxy) updateRoutingUtilization(ctx context.Context, request *platformclientv2.Utilizationrequest) (*platformclientv2.Utilizationresponse, *platformclientv2.APIResponse, error) { return p.updateRoutingUtilizationAttr(ctx, p, request) } + func (p *routingUtilizationProxy) deleteRoutingUtilization(ctx context.Context) (*platformclientv2.APIResponse, error) { return p.deleteRoutingUtilizationAttr(ctx, p) } -func (p *routingUtilizationProxy) updateDirectly(ctx context.Context, d *schema.ResourceData, utilizationRequest []interface{}) (*platformclientv2.APIResponse, error) { - return p.updateDirectlyAttr(ctx, p, d, utilizationRequest) -} - -// Calling the Utilization API directly while the label feature is not available. -// Once it is, this code can go back to using platformclientv2's RoutingApi to make the call. -func getRoutingUtilizationFn(ctx context.Context, p *routingUtilizationProxy) (*platformclientv2.APIResponse, error) { - apiClient := &p.routingApi.Configuration.APIClient - path := fmt.Sprintf("%s/api/v2/routing/utilization", p.routingApi.Configuration.BasePath) - headerParams := buildHeaderParams(p.routingApi) - resp, err := apiClient.CallAPI(path, "GET", nil, headerParams, nil, nil, "", nil) - if err != nil { - return resp, fmt.Errorf("failed to get routing utilization %s ", err) - } - return resp, nil +func getRoutingUtilizationFn(ctx context.Context, p *routingUtilizationProxy) (*platformclientv2.Utilizationresponse, *platformclientv2.APIResponse, error) { + return p.routingApi.GetRoutingUtilization() } func updateRoutingUtilizationFn(ctx context.Context, p *routingUtilizationProxy, utilizationRequest *platformclientv2.Utilizationrequest) (*platformclientv2.Utilizationresponse, *platformclientv2.APIResponse, error) { @@ -79,21 +61,3 @@ func updateRoutingUtilizationFn(ctx context.Context, p *routingUtilizationProxy, func deleteRoutingUtilizationFn(ctx context.Context, p *routingUtilizationProxy) (*platformclientv2.APIResponse, error) { return p.routingApi.DeleteRoutingUtilization() } - -// If the resource has label(s), calls the Utilization API directly. -// This code can go back to using platformclientv2's RoutingApi to make the call once label utilization is available in platformclientv2's RoutingApi -func updateDirectlyFn(ctx context.Context, p *routingUtilizationProxy, d *schema.ResourceData, utilizationRequest []interface{}) (*platformclientv2.APIResponse, error) { - apiClient := &p.routingApi.Configuration.APIClient - - path := fmt.Sprintf("%s/api/v2/routing/utilization", p.routingApi.Configuration.BasePath) - headerParams := buildHeaderParams(p.routingApi) - requestPayload := make(map[string]interface{}) - requestPayload["utilization"] = buildSdkMediaUtilizations(d) - requestPayload["labelUtilizations"] = BuildLabelUtilizationsRequest(utilizationRequest) - - resp, err := apiClient.CallAPI(path, "PUT", requestPayload, headerParams, nil, nil, "", nil) - if err != nil { - return resp, fmt.Errorf("error updating directly %s", err) - } - return resp, nil -} diff --git a/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization.go b/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization.go index 27acc28ba..5c3a56c49 100644 --- a/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization.go +++ b/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization.go @@ -2,20 +2,21 @@ package routing_utilization import ( "context" - "encoding/json" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "log" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/constants" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" + resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" - resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingUtilization(_ context.Context, _ *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { @@ -32,17 +33,14 @@ func createRoutingUtilization(ctx context.Context, d *schema.ResourceData, meta } func readRoutingUtilization(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - // Calling the Utilization API directly while the label feature is not available. - // Once it is, this code can go back to using platformclientv2's RoutingApi to make the call. sdkConfig := meta.(*provider.ProviderMeta).ClientConfig proxy := getRoutingUtilizationProxy(sdkConfig) cc := consistency_checker.NewConsistencyCheck(ctx, d, meta, ResourceRoutingUtilization(), constants.DefaultConsistencyChecks, resourceName) - orgUtilization := &OrgUtilizationWithLabels{} log.Printf("Reading Routing Utilization") return util.WithRetriesForRead(ctx, d, func() *retry.RetryError { - resp, err := proxy.getRoutingUtilization(ctx) + orgUtilization, resp, err := proxy.getRoutingUtilization(ctx) if err != nil { if util.IsStatus404(resp) { return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read Routing Utilization: %s", err), resp)) @@ -50,12 +48,10 @@ func readRoutingUtilization(ctx context.Context, d *schema.ResourceData, meta in return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("Failed to read Routing Utilization: %s", err), resp)) } - err = json.Unmarshal(resp.RawBody, &orgUtilization) - if orgUtilization.Utilization != nil { for sdkType, schemaType := range UtilizationMediaTypes { - if mediaSettings, ok := orgUtilization.Utilization[sdkType]; ok { - _ = d.Set(schemaType, FlattenUtilizationSetting(mediaSettings)) + if mediaSettings, ok := (*orgUtilization.Utilization)[sdkType]; ok { + _ = d.Set(schemaType, FlattenMediaUtilization(mediaSettings)) } else { _ = d.Set(schemaType, nil) } @@ -64,8 +60,8 @@ func readRoutingUtilization(ctx context.Context, d *schema.ResourceData, meta in if orgUtilization.LabelUtilizations != nil { originalLabelUtilizations := d.Get("label_utilizations").([]interface{}) - // Only add to the state the configured labels, in the configured order, but not any extras, to help terraform with matching new and old state. - flattenedLabelUtilizations := FilterAndFlattenLabelUtilizations(orgUtilization.LabelUtilizations, originalLabelUtilizations) + // Only add the configured labels to the state, in the configured order, but not any extras, to help terraform with matching new and old state. + flattenedLabelUtilizations := FilterAndFlattenLabelUtilizations(*orgUtilization.LabelUtilizations, originalLabelUtilizations) _ = d.Set("label_utilizations", flattenedLabelUtilizations) } @@ -78,32 +74,21 @@ func updateRoutingUtilization(ctx context.Context, d *schema.ResourceData, meta sdkConfig := meta.(*provider.ProviderMeta).ClientConfig proxy := getRoutingUtilizationProxy(sdkConfig) - labelUtilizations := d.Get("label_utilizations").([]interface{}) - var resp *platformclientv2.APIResponse - var err error - log.Printf("Updating Routing Utilization") // Retrying on 409s because if a label is created immediately before the utilization update, it can lead to a conflict while the utilization is being updated to handle the new label. diagErr := util.RetryWhen(util.IsStatus409, func() (*platformclientv2.APIResponse, diag.Diagnostics) { - // If the resource has label(s), calls the Utilization API directly. - // This code can go back to using platformclientv2's RoutingApi to make the call once label utilization is available in platformclientv2's RoutingApi. - if labelUtilizations != nil && len(labelUtilizations) > 0 { - resp, err := proxy.updateDirectly(ctx, d, labelUtilizations) - if err != nil { - return resp, util.BuildAPIDiagnosticError(resourceName, "Failed to update routing utilization directly", resp) - } - } else { - _, resp, err = proxy.updateRoutingUtilization(ctx, &platformclientv2.Utilizationrequest{ - Utilization: buildSdkMediaUtilizations(d), - }) - } + _, resp, err := proxy.updateRoutingUtilization(ctx, &platformclientv2.Utilizationrequest{ + Utilization: BuildSdkMediaUtilizations(d), + LabelUtilizations: BuildSdkLabelUtilizations(d.Get("label_utilizations").([]interface{})), + }) if err != nil { return resp, util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update Routing Utilization %s error: %s", d.Id(), err), resp) } return resp, nil }) + if diagErr != nil { return diagErr } diff --git a/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_schema.go b/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_schema.go index 0ebba6209..f956e6216 100644 --- a/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_schema.go +++ b/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_schema.go @@ -2,13 +2,14 @@ package routing_utilization import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "strings" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) const resourceName = "genesyscloud_routing_utilization" @@ -19,22 +20,6 @@ func SetRegistrar(regInstance registrar.Registrar) { regInstance.RegisterExporter(resourceName, RoutingUtilizationExporter()) } -type MediaUtilization struct { - MaximumCapacity int32 `json:"maximumCapacity"` - InterruptableMediaTypes []string `json:"interruptableMediaTypes"` - IncludeNonAcd bool `json:"includeNonAcd"` -} - -type LabelUtilization struct { - MaximumCapacity int32 `json:"maximumCapacity"` - InterruptingLabelIds []string `json:"interruptingLabelIds"` -} - -type OrgUtilizationWithLabels struct { - Utilization map[string]MediaUtilization `json:"utilization"` - LabelUtilizations map[string]LabelUtilization `json:"labelUtilizations"` -} - var ( // Map of SDK media type name to schema media type name UtilizationMediaTypes = map[string]string{ @@ -149,7 +134,7 @@ func ResourceRoutingUtilization() *schema.Resource { Elem: UtilizationSettingsResource, }, "label_utilizations": { - Description: "Label utilization settings. If not set, default label settings will be applied. This is in PREVIEW and should not be used unless the feature is available to your organization.", + Description: "Label utilization settings. If not set, default label settings will be applied.", Type: schema.TypeList, Optional: true, Computed: true, diff --git a/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_test.go b/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_test.go index 0e5019ce6..c568a4018 100644 --- a/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_test.go +++ b/genesyscloud/routing_utilization/resource_genesyscloud_routing_utilization_test.go @@ -14,10 +14,10 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) -func TestAccResourceBasicRoutingUtilization(t *testing.T) { +func TestAccResourceRoutingUtilizationBasic(t *testing.T) { t.Parallel() var ( maxCapacity1 = "3" @@ -114,12 +114,7 @@ func TestAccResourceRoutingUtilizationWithLabels(t *testing.T) { } resource.Test(t, resource.TestCase{ - PreCheck: func() { - util.TestAccPreCheck(t) - if err := routingUtilizationLabel.CheckIfLabelsAreEnabled(); err != nil { - t.Skipf("%v", err) // be sure to skip the test and not fail it - } - }, + PreCheck: func() { util.TestAccPreCheck(t) }, ProviderFactories: provider.GetProviderFactories(providerResources, nil), Steps: []resource.TestStep{ { @@ -295,7 +290,7 @@ func CleanupRoutingUtilizationLabel() error { const pageSize = 100 labels, _, getErr := routingAPI.GetRoutingUtilizationLabels(pageSize, pageNum, "", "") if getErr != nil { - log.Printf("failed to get page %v of routing email domains: %v", pageNum, getErr) + log.Printf("failed to get page %v of utilization labels: %v", pageNum, getErr) return getErr } @@ -307,7 +302,7 @@ func CleanupRoutingUtilizationLabel() error { if label.Id != nil && strings.HasPrefix(*label.Name, "Terraform") { _, err := routingAPI.DeleteRoutingUtilizationLabel(*label.Id, true) if err != nil { - log.Printf("Failed to delete routing email domain %s: %s", *label.Id, err) + log.Printf("Failed to delete utilization label %s: %s", *label.Id, err) continue } time.Sleep(5 * time.Second) diff --git a/genesyscloud/routing_utilization/resource_routing_utilization_utils.go b/genesyscloud/routing_utilization/resource_routing_utilization_utils.go index 060d857b8..4bd91ef27 100644 --- a/genesyscloud/routing_utilization/resource_routing_utilization_utils.go +++ b/genesyscloud/routing_utilization/resource_routing_utilization_utils.go @@ -2,14 +2,15 @@ package routing_utilization import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "sort" "strings" "terraform-provider-genesyscloud/genesyscloud/util/lists" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) -func buildSdkMediaUtilizations(d *schema.ResourceData) *map[string]platformclientv2.Mediautilization { +func BuildSdkMediaUtilizations(d *schema.ResourceData) *map[string]platformclientv2.Mediautilization { settings := make(map[string]platformclientv2.Mediautilization) for sdkType, schemaType := range UtilizationMediaTypes { @@ -41,33 +42,36 @@ func BuildSdkMediaUtilization(settings []interface{}) platformclientv2.Mediautil } } -func BuildLabelUtilizationsRequest(labelUtilizations []interface{}) map[string]LabelUtilization { - request := make(map[string]LabelUtilization) +func BuildSdkLabelUtilizations(labelUtilizations []interface{}) *map[string]platformclientv2.Labelutilizationrequest { + request := make(map[string]platformclientv2.Labelutilizationrequest) + for _, labelUtilization := range labelUtilizations { labelUtilizationMap := labelUtilization.(map[string]interface{}) + maxCapacity := labelUtilizationMap["maximum_capacity"].(int) interruptingLabelIds := lists.SetToStringList(labelUtilizationMap["interrupting_label_ids"].(*schema.Set)) - request[labelUtilizationMap["label_id"].(string)] = LabelUtilization{ - MaximumCapacity: int32(labelUtilizationMap["maximum_capacity"].(int)), - InterruptingLabelIds: *interruptingLabelIds, + request[labelUtilizationMap["label_id"].(string)] = platformclientv2.Labelutilizationrequest{ + MaximumCapacity: &maxCapacity, + InterruptingLabelIds: interruptingLabelIds, } } - return request + + return &request } -func FlattenUtilizationSetting(settings MediaUtilization) []interface{} { +func FlattenMediaUtilization(mediaUtilization platformclientv2.Mediautilization) []interface{} { settingsMap := make(map[string]interface{}) - settingsMap["maximum_capacity"] = settings.MaximumCapacity - settingsMap["include_non_acd"] = settings.IncludeNonAcd - if settings.InterruptableMediaTypes != nil { - settingsMap["interruptible_media_types"] = lists.StringListToSet(settings.InterruptableMediaTypes) + settingsMap["maximum_capacity"] = mediaUtilization.MaximumCapacity + settingsMap["include_non_acd"] = mediaUtilization.IncludeNonAcd + if mediaUtilization.InterruptableMediaTypes != nil { + settingsMap["interruptible_media_types"] = lists.StringListToSet(*mediaUtilization.InterruptableMediaTypes) } return []interface{}{settingsMap} } -func FilterAndFlattenLabelUtilizations(labelUtilizations map[string]LabelUtilization, originalLabelUtilizations []interface{}) []interface{} { +func FilterAndFlattenLabelUtilizations(labelUtilizations map[string]platformclientv2.Labelutilizationresponse, originalLabelUtilizations []interface{}) []interface{} { flattenedLabelUtilizations := make([]interface{}, 0) for _, originalLabelUtilization := range originalLabelUtilizations { @@ -85,13 +89,13 @@ func FilterAndFlattenLabelUtilizations(labelUtilizations map[string]LabelUtiliza return flattenedLabelUtilizations } -func flattenLabelUtilization(labelId string, labelUtilization LabelUtilization) map[string]interface{} { +func flattenLabelUtilization(labelId string, labelUtilization platformclientv2.Labelutilizationresponse) map[string]interface{} { utilizationMap := make(map[string]interface{}) utilizationMap["label_id"] = labelId utilizationMap["maximum_capacity"] = labelUtilization.MaximumCapacity if labelUtilization.InterruptingLabelIds != nil { - utilizationMap["interrupting_label_ids"] = lists.StringListToSet(labelUtilization.InterruptingLabelIds) + utilizationMap["interrupting_label_ids"] = lists.StringListToSet(*labelUtilization.InterruptingLabelIds) } return utilizationMap @@ -118,18 +122,3 @@ func getSdkUtilizationTypes() []string { sort.Strings(types) return types } - -// TODO: remove when routing skill group is refactored -func buildHeaderParams(routingAPI *platformclientv2.RoutingApi) map[string]string { - headerParams := make(map[string]string) - - for key := range routingAPI.Configuration.DefaultHeader { - headerParams[key] = routingAPI.Configuration.DefaultHeader[key] - } - - headerParams["Authorization"] = "Bearer " + routingAPI.Configuration.AccessToken - headerParams["Content-Type"] = "application/json" - headerParams["Accept"] = "application/json" - - return headerParams -} diff --git a/genesyscloud/routing_utilization_label/data_source_genesyscloud_routing_utilization_label_test.go b/genesyscloud/routing_utilization_label/data_source_genesyscloud_routing_utilization_label_test.go index d30634274..857060d3b 100644 --- a/genesyscloud/routing_utilization_label/data_source_genesyscloud_routing_utilization_label_test.go +++ b/genesyscloud/routing_utilization_label/data_source_genesyscloud_routing_utilization_label_test.go @@ -18,12 +18,7 @@ func TestAccDataSourceRoutingUtilizationLabel(t *testing.T) { ) resource.Test(t, resource.TestCase{ - PreCheck: func() { - util.TestAccPreCheck(t) - if err := CheckIfLabelsAreEnabled(); err != nil { - t.Skipf("%v", err) // be sure to skip the test and not fail it - } - }, + PreCheck: func() { util.TestAccPreCheck(t) }, ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), Steps: []resource.TestStep{ { diff --git a/genesyscloud/routing_utilization_label/genesyscloud_routing_utilization_label_proxy.go b/genesyscloud/routing_utilization_label/genesyscloud_routing_utilization_label_proxy.go index fc19feb6c..ee8f5de3b 100644 --- a/genesyscloud/routing_utilization_label/genesyscloud_routing_utilization_label_proxy.go +++ b/genesyscloud/routing_utilization_label/genesyscloud_routing_utilization_label_proxy.go @@ -6,7 +6,7 @@ import ( "log" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *routingUtilizationLabelProxy @@ -127,7 +127,7 @@ func getRoutingUtilizationLabelByNameFn(ctx context.Context, p *routingUtilizati return nil, false, resp, fmt.Errorf("error retrieving routing utilization label by name %s", err) } - if labels == nil || len(*labels) == 0{ + if labels == nil || len(*labels) == 0 { return nil, true, resp, fmt.Errorf("no routing utilization labels found with name %s", name) } diff --git a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label.go b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label.go index c4ca7d422..755e6c358 100644 --- a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label.go +++ b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllRoutingUtilizationLabels(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_schema.go b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_schema.go index 92761f50a..39ad5e9e8 100644 --- a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_schema.go +++ b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_schema.go @@ -1,11 +1,14 @@ package routing_utilization_label import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "fmt" + "strings" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) const resourceName = "genesyscloud_routing_utilization_label" @@ -19,7 +22,7 @@ func SetRegistrar(regInstance registrar.Registrar) { func ResourceRoutingUtilizationLabel() *schema.Resource { return &schema.Resource{ - Description: "Genesys Cloud Routing Utilization Label. This resource is not yet widely available. Only use it if the feature is enabled.", + Description: "Genesys Cloud Routing Utilization Label.", CreateContext: provider.CreateWithPooledClient(createRoutingUtilizationLabel), ReadContext: provider.ReadWithPooledClient(readRoutingUtilizationLabel), @@ -33,7 +36,12 @@ func ResourceRoutingUtilizationLabel() *schema.Resource { "name": { Description: "Label name.", Type: schema.TypeString, - Required: true, + ValidateFunc: validation.All( + validation.StringIsNotEmpty, + stringDoesNotStartOrEndWithSpaces, + validation.StringDoesNotContainAny("*"), + ), + Required: true, }, }, } @@ -45,10 +53,14 @@ func DataSourceRoutingUtilizationLabel() *schema.Resource { ReadContext: provider.ReadWithPooledClient(dataSourceRoutingUtilizationLabelRead), Schema: map[string]*schema.Schema{ "name": { - Description: "Label name.", - Type: schema.TypeString, - ValidateFunc: validation.StringDoesNotContainAny("*"), - Required: true, + Description: "Label name.", + Type: schema.TypeString, + ValidateFunc: validation.All( + validation.StringIsNotEmpty, + stringDoesNotStartOrEndWithSpaces, + validation.StringDoesNotContainAny("*"), + ), + Required: true, }, }, } @@ -59,3 +71,16 @@ func RoutingUtilizationLabelExporter() *resourceExporter.ResourceExporter { GetResourcesFunc: provider.GetAllWithPooledClient(getAllRoutingUtilizationLabels), } } + +func stringDoesNotStartOrEndWithSpaces(input interface{}, k string) ([]string, []error) { + inputAsString, ok := input.(string) + if !ok { + return nil, []error{fmt.Errorf("expected type of %q to be string", k)} + } + + if len(strings.TrimSpace(inputAsString)) != len(inputAsString) { + return nil, []error{fmt.Errorf("expected %q to not start or end with spaces", k)} + } + + return nil, nil +} diff --git a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_test.go b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_test.go index 793fb3f3f..ca7b09718 100644 --- a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_test.go +++ b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_test.go @@ -2,6 +2,7 @@ package routing_utilization_label import ( "fmt" + "regexp" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "testing" @@ -9,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceRoutingUtilizationLabelBasic(t *testing.T) { @@ -20,12 +21,7 @@ func TestAccResourceRoutingUtilizationLabelBasic(t *testing.T) { ) resource.Test(t, resource.TestCase{ - PreCheck: func() { - util.TestAccPreCheck(t) - if err := CheckIfLabelsAreEnabled(); err != nil { - t.Skipf("%v", err) // be sure to skip the test and not fail it - } - }, + PreCheck: func() { util.TestAccPreCheck(t) }, ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), Steps: []resource.TestStep{ { @@ -61,6 +57,36 @@ func TestAccResourceRoutingUtilizationLabelBasic(t *testing.T) { }) } +func TestAccResourceRoutingUtilizationLabelInvalidNames(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { util.TestAccPreCheck(t) }, + ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), + Steps: []resource.TestStep{ + { + Config: GenerateRoutingUtilizationLabelResource("resource", " abc", ""), + ExpectError: regexp.MustCompile("to not start or end with spaces"), + }, + { + Config: GenerateRoutingUtilizationLabelResource("resource", "abc ", ""), + ExpectError: regexp.MustCompile("to not start or end with spaces"), + }, + { + Config: GenerateRoutingUtilizationLabelResource("resource", " abc ", ""), + ExpectError: regexp.MustCompile("to not start or end with spaces"), + }, + { + Config: GenerateRoutingUtilizationLabelResource("resource", "abc*", ""), + ExpectError: regexp.MustCompile("expected value of name to not contain any of"), + }, + { + Config: GenerateRoutingUtilizationLabelResource("resource", "", ""), + ExpectError: regexp.MustCompile("to not be an empty string"), + }, + }, + CheckDestroy: validateTestLabelDestroyed, + }) +} + func validateTestLabelDestroyed(state *terraform.State) error { routingApi := platformclientv2.NewRoutingApi() diff --git a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_utils.go b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_utils.go index 22322c59d..dcdae7656 100644 --- a/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_utils.go +++ b/genesyscloud/routing_utilization_label/resource_genesyscloud_routing_utilization_label_utils.go @@ -2,9 +2,7 @@ package routing_utilization_label import ( "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "strings" - "terraform-provider-genesyscloud/genesyscloud/provider" ) func GenerateRoutingUtilizationLabelResource(resourceID string, name string, dependsOnResource string) string { @@ -21,20 +19,6 @@ func GenerateRoutingUtilizationLabelResource(resourceID string, name string, dep `, resourceID, name, dependsOn) } -func CheckIfLabelsAreEnabled() error { // remove once the feature is globally enabled - sdkConfig, err := provider.AuthorizeSdk() - if err != nil { - return err - } - - api := platformclientv2.NewRoutingApiWithConfig(sdkConfig) - _, resp, _ := api.GetRoutingUtilizationLabels(100, 1, "", "") - if resp.StatusCode == 501 { - return fmt.Errorf("feature is not yet implemented in this org.") - } - return nil -} - func GenerateLabelUtilization( labelResource string, maxCapacity string, diff --git a/genesyscloud/scripts/genesyscloud_scripts_proxy.go b/genesyscloud/scripts/genesyscloud_scripts_proxy.go index 7f5a53860..03f44c83e 100644 --- a/genesyscloud/scripts/genesyscloud_scripts_proxy.go +++ b/genesyscloud/scripts/genesyscloud_scripts_proxy.go @@ -14,7 +14,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/files" "time" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/scripts/resource_genesyscloud_script.go b/genesyscloud/scripts/resource_genesyscloud_script.go index 53df15885..62d706f9c 100644 --- a/genesyscloud/scripts/resource_genesyscloud_script.go +++ b/genesyscloud/scripts/resource_genesyscloud_script.go @@ -12,7 +12,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/constants" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" diff --git a/genesyscloud/scripts/resource_genesyscloud_script_test.go b/genesyscloud/scripts/resource_genesyscloud_script_test.go index 23d3a7471..12c06e057 100644 --- a/genesyscloud/scripts/resource_genesyscloud_script_test.go +++ b/genesyscloud/scripts/resource_genesyscloud_script_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/station/data_source_genesyscloud_station_test.go b/genesyscloud/station/data_source_genesyscloud_station_test.go index 7ec255d4c..981c82bf6 100644 --- a/genesyscloud/station/data_source_genesyscloud_station_test.go +++ b/genesyscloud/station/data_source_genesyscloud_station_test.go @@ -62,7 +62,6 @@ func TestAccDataSourceStation(t *testing.T) { State: stateActive, SiteId: fmt.Sprintf("\"%s\"", defaultSiteId), PhoneBaseSettingsId: "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", - LineAddresses: nil, // no line addresses WebRtcUserId: "genesyscloud_user." + userRes1 + ".id", DependsOn: "", // no depends on }, diff --git a/genesyscloud/station/genesyscloud_station_init_test.go b/genesyscloud/station/genesyscloud_station_init_test.go index 9641ffcb3..0eb7ec81f 100644 --- a/genesyscloud/station/genesyscloud_station_init_test.go +++ b/genesyscloud/station/genesyscloud_station_init_test.go @@ -6,7 +6,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/provider" "testing" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" gcloud "terraform-provider-genesyscloud/genesyscloud" edgePhone "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_phone" diff --git a/genesyscloud/station/genesyscloud_station_proxy.go b/genesyscloud/station/genesyscloud_station_proxy.go index 7486790e1..8e744bdf8 100644 --- a/genesyscloud/station/genesyscloud_station_proxy.go +++ b/genesyscloud/station/genesyscloud_station_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // internalProxy holds a proxy instance that can be used throughout the package diff --git a/genesyscloud/task_management_workbin/genesyscloud_task_management_workbin_proxy.go b/genesyscloud/task_management_workbin/genesyscloud_task_management_workbin_proxy.go index acbe12980..dcce50592 100644 --- a/genesyscloud/task_management_workbin/genesyscloud_task_management_workbin_proxy.go +++ b/genesyscloud/task_management_workbin/genesyscloud_task_management_workbin_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin.go b/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin.go index 5b4c8a5f5..394e23a79 100644 --- a/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin.go +++ b/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin_test.go b/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin_test.go index b468918ea..731c143e8 100644 --- a/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin_test.go +++ b/genesyscloud/task_management_workbin/resource_genesyscloud_task_management_workbin_test.go @@ -12,7 +12,7 @@ import ( gcloud "terraform-provider-genesyscloud/genesyscloud" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workitem/genesyscloud_task_management_workitem_proxy.go b/genesyscloud/task_management_workitem/genesyscloud_task_management_workitem_proxy.go index 82aa8f0c4..cc3cd86d5 100644 --- a/genesyscloud/task_management_workitem/genesyscloud_task_management_workitem_proxy.go +++ b/genesyscloud/task_management_workitem/genesyscloud_task_management_workitem_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem.go b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem.go index 9f5494392..3abfa846d 100644 --- a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem.go +++ b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_test.go b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_test.go index c9d31132c..ae67f2425 100644 --- a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_test.go +++ b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_test.go @@ -23,7 +23,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_unit_test.go b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_unit_test.go index 591301bbb..6c53bb3dc 100644 --- a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_unit_test.go +++ b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_unit_test.go @@ -16,7 +16,7 @@ import ( lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_utils.go b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_utils.go index 6d3ab7ebf..505faf533 100644 --- a/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_utils.go +++ b/genesyscloud/task_management_workitem/resource_genesyscloud_task_management_workitem_utils.go @@ -9,7 +9,7 @@ import ( lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workitem_schema/genesyscloud_task_management_workitem_schema_proxy.go b/genesyscloud/task_management_workitem_schema/genesyscloud_task_management_workitem_schema_proxy.go index a93f33c34..309470b2d 100644 --- a/genesyscloud/task_management_workitem_schema/genesyscloud_task_management_workitem_schema_proxy.go +++ b/genesyscloud/task_management_workitem_schema/genesyscloud_task_management_workitem_schema_proxy.go @@ -8,7 +8,7 @@ import ( "log" "net/http" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema.go b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema.go index f96eba1df..5ed7bd9f5 100644 --- a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema.go +++ b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_test.go b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_test.go index f043ef040..3599174c3 100644 --- a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_test.go +++ b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_test.go @@ -15,7 +15,7 @@ import ( lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_unit_test.go b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_unit_test.go index d9914e3b1..7b5452778 100644 --- a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_unit_test.go +++ b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_unit_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" ) diff --git a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_utils.go b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_utils.go index 7594a8ccf..d7a5f0056 100644 --- a/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_utils.go +++ b/genesyscloud/task_management_workitem_schema/resource_genesyscloud_task_management_workitem_schema_utils.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/task_management_worktype/data_source_genesyscloud_task_management_unit_test.go b/genesyscloud/task_management_worktype/data_source_genesyscloud_task_management_unit_test.go index 6cfd137aa..0fa5a999a 100644 --- a/genesyscloud/task_management_worktype/data_source_genesyscloud_task_management_unit_test.go +++ b/genesyscloud/task_management_worktype/data_source_genesyscloud_task_management_unit_test.go @@ -2,12 +2,13 @@ package task_management_worktype import ( "context" + "terraform-provider-genesyscloud/genesyscloud/provider" + "testing" + "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" - "terraform-provider-genesyscloud/genesyscloud/provider" - "testing" ) // TestUnitataSourceTaskManagementWorktypeStatus tests the retrieve of a status id. diff --git a/genesyscloud/task_management_worktype/genesyscloud_task_management_worktype_proxy.go b/genesyscloud/task_management_worktype/genesyscloud_task_management_worktype_proxy.go index 5f5417369..c24b2bab2 100644 --- a/genesyscloud/task_management_worktype/genesyscloud_task_management_worktype_proxy.go +++ b/genesyscloud/task_management_worktype/genesyscloud_task_management_worktype_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype.go b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype.go index df9a05aa0..a322ff5c5 100644 --- a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype.go +++ b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/consistency_checker" diff --git a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_test.go b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_test.go index f796b484d..90bf04a63 100644 --- a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_test.go +++ b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_test.go @@ -18,7 +18,7 @@ import ( workitemSchema "terraform-provider-genesyscloud/genesyscloud/task_management_workitem_schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_unit_test.go b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_unit_test.go index aefbe1a22..4af168184 100644 --- a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_unit_test.go +++ b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_unit_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" ) diff --git a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_utils.go b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_utils.go index 79284a9b9..45a292407 100644 --- a/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_utils.go +++ b/genesyscloud/task_management_worktype/resource_genesyscloud_task_management_worktype_utils.go @@ -7,7 +7,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/team/genesyscloud_team_proxy.go b/genesyscloud/team/genesyscloud_team_proxy.go index 2880ca8c0..7feba34d9 100644 --- a/genesyscloud/team/genesyscloud_team_proxy.go +++ b/genesyscloud/team/genesyscloud_team_proxy.go @@ -6,7 +6,7 @@ import ( "log" "terraform-provider-genesyscloud/genesyscloud/util" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* @@ -129,6 +129,7 @@ func createTeamFn(ctx context.Context, p *teamProxy, team *platformclientv2.Team func getAllTeamFn(ctx context.Context, p *teamProxy, name string) (*[]platformclientv2.Team, *platformclientv2.APIResponse, error) { var ( after string + err error allTeams []platformclientv2.Team response *platformclientv2.APIResponse ) @@ -152,7 +153,7 @@ func getAllTeamFn(ctx context.Context, p *teamProxy, name string) (*[]platformcl break } - after, err := util.GetQueryParamValueFromUri(*teams.NextUri, "after") + after, err = util.GetQueryParamValueFromUri(*teams.NextUri, "after") if err != nil { return nil, resp, fmt.Errorf("unable to parse after cursor from teams next uri: %v", err) } diff --git a/genesyscloud/team/resource_genesyscloud_team.go b/genesyscloud/team/resource_genesyscloud_team.go index 2c6d8414e..dd3f6fbcd 100644 --- a/genesyscloud/team/resource_genesyscloud_team.go +++ b/genesyscloud/team/resource_genesyscloud_team.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" diff --git a/genesyscloud/team/resource_genesyscloud_team_test.go b/genesyscloud/team/resource_genesyscloud_team_test.go index 03bede55f..edf5e83db 100644 --- a/genesyscloud/team/resource_genesyscloud_team_test.go +++ b/genesyscloud/team/resource_genesyscloud_team_test.go @@ -2,15 +2,16 @@ package team import ( "fmt" - "github.com/google/uuid" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "math/rand" "strings" "terraform-provider-genesyscloud/genesyscloud/provider" "terraform-provider-genesyscloud/genesyscloud/util" "testing" + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + gcloud "terraform-provider-genesyscloud/genesyscloud" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/genesyscloud/team/resource_genesyscloud_team_unit_test.go b/genesyscloud/team/resource_genesyscloud_team_unit_test.go index 3b3e670cb..c3e8650ea 100644 --- a/genesyscloud/team/resource_genesyscloud_team_unit_test.go +++ b/genesyscloud/team/resource_genesyscloud_team_unit_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/stretchr/testify/assert" ) diff --git a/genesyscloud/team/resource_genesyscloud_team_utils.go b/genesyscloud/team/resource_genesyscloud_team_utils.go index 8c926b239..6f5a7f976 100644 --- a/genesyscloud/team/resource_genesyscloud_team_utils.go +++ b/genesyscloud/team/resource_genesyscloud_team_utils.go @@ -3,14 +3,16 @@ package team import ( "context" "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "strings" "terraform-provider-genesyscloud/genesyscloud/util" "terraform-provider-genesyscloud/genesyscloud/util/chunks" "terraform-provider-genesyscloud/genesyscloud/util/lists" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // getTeamFromResourceData maps data from schema ResourceData object to a platformclientv2.Team diff --git a/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings.go b/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings.go index e81844e03..6d4a7a125 100644 --- a/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings.go +++ b/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings_test.go b/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings_test.go index d0a1ecab1..e2210b361 100644 --- a/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings_test.go +++ b/genesyscloud/telephony/resource_genesyscloud_telephony_providers_edges_trunkbasesettings_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceTrunkBaseSettings(t *testing.T) { diff --git a/genesyscloud/telephony_providers_edges_did/genesyscloud_telephony_providers_edges_did_proxy.go b/genesyscloud/telephony_providers_edges_did/genesyscloud_telephony_providers_edges_did_proxy.go index 553f33454..931f3d720 100644 --- a/genesyscloud/telephony_providers_edges_did/genesyscloud_telephony_providers_edges_did_proxy.go +++ b/genesyscloud/telephony_providers_edges_did/genesyscloud_telephony_providers_edges_did_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_did_pool/genesyscloud_telephony_providers_edges_did_pool_proxy.go b/genesyscloud/telephony_providers_edges_did_pool/genesyscloud_telephony_providers_edges_did_pool_proxy.go index 65d2cdb54..be410c042 100644 --- a/genesyscloud/telephony_providers_edges_did_pool/genesyscloud_telephony_providers_edges_did_pool_proxy.go +++ b/genesyscloud/telephony_providers_edges_did_pool/genesyscloud_telephony_providers_edges_did_pool_proxy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool.go b/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool.go index a0a870405..b666afff3 100644 --- a/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool.go +++ b/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) // getAllDidPools retrieves all DID pools and is used for the exporter diff --git a/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_test.go b/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_test.go index 184070128..8ae609857 100644 --- a/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_test.go +++ b/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceDidPoolBasic(t *testing.T) { diff --git a/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_utils.go b/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_utils.go index 2f7ffa5c9..bc4f14a10 100644 --- a/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_utils.go +++ b/genesyscloud/telephony_providers_edges_did_pool/resource_genesyscloud_telephony_providers_edges_did_pool_utils.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type DidPoolStruct struct { diff --git a/genesyscloud/telephony_providers_edges_edge_group/genesyscloud_telephony_providers_edges_edge_group_proxy.go b/genesyscloud/telephony_providers_edges_edge_group/genesyscloud_telephony_providers_edges_edge_group_proxy.go index 6db0ceb02..8dbbf2440 100644 --- a/genesyscloud/telephony_providers_edges_edge_group/genesyscloud_telephony_providers_edges_edge_group_proxy.go +++ b/genesyscloud/telephony_providers_edges_edge_group/genesyscloud_telephony_providers_edges_edge_group_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *edgeGroupProxy diff --git a/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group.go b/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group.go index 45882bed4..77616d81c 100644 --- a/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group.go +++ b/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func createEdgeGroup(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_test.go b/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_test.go index 6c0968e95..c0d722626 100644 --- a/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_test.go +++ b/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceEdgeGroup(t *testing.T) { diff --git a/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_utils.go b/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_utils.go index 6089618c0..1b3883f0a 100644 --- a/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_utils.go +++ b/genesyscloud/telephony_providers_edges_edge_group/resource_genesyscloud_telephony_providers_edges_edge_group_utils.go @@ -6,7 +6,7 @@ import ( lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildSdkTrunkBases(d *schema.ResourceData) *[]platformclientv2.Trunkbase { diff --git a/genesyscloud/telephony_providers_edges_extension_pool/genesyscloud_telephony_providers_edges_extension_pool_proxy.go b/genesyscloud/telephony_providers_edges_extension_pool/genesyscloud_telephony_providers_edges_extension_pool_proxy.go index 21de47b35..1cea85894 100644 --- a/genesyscloud/telephony_providers_edges_extension_pool/genesyscloud_telephony_providers_edges_extension_pool_proxy.go +++ b/genesyscloud/telephony_providers_edges_extension_pool/genesyscloud_telephony_providers_edges_extension_pool_proxy.go @@ -3,7 +3,7 @@ package telephony_providers_edges_extension_pool import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *extensionPoolProxy diff --git a/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool.go b/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool.go index 4cbe729b1..49c20d856 100644 --- a/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool.go +++ b/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllExtensionPools(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool_test.go b/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool_test.go index 84a0d93a0..80d602e94 100644 --- a/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool_test.go +++ b/genesyscloud/telephony_providers_edges_extension_pool/resource_genesyscloud_telephony_providers_edges_extension_pool_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type extensionPoolStruct struct { diff --git a/genesyscloud/telephony_providers_edges_linebasesettings/data_source_genesyscloud_telephony_providers_edges_linebasesettings.go b/genesyscloud/telephony_providers_edges_linebasesettings/data_source_genesyscloud_telephony_providers_edges_linebasesettings.go index 912f7a8b7..90d8bdd81 100644 --- a/genesyscloud/telephony_providers_edges_linebasesettings/data_source_genesyscloud_telephony_providers_edges_linebasesettings.go +++ b/genesyscloud/telephony_providers_edges_linebasesettings/data_source_genesyscloud_telephony_providers_edges_linebasesettings.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceLineBaseSettingsRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { diff --git a/genesyscloud/telephony_providers_edges_phone/data_source_genesyscloud_telephony_providers_edges_phone_test.go b/genesyscloud/telephony_providers_edges_phone/data_source_genesyscloud_telephony_providers_edges_phone_test.go index 1d3ed67b6..9d3bb4dc6 100644 --- a/genesyscloud/telephony_providers_edges_phone/data_source_genesyscloud_telephony_providers_edges_phone_test.go +++ b/genesyscloud/telephony_providers_edges_phone/data_source_genesyscloud_telephony_providers_edges_phone_test.go @@ -66,7 +66,6 @@ func TestAccDataSourcePhone(t *testing.T) { stateActive, fmt.Sprintf("\"%s\"", defaultSiteId), "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", - nil, // no line addresses "genesyscloud_user." + userRes1 + ".id", "", // no depends on }, diff --git a/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_init_test.go b/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_init_test.go index ddfe3a1b9..8eaeab5cd 100644 --- a/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_init_test.go +++ b/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_init_test.go @@ -10,7 +10,7 @@ import ( edgeSite "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site" "testing" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) diff --git a/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go b/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go index 648447fb6..3ff4089c9 100644 --- a/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go +++ b/genesyscloud/telephony_providers_edges_phone/genesyscloud_telephony_providers_edges_phone_proxy.go @@ -8,7 +8,7 @@ import ( rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone.go b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone.go index 64cee7cfa..e989f2b5d 100644 --- a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone.go +++ b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllPhones(ctx context.Context, sdkConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { @@ -110,7 +110,7 @@ func readPhone(ctx context.Context, d *schema.ResourceData, meta interface{}) di } if currentPhone.Lines != nil { - _ = d.Set("line_addresses", flattenPhoneLines(currentPhone.Lines)) + resourcedata.SetNillableValueWithInterfaceArrayWithFunc(d, "line_properties", currentPhone.Lines, flattenLines) } _ = d.Set("properties", nil) diff --git a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go index 489a269b7..7caff939d 100644 --- a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go +++ b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_schema.go @@ -30,6 +30,24 @@ func SetRegistrar(l registrar.Registrar) { // ResourcePhone registers the genesyscloud_telephony_providers_edges_phone resource with Terraform func ResourcePhone() *schema.Resource { + lineProperties := &schema.Resource{ + Schema: map[string]*schema.Schema{ + `line_address`: { + Description: `DID for standalone phones. Each phone number must be in an E.164 phone number format.`, + Optional: true, + Computed: true, + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString, ValidateDiagFunc: validators.ValidatePhoneNumber}, + }, + `remote_address`: { + Description: `Station remote property for phones. No validation is provided`, + Optional: true, + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString, ValidateFunc: validation.StringIsNotEmpty}, + }, + }, + } + phoneCapabilities := &schema.Resource{ Schema: map[string]*schema.Schema{ "provisions": { @@ -135,13 +153,6 @@ func ResourcePhone() *schema.Resource { Type: schema.TypeString, Optional: true, }, - "line_addresses": { - Description: "Ordered list of Line DIDs for standalone phones. Each phone number must be in an E.164 phone number format.", - Type: schema.TypeList, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString, ValidateDiagFunc: validators.ValidatePhoneNumber}, - }, "properties": { Description: "phone properties", Type: schema.TypeString, @@ -149,6 +160,13 @@ func ResourcePhone() *schema.Resource { Computed: true, DiffSuppressFunc: util.SuppressEquivalentJsonDiffs, }, + "line_properties": { + Description: "line properties", + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: lineProperties, + }, "capabilities": { Description: "Phone Capabilities.", Type: schema.TypeList, diff --git a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_test.go b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_test.go index c01d7e3ed..f9955feea 100644 --- a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_test.go +++ b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_test.go @@ -17,7 +17,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourcePhoneBasic(t *testing.T) { @@ -89,7 +89,6 @@ func TestAccResourcePhoneBasic(t *testing.T) { stateActive, fmt.Sprintf("\"%s\"", siteId), "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", - nil, // no line addresses "genesyscloud_user." + userRes1 + ".id", "", // no depends on }, @@ -120,7 +119,6 @@ func TestAccResourcePhoneBasic(t *testing.T) { stateActive, fmt.Sprintf("\"%s\"", siteId), "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes2 + ".id", - nil, // no line addresses "genesyscloud_user." + userRes2 + ".id", "", // no depends_on }, @@ -187,10 +185,9 @@ func TestAccResourcePhoneBasic(t *testing.T) { } func TestAccResourcePhoneStandalone(t *testing.T) { - number := "+12005538112" - deleteDidPoolWithNumber(number) + lineAddresses := "+12005538112" + deleteDidPoolWithNumber(lineAddresses) didPoolResource1 := "test-didpool1" - lineAddresses := []string{number} phoneRes := "phone_standalone1234" name1 := "test-phone-standalone_" + uuid.NewString() stateActive := "active" @@ -257,8 +254,8 @@ func TestAccResourcePhoneStandalone(t *testing.T) { }, Config: didPool.GenerateDidPoolResource(&didPool.DidPoolStruct{ ResourceID: didPoolResource1, - StartPhoneNumber: lineAddresses[0], - EndPhoneNumber: lineAddresses[0], + StartPhoneNumber: lineAddresses, + EndPhoneNumber: lineAddresses, Description: util.NullValue, // No description Comments: util.NullValue, // No comments PoolProvider: util.NullValue, // No provider @@ -273,17 +270,16 @@ func TestAccResourcePhoneStandalone(t *testing.T) { stateActive, "genesyscloud_telephony_providers_edges_site." + siteRes + ".id", "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", - lineAddresses, "", // no web rtc user "genesyscloud_telephony_providers_edges_did_pool." + didPoolResource1, - }, capabilities, generatePhoneProperties(uuid.NewString())), + }, capabilities, generateLineProperties(strconv.Quote(lineAddresses), ""), generatePhoneProperties(uuid.NewString())), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "name", name1), resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "state", stateActive), resource.TestCheckResourceAttrPair("genesyscloud_telephony_providers_edges_phone."+phoneRes, "site_id", "genesyscloud_telephony_providers_edges_site."+siteRes, "id"), resource.TestCheckResourceAttrPair("genesyscloud_telephony_providers_edges_phone."+phoneRes, "line_base_settings_id", "genesyscloud_telephony_providers_edges_phonebasesettings."+phoneBaseSettingsRes, "line_base_settings_id"), resource.TestCheckResourceAttrPair("genesyscloud_telephony_providers_edges_phone."+phoneRes, "phone_base_settings_id", "genesyscloud_telephony_providers_edges_phonebasesettings."+phoneBaseSettingsRes, "id"), - resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "line_addresses.0", lineAddresses[0]), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "line_properties.0.line_address.0", lineAddresses), resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.provisions", util.FalseValue), resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.registers", util.TrueValue), resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.dual_registers", util.TrueValue), @@ -388,7 +384,6 @@ func TestAccResourceHardPhoneStandalone(t *testing.T) { stateActive, "genesyscloud_telephony_providers_edges_site." + siteRes + ".id", "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", - []string{}, "", // no web rtc user "", // no Depends On }, capabilities, generatePhoneProperties(phoneMac)) @@ -400,7 +395,6 @@ func TestAccResourceHardPhoneStandalone(t *testing.T) { stateActive, "genesyscloud_telephony_providers_edges_site." + siteRes + ".id", "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", - []string{}, "", // no web rtc user "", // no Depends On }, capabilities, generatePhoneProperties(phoneMacUpdated)) @@ -444,6 +438,117 @@ func TestAccResourceHardPhoneStandalone(t *testing.T) { CheckDestroy: TestVerifyWebRtcPhoneDestroyed, }) } + +func TestAccResourcePhoneStandaloneRemoteStation(t *testing.T) { + remoteStationAddress := "+11005538454" + phoneRes := "phone_standalone1234" + name1 := "test-phone-Kstandalone_" + uuid.NewString() + stateActive := "active" + phoneBaseSettingsRes := "phoneBaseSettings1234" + phoneBaseSettingsName := "phoneBaseSettings " + uuid.NewString() + + locationRes := "test-location" + + emergencyNumber := "+13173114164" + if err := edgeSite.DeleteLocationWithNumber(emergencyNumber, sdkConfig); err != nil { + t.Skipf("failed to delete location with number %s: %v", emergencyNumber, err) + } + + locationConfig := gcloud.GenerateLocationResource( + locationRes, + "TerraformLocationRemote"+uuid.NewString(), + "HQ1", + []string{}, + gcloud.GenerateLocationEmergencyNum( + emergencyNumber, + util.NullValue, // Default number type + ), gcloud.GenerateLocationAddress( + "0176 Interactive Way", + "Indianapolis", + "IN", + "US", + "46279", + )) + + siteRes := "test-site" + siteConfig := edgeSite.GenerateSiteResourceWithCustomAttrs( + siteRes, + "tf site "+uuid.NewString(), + "test site description", + "genesyscloud_location."+locationRes+".id", + "Premises", + false, + `["us-east-1"]`, + util.NullValue, + util.NullValue, + "primary_sites = []", + "secondary_sites = []", + ) + + capabilities := generatePhoneCapabilities( + false, + true, + true, + true, + true, + false, + true, + "mac", + []string{}, + ) + + config := phoneBaseSettings.GeneratePhoneBaseSettingsResourceWithCustomAttrs( + phoneBaseSettingsRes, + phoneBaseSettingsName, + "phoneBaseSettings description", + "generic_sip.json", + ) + GeneratePhoneResourceWithCustomAttrs(&PhoneConfig{ + phoneRes, + name1, + stateActive, + "genesyscloud_telephony_providers_edges_site." + siteRes + ".id", + "genesyscloud_telephony_providers_edges_phonebasesettings." + phoneBaseSettingsRes + ".id", + "", // no web rtc user + "", // no depends on + }, capabilities, generateLineProperties("", strconv.Quote(remoteStationAddress)), generatePhoneProperties(uuid.NewString())) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { util.TestAccPreCheck(t) }, + ProviderFactories: provider.GetProviderFactories(providerResources, providerDataSources), + Steps: []resource.TestStep{ + { + PreConfig: func() { + time.Sleep(30 * time.Second) + }, + Config: locationConfig + siteConfig + config, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "name", name1), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "state", stateActive), + resource.TestCheckResourceAttrPair("genesyscloud_telephony_providers_edges_phone."+phoneRes, "site_id", "genesyscloud_telephony_providers_edges_site."+siteRes, "id"), + resource.TestCheckResourceAttrPair("genesyscloud_telephony_providers_edges_phone."+phoneRes, "line_base_settings_id", "genesyscloud_telephony_providers_edges_phonebasesettings."+phoneBaseSettingsRes, "line_base_settings_id"), + resource.TestCheckResourceAttrPair("genesyscloud_telephony_providers_edges_phone."+phoneRes, "phone_base_settings_id", "genesyscloud_telephony_providers_edges_phonebasesettings."+phoneBaseSettingsRes, "id"), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "line_properties.0.remote_address.0", remoteStationAddress), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.provisions", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.registers", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.dual_registers", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.allow_reboot", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.no_rebalance", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.no_cloud_provisioning", util.FalseValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.cdm", util.TrueValue), + resource.TestCheckResourceAttr("genesyscloud_telephony_providers_edges_phone."+phoneRes, "capabilities.0.hardware_id_type", "mac"), + ), + }, + { + // Import/Read + ResourceName: "genesyscloud_telephony_providers_edges_phone." + phoneRes, + ImportState: true, + ImportStateVerify: true, + }, + }, + CheckDestroy: TestVerifyWebRtcPhoneDestroyed, + }) +} + func generatePhoneCapabilities( provisions, registers, diff --git a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_utils.go b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_utils.go index 7545851fe..3ff097d5b 100644 --- a/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_utils.go +++ b/genesyscloud/telephony_providers_edges_phone/resource_genesyscloud_telephony_providers_edges_phone_utils.go @@ -13,12 +13,11 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type PhoneConfig struct { @@ -27,7 +26,6 @@ type PhoneConfig struct { State string SiteId string PhoneBaseSettingsId string - LineAddresses []string WebRtcUserId string DependsOn string } @@ -50,18 +48,21 @@ func getPhoneFromResourceData(ctx context.Context, pp *phoneProxy, d *schema.Res if lineBaseSettingsID == "" { lineBaseSettingsID, err = getLineBaseSettingsID(ctx, pp, *phoneConfig.PhoneBaseSettings.Id) if err != nil { - return nil, fmt.Errorf("failed to get line base settings for %s: %s", *phoneConfig.Name, err) + return phoneConfig, fmt.Errorf("failed to get line base settings for %s: %s", *phoneConfig.Name, err) } } lineBaseSettings := &platformclientv2.Domainentityref{Id: &lineBaseSettingsID} - lines, isStandalone := buildSdkLines(ctx, pp, d, lineBaseSettings) + lines, isStandalone, lineError := buildSdkLines(ctx, pp, d, lineBaseSettings) + if lineError != nil { + return phoneConfig, fmt.Errorf("failed to create lines for %s: %s", *phoneConfig.Name, lineError) + } phoneConfig.LineBaseSettings = lineBaseSettings phoneConfig.Lines = lines // phone meta base phoneMetaBaseId, err := getPhoneMetaBaseId(ctx, pp, *phoneConfig.PhoneBaseSettings.Id) if err != nil { - return nil, fmt.Errorf("failed to get phone meta base for %s: %s", *phoneConfig.Name, err) + return phoneConfig, fmt.Errorf("failed to get phone meta base for %s: %s", *phoneConfig.Name, err) } phoneMetaBase := &platformclientv2.Domainentityref{ Id: &phoneMetaBaseId, @@ -165,34 +166,6 @@ func getPhoneMetaBaseId(ctx context.Context, pp *phoneProxy, phoneBaseSettingsId return *phoneBase.PhoneMetaBase.Id, nil } -func flattenPhoneLines(lines *[]platformclientv2.Line) []string { - if lines == nil { - return nil - } - - lineAddressList := []string{} - for i := 0; i < len(*lines); i++ { - line := (*lines)[i] - did := "" - if line.Properties == nil { - continue - } - if k := (*line.Properties)["station_identity_address"]; k != nil { - didI := k.(map[string]interface{})["value"].(map[string]interface{})["instance"] - if didI != nil { - did = didI.(string) - } - } - - if len(did) == 0 { - continue - } - lineAddressList = append(lineAddressList, did) - } - - return lineAddressList -} - func flattenPhoneCapabilities(capabilities *platformclientv2.Phonecapabilities) []interface{} { if capabilities == nil { return nil @@ -212,45 +185,99 @@ func flattenPhoneCapabilities(capabilities *platformclientv2.Phonecapabilities) return []interface{}{capabilitiesMap} } -func buildSdkLines(ctx context.Context, pp *phoneProxy, d *schema.ResourceData, lineBaseSettings *platformclientv2.Domainentityref) (linesPtr *[]platformclientv2.Line, isStandAlone bool) { +func buildSdkLines(ctx context.Context, pp *phoneProxy, d *schema.ResourceData, lineBaseSettings *platformclientv2.Domainentityref) (linesPtr *[]platformclientv2.Line, isStandAlone bool, err error) { lines := []platformclientv2.Line{} + lineAddress, remoteAddress := getLineProperties(d) + if len(*lineAddress) > 0 && len(*remoteAddress) > 0 { + return linesPtr, false, fmt.Errorf("remote stations cannot be standalone phones, line_address and remote_address cannot exist at the same time") + } + if len(*lineAddress) > 0 { + linesPtr = createStandalonePhoneLines(*lineAddress, &lines, lineBaseSettings) + isStandAlone = true + return linesPtr, isStandAlone, nil + } + if len(*remoteAddress) > 0 { + linesPtr = createNonStandalonePhoneLine(*remoteAddress, &lines, lineBaseSettings) + isStandAlone = false + return linesPtr, isStandAlone, nil + } + // If line_addresses is not provided, phone is not standalone + hasher := fnv.New32() + hasher.Write([]byte(d.Get("name").(string))) + lineName := "line_" + *lineBaseSettings.Id + fmt.Sprintf("%x", hasher.Sum32()) + line := platformclientv2.Line{ + Name: &lineName, + LineBaseSettings: lineBaseSettings, + } + // If this function is invoked on a phone create, the ID won't exist yet + if d.Id() != "" { + lineId, err := getLineIdByPhoneId(ctx, pp, d.Id()) + if err != nil { + log.Printf("Failed to retrieve ID for phone %s: %v", d.Id(), err) + } else { + line.Id = &lineId + } + } + lines = append(lines, line) + linesPtr = &lines isStandAlone = false + return linesPtr, isStandAlone, nil +} - lineAddresses, ok := d.GetOk("line_addresses") - lineStringList := lists.InterfaceListToStrings(lineAddresses.([]interface{})) +func getLineProperties(d *schema.ResourceData) (*[]interface{}, *[]interface{}) { + lineAddress := make([]interface{}, 0) + remoteAddress := make([]interface{}, 0) + linePropertiesMap := make(map[string]interface{}) + if linePropertiesObject, ok := d.Get("line_properties").([]interface{}); ok && len(linePropertiesObject) > 0 { + linePropertiesMap = linePropertiesObject[0].(map[string]interface{}) + } + if lineAddressObject, ok := linePropertiesMap["line_address"].([]interface{}); ok { + lineAddress = lineAddressObject + } + if remoteAddressObject, ok := linePropertiesMap["remote_address"].([]interface{}); ok { + remoteAddress = remoteAddressObject + } + return &lineAddress, &remoteAddress +} - // If line_addresses is not provided, phone is not standalone - if !ok || len(lineStringList) == 0 { - hasher := fnv.New32() - hasher.Write([]byte(d.Get("name").(string))) - lineName := "line_" + *lineBaseSettings.Id + fmt.Sprintf("%x", hasher.Sum32()) - line := platformclientv2.Line{ +func generatePhoneProperties(hardware_id string) string { + // A random selection of properties + return "properties = " + util.GenerateJsonEncodedProperties( + util.GenerateJsonProperty( + "phone_hardwareId", util.GenerateJsonObject( + util.GenerateJsonProperty( + "value", util.GenerateJsonObject( + util.GenerateJsonProperty("instance", strconv.Quote(hardware_id)), + )))), + ) +} +func createNonStandalonePhoneLine(remoteAddress []interface{}, linesPtr *[]platformclientv2.Line, lineBaseSettings *platformclientv2.Domainentityref) *[]platformclientv2.Line { + lines := *linesPtr + for i, eachAddress := range remoteAddress { + lineName := "line_" + *lineBaseSettings.Id + "_" + strconv.Itoa(i+1) + properties := map[string]interface{}{ + "station_remote_address": &map[string]interface{}{ + "value": &map[string]interface{}{ + "instance": eachAddress.(string), + }, + }, + } + lines = append(lines, platformclientv2.Line{ Name: &lineName, LineBaseSettings: lineBaseSettings, - } - - // If this function is invoked on a phone create, the ID won't exist yet - if d.Id() != "" { - lineId, err := getLineIdByPhoneId(ctx, pp, d.Id()) - if err != nil { - log.Printf("Failed to retrieve ID for phone %s: %v", d.Id(), err) - } else { - line.Id = &lineId - } - } - - lines = append(lines, line) - - linesPtr = &lines - return + Properties: &properties, + }) } - - for i := 0; i < len(lineStringList); i++ { + return &lines +} +func createStandalonePhoneLines(lineAddress []interface{}, linesPtr *[]platformclientv2.Line, lineBaseSettings *platformclientv2.Domainentityref) *[]platformclientv2.Line { + lines := *linesPtr + for i, eachLineAddress := range lineAddress { lineName := "line_" + *lineBaseSettings.Id + "_" + strconv.Itoa(i+1) properties := map[string]interface{}{ "station_identity_address": &map[string]interface{}{ "value": &map[string]interface{}{ - "instance": (lineStringList)[i], + "instance": eachLineAddress.(string), }, }, } @@ -260,11 +287,75 @@ func buildSdkLines(ctx context.Context, pp *phoneProxy, d *schema.ResourceData, Properties: &properties, }) } + return &lines +} - linesPtr = &lines - isStandAlone = true +func flattenLines(phoneLines *[]platformclientv2.Line) []interface{} { + if len(*phoneLines) == 0 { + return nil + } + lineAddressList := []string{} + remoteAddressList := []string{} + linePropertiesMap := make(map[string]interface{}) + + for _, phoneLine := range *phoneLines { + if phoneLine.Properties == nil { + continue + } + if idAddressKey := (*phoneLine.Properties)["station_identity_address"]; idAddressKey != nil { + didI := idAddressKey.(map[string]interface{})["value"].(map[string]interface{})["instance"] + if didI != nil && len(didI.(string)) > 0 { + did := didI.(string) + lineAddressList = append(lineAddressList, did) - return + } + } + if remoteAddressKey := (*phoneLine.Properties)["station_remote_address"]; remoteAddressKey != nil { + remoteAddress := remoteAddressKey.(map[string]interface{})["value"].(map[string]interface{})["instance"] + if remoteAddress != nil && len(remoteAddress.(string)) > 0 { + remoteAddressStr := remoteAddress.(string) + remoteAddressList = append(remoteAddressList, remoteAddressStr) + } + } + + } + + if len(lineAddressList) > 0 { + resourcedata.SetMapValueIfNotNil(linePropertiesMap, "line_address", &lineAddressList) + } + if len(remoteAddressList) > 0 { + resourcedata.SetMapValueIfNotNil(linePropertiesMap, "remote_address", &remoteAddressList) + } + if len(linePropertiesMap) > 0 { + return []interface{}{linePropertiesMap} + + } + return nil +} + +func generateLineProperties(lineAddress string, remoteAddress string) string { + if lineAddress == "" { + return fmt.Sprintf(` + line_properties { + remote_address = [%s] + } + `, remoteAddress) + } + + if remoteAddress == "" { + return fmt.Sprintf(` + line_properties { + line_address = [%s] + } + `, lineAddress) + } + + return fmt.Sprintf(` + line_properties { + line_address = [%s] + remote_address = [%s] + } +`, lineAddress, remoteAddress) } func getLineIdByPhoneId(ctx context.Context, pp *phoneProxy, phoneId string) (string, error) { @@ -318,10 +409,6 @@ func buildSdkCapabilities(d *schema.ResourceData) *platformclientv2.Phonecapabil } func GeneratePhoneResourceWithCustomAttrs(config *PhoneConfig, otherAttrs ...string) string { - lineStrs := make([]string, len(config.LineAddresses)) - for i, val := range config.LineAddresses { - lineStrs[i] = fmt.Sprintf("\"%s\"", val) - } webRtcUser := "" if len(config.WebRtcUserId) != 0 { @@ -333,7 +420,6 @@ func GeneratePhoneResourceWithCustomAttrs(config *PhoneConfig, otherAttrs ...str state = "%s" site_id = %s phone_base_settings_id = %s - line_addresses = [%s] depends_on=[%s] %s %s @@ -343,7 +429,6 @@ func GeneratePhoneResourceWithCustomAttrs(config *PhoneConfig, otherAttrs ...str config.State, config.SiteId, config.PhoneBaseSettingsId, - strings.Join(lineStrs, ","), config.DependsOn, webRtcUser, strings.Join(otherAttrs, "\n"), @@ -373,15 +458,3 @@ func TestVerifyWebRtcPhoneDestroyed(state *terraform.State) error { //Success. Phone destroyed return nil } - -func generatePhoneProperties(hardware_id string) string { - // A random selection of properties - return "properties = " + util.GenerateJsonEncodedProperties( - util.GenerateJsonProperty( - "phone_hardwareId", util.GenerateJsonObject( - util.GenerateJsonProperty( - "value", util.GenerateJsonObject( - util.GenerateJsonProperty("instance", strconv.Quote(hardware_id)), - )))), - ) -} diff --git a/genesyscloud/telephony_providers_edges_phonebasesettings/data_source_genesyscloud_telephony_providers_edges_phonebasesettings.go b/genesyscloud/telephony_providers_edges_phonebasesettings/data_source_genesyscloud_telephony_providers_edges_phonebasesettings.go index ddbafa09b..89d87eee5 100644 --- a/genesyscloud/telephony_providers_edges_phonebasesettings/data_source_genesyscloud_telephony_providers_edges_phonebasesettings.go +++ b/genesyscloud/telephony_providers_edges_phonebasesettings/data_source_genesyscloud_telephony_providers_edges_phonebasesettings.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourcePhoneBaseSettingsRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { diff --git a/genesyscloud/telephony_providers_edges_phonebasesettings/genesyscloud_telephony_providers_edges_phonebasesettings_proxy.go b/genesyscloud/telephony_providers_edges_phonebasesettings/genesyscloud_telephony_providers_edges_phonebasesettings_proxy.go index 47093078c..7fe288706 100644 --- a/genesyscloud/telephony_providers_edges_phonebasesettings/genesyscloud_telephony_providers_edges_phonebasesettings_proxy.go +++ b/genesyscloud/telephony_providers_edges_phonebasesettings/genesyscloud_telephony_providers_edges_phonebasesettings_proxy.go @@ -3,7 +3,7 @@ package telephony_providers_edges_phonebasesettings import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *phoneBaseProxy diff --git a/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings.go b/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings.go index 3ac3ed4dd..65e682d22 100644 --- a/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings.go +++ b/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func createPhoneBaseSettings(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_test.go b/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_test.go index 864dc06f4..b3c0eb40d 100644 --- a/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_test.go +++ b/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourcePhoneBaseSettings(t *testing.T) { diff --git a/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_utils.go b/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_utils.go index 9cd0bc6be..7cd2824ac 100644 --- a/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_utils.go +++ b/genesyscloud/telephony_providers_edges_phonebasesettings/resource_genesyscloud_telephony_providers_edges_phonebasesettings_utils.go @@ -7,7 +7,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func generatePhoneBaseSettingsDataSource( diff --git a/genesyscloud/telephony_providers_edges_site/data_source_genesyscloud_telephony_providers_edges_site_test.go b/genesyscloud/telephony_providers_edges_site/data_source_genesyscloud_telephony_providers_edges_site_test.go index 1ca6a3319..de32d841f 100644 --- a/genesyscloud/telephony_providers_edges_site/data_source_genesyscloud_telephony_providers_edges_site_test.go +++ b/genesyscloud/telephony_providers_edges_site/data_source_genesyscloud_telephony_providers_edges_site_test.go @@ -7,7 +7,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util" "testing" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" gcloud "terraform-provider-genesyscloud/genesyscloud" diff --git a/genesyscloud/telephony_providers_edges_site/genesyscloud_telephony_providers_edges_site_proxy.go b/genesyscloud/telephony_providers_edges_site/genesyscloud_telephony_providers_edges_site_proxy.go index bd7b487ee..12ec0e4d8 100644 --- a/genesyscloud/telephony_providers_edges_site/genesyscloud_telephony_providers_edges_site_proxy.go +++ b/genesyscloud/telephony_providers_edges_site/genesyscloud_telephony_providers_edges_site_proxy.go @@ -5,7 +5,7 @@ import ( "fmt" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site.go b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site.go index 5297248fe..23208cad9 100644 --- a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site.go +++ b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllSites(ctx context.Context, sdkConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_schema.go b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_schema.go index db12e288d..55b4e51b1 100644 --- a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_schema.go +++ b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_schema.go @@ -2,13 +2,14 @@ package telephony_providers_edges_site import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" registrar "terraform-provider-genesyscloud/genesyscloud/resource_register" "terraform-provider-genesyscloud/genesyscloud/validators" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_test.go b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_test.go index d601105cc..e44edd2d8 100644 --- a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_test.go +++ b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_test.go @@ -18,7 +18,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceSite(t *testing.T) { diff --git a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_utils.go b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_utils.go index 4cfd92d46..2fbbae030 100644 --- a/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_utils.go +++ b/genesyscloud/telephony_providers_edges_site/resource_genesyscloud_telephony_providers_edges_site_utils.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/leekchan/timeutil" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var ( diff --git a/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_init_test.go b/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_init_test.go index dfa9e4042..9f07f2aa9 100644 --- a/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_init_test.go +++ b/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_init_test.go @@ -1,8 +1,6 @@ package telephony_providers_edges_site_outbound_route import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "log" "sync" gcloud "terraform-provider-genesyscloud/genesyscloud" @@ -10,6 +8,9 @@ import ( "terraform-provider-genesyscloud/genesyscloud/telephony" "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site" "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_proxy.go b/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_proxy.go index d9ff5d76c..14cf01d7d 100644 --- a/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_proxy.go +++ b/genesyscloud/telephony_providers_edges_site_outbound_route/genesyscloud_telephony_providers_edges_site_outbound_route_proxy.go @@ -2,9 +2,10 @@ package telephony_providers_edges_site_outbound_route import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" rc "terraform-provider-genesyscloud/genesyscloud/resource_cache" telephonyProvidersEdgesSite "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* diff --git a/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route.go b/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route.go index bcbab805e..610d622aa 100644 --- a/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route.go +++ b/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route.go @@ -3,20 +3,23 @@ package telephony_providers_edges_site_outbound_route import ( "context" "fmt" - "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/v131/platformclientv2" "log" + "terraform-provider-genesyscloud/genesyscloud/consistency_checker" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" "terraform-provider-genesyscloud/genesyscloud/util" + "terraform-provider-genesyscloud/genesyscloud/util/constants" featureToggles "terraform-provider-genesyscloud/genesyscloud/util/feature_toggles" "terraform-provider-genesyscloud/genesyscloud/util/lists" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "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/v133/platformclientv2" ) func getAllSitesOutboundRoutes(ctx context.Context, sdkConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { @@ -62,10 +65,31 @@ func createSiteOutboundRoutes(ctx context.Context, d *schema.ResourceData, meta sdkConfig := meta.(*provider.ProviderMeta).ClientConfig proxy := getSiteOutboundRouteProxy(sdkConfig) siteId := d.Get("site_id").(string) + outboundRoutes := buildOutboundRoutes(d.Get("outbound_routes").(*schema.Set)) + var newRoutes []platformclientv2.Outboundroutebase + + // When creating outbound routes, routes may already exist in the site. This can lead to error `Outbound Route Already Exists` + // To prevent this, existing routes for the site are obtained and compared with the routes to be created + // ONLY non-existing routes are created for the site + + log.Printf("Retrieving existing outbound routes for side %s before creation", siteId) + + outboundRoutesAPI, resp, err := proxy.getSiteOutboundRoutes(ctx, siteId) + if err != nil { + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to get outbound routes for site %s error: %s", d.Id(), err), resp) + } + + // If the site already has routes, filter and create routes that don't exist + // Otherwise, create every route + if outboundRoutesAPI != nil && len(*outboundRoutesAPI) > 0 { + newRoutes = checkExistingRoutes(outboundRoutes, outboundRoutesAPI, siteId) + } else { + newRoutes = append(newRoutes, *outboundRoutes...) + } + log.Printf("creating outbound routes for site %s", siteId) - outboundRoutes := buildOutboundRoutes(d.Get("outbound_routes").(*schema.Set)) - for _, outboundRoute := range *outboundRoutes { + for _, outboundRoute := range newRoutes { _, resp, err := proxy.createSiteOutboundRoute(ctx, siteId, &outboundRoute) if err != nil { return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("failed to create outbound route %s for site %s: %s", *outboundRoute.Name, siteId, err), resp) @@ -126,6 +150,7 @@ func readSiteOutboundRoutes(ctx context.Context, d *schema.ResourceData, meta in _ = d.Set("outbound_routes", nil) } + log.Printf("Read outbound routes for site %s", d.Id()) return cc.CheckState(d) }) } diff --git a/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route_utils.go b/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route_utils.go index ababd9fe0..5c9b6c29c 100644 --- a/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route_utils.go +++ b/genesyscloud/telephony_providers_edges_site_outbound_route/resource_genesyscloud_telephony_providers_edges_site_outbound_route_utils.go @@ -1,9 +1,11 @@ package telephony_providers_edges_site_outbound_route import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "log" "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildOutboundRoutes(outboundRoutes *schema.Set) *[]platformclientv2.Outboundroutebase { @@ -46,3 +48,14 @@ func nameInOutboundRoutes(name string, outboundRoutes []platformclientv2.Outboun return nil, false } + +func checkExistingRoutes(definedRoutes, apiRoutes *[]platformclientv2.Outboundroutebase, siteId string) (newRoutes []platformclientv2.Outboundroutebase) { + for _, definedRoute := range *definedRoutes { + if _, present := nameInOutboundRoutes(*definedRoute.Name, *apiRoutes); present { + log.Printf("Route %s associated with site %s already exists. Creating only non-existing routes", *definedRoute.Name, siteId) + } else { + newRoutes = append(newRoutes, definedRoute) + } + } + return newRoutes +} diff --git a/genesyscloud/telephony_providers_edges_trunk/data_source_genesyscloud_telephony_providers_edges_trunk.go b/genesyscloud/telephony_providers_edges_trunk/data_source_genesyscloud_telephony_providers_edges_trunk.go index de61a6741..194790fe9 100644 --- a/genesyscloud/telephony_providers_edges_trunk/data_source_genesyscloud_telephony_providers_edges_trunk.go +++ b/genesyscloud/telephony_providers_edges_trunk/data_source_genesyscloud_telephony_providers_edges_trunk.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func dataSourceTrunkRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { diff --git a/genesyscloud/telephony_providers_edges_trunk/genesyscloud_telephony_providers_edges_trunk_proxy.go b/genesyscloud/telephony_providers_edges_trunk/genesyscloud_telephony_providers_edges_trunk_proxy.go index 4f2138191..df99c6690 100644 --- a/genesyscloud/telephony_providers_edges_trunk/genesyscloud_telephony_providers_edges_trunk_proxy.go +++ b/genesyscloud/telephony_providers_edges_trunk/genesyscloud_telephony_providers_edges_trunk_proxy.go @@ -3,7 +3,7 @@ package telephony_providers_edges_trunk import ( "context" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) //generate a proxy for telephony_providers_edges_trunk diff --git a/genesyscloud/telephony_providers_edges_trunk/resource_genesyscloud_telephony_providers_edges_trunk.go b/genesyscloud/telephony_providers_edges_trunk/resource_genesyscloud_telephony_providers_edges_trunk.go index af15ea366..b0791dc9c 100644 --- a/genesyscloud/telephony_providers_edges_trunk/resource_genesyscloud_telephony_providers_edges_trunk.go +++ b/genesyscloud/telephony_providers_edges_trunk/resource_genesyscloud_telephony_providers_edges_trunk.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func createTrunk(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { diff --git a/genesyscloud/tfexporter/genesyscloud_resource_exporter.go b/genesyscloud/tfexporter/genesyscloud_resource_exporter.go index abf75169a..c4bb43660 100644 --- a/genesyscloud/tfexporter/genesyscloud_resource_exporter.go +++ b/genesyscloud/tfexporter/genesyscloud_resource_exporter.go @@ -33,7 +33,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/mohae/deepcopy" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) /* @@ -1231,19 +1231,17 @@ func (g *GenesysCloudResourceExporter) sanitizeConfigMap( } if exporter.IsAttributeE164(currAttr) { - if phoneNumber, ok := configMap[key].(string); !ok || phoneNumber == "" { + if _, ok := configMap[key].(string); !ok { continue } configMap[key] = sanitizeE164Number(configMap[key].(string)) - continue } if exporter.IsAttributeRrule(currAttr) { - if rrule, ok := configMap[key].(string); !ok || rrule == "" { + if _, ok := configMap[key].(string); !ok { continue } configMap[key] = sanitizeRrule(configMap[key].(string)) - continue } switch val.(type) { diff --git a/genesyscloud/tfexporter/genesyscloud_resource_exporter_test.go b/genesyscloud/tfexporter/genesyscloud_resource_exporter_test.go index 1f85ff1ff..2c393142f 100644 --- a/genesyscloud/tfexporter/genesyscloud_resource_exporter_test.go +++ b/genesyscloud/tfexporter/genesyscloud_resource_exporter_test.go @@ -3,13 +3,14 @@ package tfexporter import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "reflect" "terraform-provider-genesyscloud/genesyscloud/provider" resourceExporter "terraform-provider-genesyscloud/genesyscloud/resource_exporter" "terraform-provider-genesyscloud/genesyscloud/util" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/stretchr/testify/assert" diff --git a/genesyscloud/tfexporter/resource_genesyscloud_tf_export_test.go b/genesyscloud/tfexporter/resource_genesyscloud_tf_export_test.go index 4b91ebe6d..98febed09 100644 --- a/genesyscloud/tfexporter/resource_genesyscloud_tf_export_test.go +++ b/genesyscloud/tfexporter/resource_genesyscloud_tf_export_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/testrunner" diff --git a/genesyscloud/tfexporter/tf_exporter_resource_test.go b/genesyscloud/tfexporter/tf_exporter_resource_test.go index e2bb97141..a0e4d44aa 100644 --- a/genesyscloud/tfexporter/tf_exporter_resource_test.go +++ b/genesyscloud/tfexporter/tf_exporter_resource_test.go @@ -6,12 +6,6 @@ import ( "terraform-provider-genesyscloud/genesyscloud/architect_datatable_row" emergencyGroup "terraform-provider-genesyscloud/genesyscloud/architect_emergencygroup" flow "terraform-provider-genesyscloud/genesyscloud/architect_flow" - flowLogLevel "terraform-provider-genesyscloud/genesyscloud/flow_loglevel" - outboundContactListContact "terraform-provider-genesyscloud/genesyscloud/outbound_contact_list_contact" - routingSettings "terraform-provider-genesyscloud/genesyscloud/routing_settings" - routingUtilization "terraform-provider-genesyscloud/genesyscloud/routing_utilization" - routingUtilizationLabel "terraform-provider-genesyscloud/genesyscloud/routing_utilization_label" - outboundRoute "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site_outbound_route" grammar "terraform-provider-genesyscloud/genesyscloud/architect_grammar" grammarLanguage "terraform-provider-genesyscloud/genesyscloud/architect_grammar_language" archIvr "terraform-provider-genesyscloud/genesyscloud/architect_ivr" @@ -19,12 +13,17 @@ import ( architectSchedules "terraform-provider-genesyscloud/genesyscloud/architect_schedules" authRole "terraform-provider-genesyscloud/genesyscloud/auth_role" employeeperformanceExternalmetricsDefinition "terraform-provider-genesyscloud/genesyscloud/employeeperformance_externalmetrics_definitions" + flowLogLevel "terraform-provider-genesyscloud/genesyscloud/flow_loglevel" flowMilestone "terraform-provider-genesyscloud/genesyscloud/flow_milestone" flowOutcome "terraform-provider-genesyscloud/genesyscloud/flow_outcome" "terraform-provider-genesyscloud/genesyscloud/group" groupRoles "terraform-provider-genesyscloud/genesyscloud/group_roles" idpAdfs "terraform-provider-genesyscloud/genesyscloud/idp_adfs" + idpGeneric "terraform-provider-genesyscloud/genesyscloud/idp_generic" + idpGsuite "terraform-provider-genesyscloud/genesyscloud/idp_gsuite" idpOkta "terraform-provider-genesyscloud/genesyscloud/idp_okta" + idpOneLogin "terraform-provider-genesyscloud/genesyscloud/idp_onelogin" + idpPing "terraform-provider-genesyscloud/genesyscloud/idp_ping" idpSalesforce "terraform-provider-genesyscloud/genesyscloud/idp_salesforce" integration "terraform-provider-genesyscloud/genesyscloud/integration" integrationAction "terraform-provider-genesyscloud/genesyscloud/integration_action" @@ -39,6 +38,7 @@ import ( obCampaign "terraform-provider-genesyscloud/genesyscloud/outbound_campaign" obCampaignRule "terraform-provider-genesyscloud/genesyscloud/outbound_campaignrule" outboundContactList "terraform-provider-genesyscloud/genesyscloud/outbound_contact_list" + outboundContactListContact "terraform-provider-genesyscloud/genesyscloud/outbound_contact_list_contact" obContactListFilter "terraform-provider-genesyscloud/genesyscloud/outbound_contactlistfilter" obDncList "terraform-provider-genesyscloud/genesyscloud/outbound_dnclist" obfst "terraform-provider-genesyscloud/genesyscloud/outbound_filespecificationtemplate" @@ -56,7 +56,10 @@ import ( routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue" routingQueueConditionalGroupRouting "terraform-provider-genesyscloud/genesyscloud/routing_queue_conditional_group_routing" routingQueueOutboundEmailAddress "terraform-provider-genesyscloud/genesyscloud/routing_queue_outbound_email_address" + routingSettings "terraform-provider-genesyscloud/genesyscloud/routing_settings" routingSmsAddress "terraform-provider-genesyscloud/genesyscloud/routing_sms_addresses" + routingUtilization "terraform-provider-genesyscloud/genesyscloud/routing_utilization" + routingUtilizationLabel "terraform-provider-genesyscloud/genesyscloud/routing_utilization_label" "terraform-provider-genesyscloud/genesyscloud/scripts" workbin "terraform-provider-genesyscloud/genesyscloud/task_management_workbin" workitemSchema "terraform-provider-genesyscloud/genesyscloud/task_management_workitem_schema" @@ -66,6 +69,7 @@ import ( edgeGroup "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_edge_group" edgeExtension "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_extension_pool" phonebaseSettings "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_phonebasesettings" + outboundRoute "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_site_outbound_route" edgesTrunk "terraform-provider-genesyscloud/genesyscloud/telephony_providers_edges_trunk" userRoles "terraform-provider-genesyscloud/genesyscloud/user_roles" webdeployConfig "terraform-provider-genesyscloud/genesyscloud/webdeployments_configuration" @@ -121,11 +125,11 @@ func (r *registerTestInstance) registerTestResources() { providerResources["genesyscloud_group"] = group.ResourceGroup() providerResources["genesyscloud_group_roles"] = groupRoles.ResourceGroupRoles() providerResources["genesyscloud_idp_adfs"] = idpAdfs.ResourceIdpAdfs() - providerResources["genesyscloud_idp_generic"] = gcloud.ResourceIdpGeneric() - providerResources["genesyscloud_idp_gsuite"] = gcloud.ResourceIdpGsuite() + providerResources["genesyscloud_idp_generic"] = idpGeneric.ResourceIdpGeneric() + providerResources["genesyscloud_idp_gsuite"] = idpGsuite.ResourceIdpGsuite() providerResources["genesyscloud_idp_okta"] = idpOkta.ResourceIdpOkta() - providerResources["genesyscloud_idp_onelogin"] = gcloud.ResourceIdpOnelogin() - providerResources["genesyscloud_idp_ping"] = gcloud.ResourceIdpPing() + providerResources["genesyscloud_idp_onelogin"] = idpOneLogin.ResourceIdpOnelogin() + providerResources["genesyscloud_idp_ping"] = idpPing.ResourceIdpPing() providerResources["genesyscloud_idp_salesforce"] = idpSalesforce.ResourceIdpSalesforce() providerResources["genesyscloud_integration"] = integration.ResourceIntegration() providerResources["genesyscloud_integration_action"] = integrationAction.ResourceIntegrationAction() @@ -221,11 +225,11 @@ func (r *registerTestInstance) registerTestExporters() { RegisterExporter("genesyscloud_group", group.GroupExporter()) RegisterExporter("genesyscloud_group_roles", groupRoles.GroupRolesExporter()) RegisterExporter("genesyscloud_idp_adfs", idpAdfs.IdpAdfsExporter()) - RegisterExporter("genesyscloud_idp_generic", gcloud.IdpGenericExporter()) - RegisterExporter("genesyscloud_idp_gsuite", gcloud.IdpGsuiteExporter()) + RegisterExporter("genesyscloud_idp_generic", idpGeneric.IdpGenericExporter()) + RegisterExporter("genesyscloud_idp_gsuite", idpGsuite.IdpGsuiteExporter()) RegisterExporter("genesyscloud_idp_okta", idpOkta.IdpOktaExporter()) - RegisterExporter("genesyscloud_idp_onelogin", gcloud.IdpOneloginExporter()) - RegisterExporter("genesyscloud_idp_ping", gcloud.IdpPingExporter()) + RegisterExporter("genesyscloud_idp_onelogin", idpOneLogin.IdpOneloginExporter()) + RegisterExporter("genesyscloud_idp_ping", idpPing.IdpPingExporter()) RegisterExporter("genesyscloud_idp_salesforce", idpSalesforce.IdpSalesforceExporter()) RegisterExporter("genesyscloud_integration", integration.IntegrationExporter()) RegisterExporter("genesyscloud_integration_action", integrationAction.IntegrationActionExporter()) diff --git a/genesyscloud/user_roles/genesyscloud_user_roles_proxy.go b/genesyscloud/user_roles/genesyscloud_user_roles_proxy.go index 348ca624b..2ed1c9ea0 100644 --- a/genesyscloud/user_roles/genesyscloud_user_roles_proxy.go +++ b/genesyscloud/user_roles/genesyscloud_user_roles_proxy.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *userRolesProxy diff --git a/genesyscloud/user_roles/resource_genesyscloud_user_roles_utils.go b/genesyscloud/user_roles/resource_genesyscloud_user_roles_utils.go index 9f58a8e8a..aa50ef59a 100644 --- a/genesyscloud/user_roles/resource_genesyscloud_user_roles_utils.go +++ b/genesyscloud/user_roles/resource_genesyscloud_user_roles_utils.go @@ -7,7 +7,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func flattenSubjectRoles(d *schema.ResourceData, p *userRolesProxy) (*schema.Set, *platformclientv2.APIResponse, error) { diff --git a/genesyscloud/util/resourcedata/resourcedata.go b/genesyscloud/util/resourcedata/resourcedata.go index 066abcfc9..37e647084 100644 --- a/genesyscloud/util/resourcedata/resourcedata.go +++ b/genesyscloud/util/resourcedata/resourcedata.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/leekchan/timeutil" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) const ( diff --git a/genesyscloud/util/util_basesetting_properties.go b/genesyscloud/util/util_basesetting_properties.go index 44c0ea6de..8e169e43c 100644 --- a/genesyscloud/util/util_basesetting_properties.go +++ b/genesyscloud/util/util_basesetting_properties.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func BuildTelephonyProperties(d *schema.ResourceData) *map[string]interface{} { diff --git a/genesyscloud/util/util_diagnostic_unit_test.go b/genesyscloud/util/util_diagnostic_unit_test.go index ec9fb4b9f..f5e930874 100644 --- a/genesyscloud/util/util_diagnostic_unit_test.go +++ b/genesyscloud/util/util_diagnostic_unit_test.go @@ -2,12 +2,13 @@ package util import ( "encoding/json" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" - "github.com/stretchr/testify/assert" "net/http" "net/url" "strings" "testing" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" + "github.com/stretchr/testify/assert" ) func TestUnitTestAPIResponseDiagWithGoodApiResponse(t *testing.T) { diff --git a/genesyscloud/util/util_diagnostics.go b/genesyscloud/util/util_diagnostics.go index 7a707a3f0..f0de6a808 100644 --- a/genesyscloud/util/util_diagnostics.go +++ b/genesyscloud/util/util_diagnostics.go @@ -4,8 +4,9 @@ import ( "encoding/json" "errors" "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type detailedDiagnosticInfo struct { diff --git a/genesyscloud/util/util_divisions.go b/genesyscloud/util/util_divisions.go index 91f269645..0cf72dcf9 100644 --- a/genesyscloud/util/util_divisions.go +++ b/genesyscloud/util/util_divisions.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type JsonMap map[string]interface{} diff --git a/genesyscloud/util/util_domainentities.go b/genesyscloud/util/util_domainentities.go index a72921b5b..08c6b05e6 100644 --- a/genesyscloud/util/util_domainentities.go +++ b/genesyscloud/util/util_domainentities.go @@ -4,7 +4,7 @@ import ( lists "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func BuildSdkDomainEntityRef(d *schema.ResourceData, idAttr string) *platformclientv2.Domainentityref { diff --git a/genesyscloud/util/util_retries.go b/genesyscloud/util/util_retries.go index 8c819c434..038eb302f 100644 --- a/genesyscloud/util/util_retries.go +++ b/genesyscloud/util/util_retries.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func WithRetries(ctx context.Context, timeout time.Duration, method func() *retry.RetryError) diag.Diagnostics { diff --git a/genesyscloud/validators/validators.go b/genesyscloud/validators/validators.go index a375e6bd6..66f89f83a 100644 --- a/genesyscloud/validators/validators.go +++ b/genesyscloud/validators/validators.go @@ -264,3 +264,15 @@ func ValidateHexColor(color interface{}, _ cty.Path) diag.Diagnostics { } return diag.Errorf("Color %v is not a string", color) } + +// ValidateLanguageCode validates that a valid language code that Genesys Cloud supports is passed. +func ValidateLanguageCode(lang interface{}, _ cty.Path) diag.Diagnostics { + langCodeList := []string{"en-US", "en-UK", "en-AU", "en-CA", "en-HK", "en-IN", "en-IE", "en-NZ", "en-PH", "en-SG", "en-ZA", "de-DE", "de-AT", "de-CH", "es-AR", "es-CO", "es-MX", "es-US", "es-ES", "fr-FR", "fr-BE", "fr-CA", "fr-CH", "pt-BR", "pt-PT", "nl-NL", "nl-BE", "it-IT", "ca-ES", "tr-TR", "sv-SE", "fi-FI", "nb-NO", "da-DK", "ja-JP", "ar-AE", "zh-CN", "zh-TW", "zh-HK", "ko-KR", "pl-PL", "hi-IN", "th-TH", "hu-HU", "vi-VN", "uk-UA"} + if langCode, ok := lang.(string); ok { + if lists.ItemInSlice(langCode, langCodeList) { + return nil + } + return diag.Errorf("Language code %s not found in language code list %v", langCode, langCodeList) + } + return diag.Errorf("Language code %v is not a string", lang) +} diff --git a/genesyscloud/webdeployments_configuration/genesyscloud_webdeployments_configuration_proxy.go b/genesyscloud/webdeployments_configuration/genesyscloud_webdeployments_configuration_proxy.go index ea0671576..15094c1b3 100644 --- a/genesyscloud/webdeployments_configuration/genesyscloud_webdeployments_configuration_proxy.go +++ b/genesyscloud/webdeployments_configuration/genesyscloud_webdeployments_configuration_proxy.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *webDeploymentsConfigurationProxy diff --git a/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration.go b/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration.go index ea88bc60a..c6155b6d1 100644 --- a/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration.go +++ b/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllWebDeploymentConfigurations(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_schema.go b/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_schema.go index 8cb13177c..22d1939be 100644 --- a/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_schema.go +++ b/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_schema.go @@ -356,6 +356,26 @@ var ( Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "pause_criteria": { + Description: "Pause criteria that will pause cobrowse if some of them are met in the user's URL", + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "url_fragment": { + Description: "A string representing a part of the URL that, when matched according to the specified condition, will trigger a pause in the cobrowse session", + Type: schema.TypeString, + Required: true, + }, + "condition": { + Description: "The condition to be applied to the `url_fragment`. Conditions are 'includes', 'does_not_include', 'starts_with', 'ends_with', 'equals'", + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"includes", "does_not_include", "starts_with", "ends_with", "equals"}, false), + }, + }, + }, + }, }, } diff --git a/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_test.go b/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_test.go index 59984641e..8e4abe831 100644 --- a/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_test.go +++ b/genesyscloud/webdeployments_configuration/resource_genesyscloud_webdeployments_configuration_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) type scCustomMessageConfig struct { @@ -187,6 +187,8 @@ func TestAccResourceWebDeploymentsConfigurationComplex(t *testing.T) { channels, []string{strconv.Quote("selector-one")}, []string{strconv.Quote("selector-one")}, + generatePauseCriteria("/sensitive", "includes"), + generatePauseCriteria("/login", "equals"), ), ), Check: resource.ComposeTestCheckFunc( @@ -257,6 +259,11 @@ func TestAccResourceWebDeploymentsConfigurationComplex(t *testing.T) { resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.mask_selectors.0", "selector-one"), resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.readonly_selectors.#", "1"), resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.readonly_selectors.0", "selector-one"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.#", "2"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.0.url_fragment", "/sensitive"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.0.condition", "includes"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.1.url_fragment", "/login"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.1.condition", "equals"), resource.TestCheckResourceAttr(fullResourceName, "journey_events.#", "1"), resource.TestCheckResourceAttr(fullResourceName, "journey_events.0.enabled", util.TrueValue), @@ -312,6 +319,8 @@ func TestAccResourceWebDeploymentsConfigurationComplex(t *testing.T) { channelsUpdate, []string{strconv.Quote("selector-one"), strconv.Quote("selector-two")}, []string{strconv.Quote("selector-one"), strconv.Quote("selector-two")}, + generatePauseCriteria("/sensitive", "includes"), + generatePauseCriteria("/login", "equals"), ), ), Check: resource.ComposeTestCheckFunc( @@ -345,6 +354,11 @@ func TestAccResourceWebDeploymentsConfigurationComplex(t *testing.T) { resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.readonly_selectors.#", "2"), util.ValidateStringInArray(fullResourceName, "cobrowse.0.readonly_selectors", "selector-one"), util.ValidateStringInArray(fullResourceName, "cobrowse.0.readonly_selectors", "selector-two"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.#", "2"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.0.url_fragment", "/sensitive"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.0.condition", "includes"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.1.url_fragment", "/login"), + resource.TestCheckResourceAttr(fullResourceName, "cobrowse.0.pause_criteria.1.condition", "equals"), resource.TestCheckResourceAttr(fullResourceName, "journey_events.#", "1"), resource.TestCheckResourceAttr(fullResourceName, "journey_events.0.enabled", util.TrueValue), resource.TestCheckResourceAttr(fullResourceName, "journey_events.0.excluded_query_parameters.#", "1"), @@ -1034,7 +1048,8 @@ func complexConfigurationResource(name, description, kbId string, nestedBlocks . `, name, description, kbId, strings.Join(nestedBlocks, "\n")) } -func generateWebDeploymentConfigCobrowseSettings(cbEnabled, cbAllowAgentControl string, cbAllowAgentNavigation string, cbChannels []string, cbMaskSelectors []string, cbReadonlySelectors []string) string { +func generateWebDeploymentConfigCobrowseSettings(cbEnabled, cbAllowAgentControl string, cbAllowAgentNavigation string, cbChannels []string, cbMaskSelectors []string, cbReadonlySelectors []string, pauseCriteriaBlocks ...string,) string { + return fmt.Sprintf(` cobrowse { enabled = %s @@ -1043,8 +1058,16 @@ func generateWebDeploymentConfigCobrowseSettings(cbEnabled, cbAllowAgentControl channels = [ %s ] mask_selectors = [ %s ] readonly_selectors = [ %s ] + %s } -`, cbEnabled, cbAllowAgentControl, cbAllowAgentNavigation, strings.Join(cbChannels, ", "), strings.Join(cbMaskSelectors, ", "), strings.Join(cbReadonlySelectors, ", ")) +`, cbEnabled, cbAllowAgentControl, cbAllowAgentNavigation, strings.Join(cbChannels, ", "), strings.Join(cbMaskSelectors, ", "), strings.Join(cbReadonlySelectors, ", "), strings.Join(pauseCriteriaBlocks, "\n")) +} + +func generatePauseCriteria(urlFragment, condition string) string { + return fmt.Sprintf(`pause_criteria { + url_fragment = "%s" + condition = "%s" +}`, urlFragment, condition) } func generateSupportCenterSettings(supportCenter scConfig) string { diff --git a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_journey.go b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_journey.go index 09edc3979..5eca98263 100644 --- a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_journey.go +++ b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_journey.go @@ -4,7 +4,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/lists" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildSelectorEventTriggers(triggers []interface{}) *[]platformclientv2.Selectoreventtrigger { diff --git a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_messenger.go b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_messenger.go index e12d1ae40..7ef740fc6 100644 --- a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_messenger.go +++ b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_messenger.go @@ -1,9 +1,10 @@ package webdeployments_configuration_utils import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" "terraform-provider-genesyscloud/genesyscloud/util/lists" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildAppConversations(conversations []interface{}) *platformclientv2.Conversationappsettings { diff --git a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_support_center.go b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_support_center.go index f29d7605d..635fe2fbf 100644 --- a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_support_center.go +++ b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_support_center.go @@ -4,7 +4,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildSupportCenterHeroStyle(styles []interface{}) *platformclientv2.Supportcenterherostyle { diff --git a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_utils.go b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_utils.go index b12770c46..2d304c293 100644 --- a/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_utils.go +++ b/genesyscloud/webdeployments_configuration/utils/resource_genesyscloud_webdeployments_configuration_utils.go @@ -7,7 +7,7 @@ import ( "terraform-provider-genesyscloud/genesyscloud/util/resourcedata" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func buildCobrowseSettings(d *schema.ResourceData) *platformclientv2.Cobrowsesettings { @@ -30,6 +30,20 @@ func buildCobrowseSettings(d *schema.ResourceData) *platformclientv2.Cobrowseset maskSelectors := lists.InterfaceListToStrings(cfg["mask_selectors"].([]interface{})) readonlySelectors := lists.InterfaceListToStrings(cfg["readonly_selectors"].([]interface{})) + var pauseCriteria []platformclientv2.Pausecriteria + if v, ok := cfg["pause_criteria"]; ok { + for _, pc := range v.([]interface{}) { + pcMap := pc.(map[string]interface{}) + urlFragment := pcMap["url_fragment"].(string) + condition := pcMap["condition"].(string) + pauseCriteria = append(pauseCriteria, platformclientv2.Pausecriteria{ + UrlFragment: &urlFragment, + Condition: &condition, + }) + } + } + + return &platformclientv2.Cobrowsesettings{ Enabled: &enabled, AllowAgentControl: &allowAgentControl, @@ -37,6 +51,7 @@ func buildCobrowseSettings(d *schema.ResourceData) *platformclientv2.Cobrowseset Channels: &channels, MaskSelectors: &maskSelectors, ReadonlySelectors: &readonlySelectors, + PauseCriteria: &pauseCriteria, } } diff --git a/genesyscloud/webdeployments_deployment/genesyscloud_webdeployments_deployment_proxy.go b/genesyscloud/webdeployments_deployment/genesyscloud_webdeployments_deployment_proxy.go index 5dfb49182..52a06d5cc 100644 --- a/genesyscloud/webdeployments_deployment/genesyscloud_webdeployments_deployment_proxy.go +++ b/genesyscloud/webdeployments_deployment/genesyscloud_webdeployments_deployment_proxy.go @@ -3,14 +3,15 @@ package webdeployments_deployment import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" "log" "strconv" "terraform-provider-genesyscloud/genesyscloud/util" "time" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) var internalProxy *webDeploymentsProxy diff --git a/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment.go b/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment.go index d8ce2bff2..d3eacdd4c 100644 --- a/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment.go +++ b/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func getAllWebDeployments(ctx context.Context, clientConfig *platformclientv2.Configuration) (resourceExporter.ResourceIDMetaMap, diag.Diagnostics) { diff --git a/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_test.go b/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_test.go index 0f223d80d..6582e2602 100644 --- a/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_test.go +++ b/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func TestAccResourceWebDeploymentsDeployment(t *testing.T) { diff --git a/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_utils.go b/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_utils.go index 358560e1e..964adbcf1 100644 --- a/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_utils.go +++ b/genesyscloud/webdeployments_deployment/resource_genesyscloud_webdeployments_deployment_utils.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/mypurecloud/platform-client-sdk-go/v131/platformclientv2" + "github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2" ) func alwaysDifferent(k, old, new string, d *schema.ResourceData) bool { diff --git a/go.mod b/go.mod index 641f4f37c..debecdddd 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 github.com/leekchan/timeutil v0.0.0-20150802142658-28917288c48d github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 - github.com/mypurecloud/platform-client-sdk-go/v131 v131.0.0 + github.com/mypurecloud/platform-client-sdk-go/v133 v133.0.0 github.com/nyaruka/phonenumbers v1.3.6 github.com/rjNemo/underscore v0.6.1 github.com/zclconf/go-cty v1.14.4 @@ -94,10 +94,10 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 - golang.org/x/sys v0.21.0 // indirect + golang.org/x/net v0.27.0 + golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/grpc v1.63.2 // indirect diff --git a/go.sum b/go.sum index ed2d47cac..7f2f226e0 100644 --- a/go.sum +++ b/go.sum @@ -257,8 +257,8 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mypurecloud/platform-client-sdk-go/v131 v131.0.0 h1:2YkBK/2pSoaehuSTqhFDXb806nxmHIrz7RxKsQSqM/0= -github.com/mypurecloud/platform-client-sdk-go/v131 v131.0.0/go.mod h1:pWn1ub6TxkdOiI1mgZED+fICo/JiqujY4h+wfgYbOi4= +github.com/mypurecloud/platform-client-sdk-go/v133 v133.0.0 h1:QXLhk65lm4ObgEZLm49bJauEtigMLV/Xo61wF3t3eDE= +github.com/mypurecloud/platform-client-sdk-go/v133 v133.0.0/go.mod h1:xzHvr5pv/axk+ieUu4gpvZEvMcqFTFcR53IzPxz55OU= github.com/nyaruka/phonenumbers v1.3.6 h1:33owXWp4d1U+Tyaj9fpci6PbvaQZcXBUO2FybeKeLwQ= github.com/nyaruka/phonenumbers v1.3.6/go.mod h1:Ut+eFwikULbmCenH6InMKL9csUNLyxHuBLyfkpum11s= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -362,8 +362,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -404,8 +404,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -442,8 +442,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= diff --git a/main.go b/main.go index 01df3ea64..ad44a2841 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,11 @@ import ( "terraform-provider-genesyscloud/genesyscloud/group" groupRoles "terraform-provider-genesyscloud/genesyscloud/group_roles" idpAdfs "terraform-provider-genesyscloud/genesyscloud/idp_adfs" + idpGeneric "terraform-provider-genesyscloud/genesyscloud/idp_generic" + idpGsuite "terraform-provider-genesyscloud/genesyscloud/idp_gsuite" idpOkta "terraform-provider-genesyscloud/genesyscloud/idp_okta" + idpOneLogin "terraform-provider-genesyscloud/genesyscloud/idp_onelogin" + idpPing "terraform-provider-genesyscloud/genesyscloud/idp_ping" idpSalesforce "terraform-provider-genesyscloud/genesyscloud/idp_salesforce" "terraform-provider-genesyscloud/genesyscloud/integration" integrationAction "terraform-provider-genesyscloud/genesyscloud/integration_action" @@ -191,6 +195,10 @@ func registerResources() { idpAdfs.SetRegistrar(regInstance) //Registering idp adfs idpSalesforce.SetRegistrar(regInstance) //Registering idp salesforce idpOkta.SetRegistrar(regInstance) //Registering idp okta + idpOneLogin.SetRegistrar(regInstance) //Registering idp onelogin + idpGeneric.SetRegistrar(regInstance) //Registering idp generic + idpPing.SetRegistrar(regInstance) //Registering idp ping + idpGsuite.SetRegistrar(regInstance) //Registering idp gsuite integration.SetRegistrar(regInstance) //Registering integrations integrationCustomAuth.SetRegistrar(regInstance) //Registering integrations custom auth actions integrationAction.SetRegistrar(regInstance) //Registering integrations actions