diff --git a/go.mod b/go.mod index 42e7e58..51b3766 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/arangodb-managed/terraform-provider-oasis require ( - github.com/arangodb-managed/apis v0.77.3 + github.com/arangodb-managed/apis v0.79.15 github.com/arangodb-managed/log-helper v0.2.5 github.com/gogo/protobuf v1.3.2 github.com/hashicorp/terraform-plugin-docs v0.8.1 diff --git a/go.sum b/go.sum index b61f91f..c6cf3cb 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,8 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/arangodb-managed/apis v0.77.3 h1:7l8/T4vYTem+cWoCFfAMFwgG+Sll1KWbttbSnTsjXHc= -github.com/arangodb-managed/apis v0.77.3/go.mod h1:ZlvA803MmUI3m6ijvaAYKKaWgLJq8bBZZuq8uyZo2PY= +github.com/arangodb-managed/apis v0.79.15 h1:d7/VE3+zm0HshaV9Dx16XTpyNKfggwQxu70WoVJbOyk= +github.com/arangodb-managed/apis v0.79.15/go.mod h1:ZlvA803MmUI3m6ijvaAYKKaWgLJq8bBZZuq8uyZo2PY= github.com/arangodb-managed/log-helper v0.2.5 h1:Kg3+0bDVFhEgyjMhIbCIj9hejgN2VaD4Cw/JQ4ARsd4= github.com/arangodb-managed/log-helper v0.2.5/go.mod h1:G17ASSd3Edday3i1QREGefyLJ2TduHxxFsOaqoigurE= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= diff --git a/internal/resource_organization.go b/internal/resource_organization.go index 95917f8..3db0ab4 100644 --- a/internal/resource_organization.go +++ b/internal/resource_organization.go @@ -41,6 +41,7 @@ const ( enableGoogleFieldName = "enable_google" enableUsernamePasswordFieldName = "enable_username_password" enableMicrosoftFieldName = "enable_microsoft" + enableSso = "enable_sso" ) // resourceOrganization defines an Organization Oasis resource. @@ -100,6 +101,12 @@ func resourceOrganization() *schema.Resource { Optional: true, Default: false, }, + enableSso: { + Type: schema.TypeBool, + Description: "Organization Resource Enable Single Sign On(SSO) Login field", + Optional: true, + Default: false, + }, }, }, }, @@ -253,6 +260,7 @@ func flattenAuthenticationProviders(p *rm.AuthenticationProviders) []interface{} providers[enableGoogleFieldName] = p.GetEnableGoogle() providers[enableMicrosoftFieldName] = p.GetEnableMicrosoft() providers[enableUsernamePasswordFieldName] = p.GetEnableUsernamePassword() + providers[enableSso] = p.GetEnableSso() return []interface{}{ providers, } @@ -275,6 +283,9 @@ func expandAuthenticationProviders(p []interface{}) *rm.AuthenticationProviders if i, ok := item[enableUsernamePasswordFieldName]; ok { result.EnableUsernamePassword = i.(bool) } + if i, ok := item[enableSso]; ok { + result.EnableSso = i.(bool) + } } return result } diff --git a/internal/resource_organization_test.go b/internal/resource_organization_test.go index bf4f6ad..c03b85b 100644 --- a/internal/resource_organization_test.go +++ b/internal/resource_organization_test.go @@ -147,6 +147,7 @@ func TestFlattenOrganization(t *testing.T) { enableGoogleFieldName: true, enableMicrosoftFieldName: true, enableUsernamePasswordFieldName: true, + enableSso: true, }, } organization.AuthenticationProviders = expandAuthenticationProviders(authProviderData) @@ -156,6 +157,7 @@ func TestFlattenOrganization(t *testing.T) { enableGoogleFieldName: true, enableMicrosoftFieldName: true, enableUsernamePasswordFieldName: true, + enableSso: true, }, } flattened := flattenOrganizationResource(organization)