MyPureCloud / terraform-provider-genesyscloud

Terraform Provider Genesyscloud
MIT License
37 stars 85 forks source link

NOJIRA fix oauth client.authorized_grant_type to accept SAML2-BEARER value #1315

Closed bbbco closed 1 month ago

bbbco commented 1 month ago

Update oauth_client's authorized_grant_type attribute to accept both SAML2BEARER and SAML2-BEARER values (the API allows both versions, but outputs as SAML2-BEARER in the API and export. It's important that the export be able to be reapplied right away, so this fix handles that).

Otherwise, this can happen when trying to apply an export of the oauth_client resource:

│ Error: expected authorized_grant_type to be one of ["CODE" "TOKEN" "SAML2BEARER" "PASSWORD" "CLIENT-CREDENTIALS"], got SAML2-BEARER
│
│   with genesyscloud_oauth_client.TT_SAML,
│   on genesyscloud.tf line 2799, in resource "genesyscloud_oauth_client" "TT_SAML":
│ 2799:   authorized_grant_type         = "SAML2-BEARER"
│
╵