Skip to content

Commit

Permalink
Merge pull request #71 from danielgrant/bugfix/tenant_default_redirec…
Browse files Browse the repository at this point in the history
…tion_uri

Wiring 'default_redirection_uri' parameter in 'auth0_tenant' into Auth0 API call
  • Loading branch information
sergiught authored Mar 4, 2022
2 parents 13f1e1a + 0ccc1e4 commit 1c60a83
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions auth0/resource_auth0_tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ func readTenant(d *schema.ResourceData, m interface{}) error {

d.Set("default_audience", t.DefaultAudience)
d.Set("default_directory", t.DefaultDirectory)
d.Set("default_redirection_uri", t.DefaultRedirectionURI)

d.Set("friendly_name", t.FriendlyName)
d.Set("picture_url", t.PictureURL)
Expand Down Expand Up @@ -300,22 +301,23 @@ func deleteTenant(d *schema.ResourceData, m interface{}) error {

func buildTenant(d *schema.ResourceData) *management.Tenant {
t := &management.Tenant{
DefaultAudience: String(d, "default_audience"),
DefaultDirectory: String(d, "default_directory"),
FriendlyName: String(d, "friendly_name"),
PictureURL: String(d, "picture_url"),
SupportEmail: String(d, "support_email"),
SupportURL: String(d, "support_url"),
AllowedLogoutURLs: Slice(d, "allowed_logout_urls"),
SessionLifetime: Float64(d, "session_lifetime"),
SandboxVersion: String(d, "sandbox_version"),
IdleSessionLifetime: Float64(d, "idle_session_lifetime", IsNewResource(), HasChange()),
EnabledLocales: List(d, "enabled_locales").List(),
ChangePassword: expandTenantChangePassword(d),
GuardianMFAPage: expandTenantGuardianMFAPage(d),
ErrorPage: expandTenantErrorPage(d),
Flags: expandTenantFlags(d),
UniversalLogin: expandTenantUniversalLogin(d),
DefaultAudience: String(d, "default_audience"),
DefaultDirectory: String(d, "default_directory"),
DefaultRedirectionURI: String(d, "default_redirection_uri"),
FriendlyName: String(d, "friendly_name"),
PictureURL: String(d, "picture_url"),
SupportEmail: String(d, "support_email"),
SupportURL: String(d, "support_url"),
AllowedLogoutURLs: Slice(d, "allowed_logout_urls"),
SessionLifetime: Float64(d, "session_lifetime"),
SandboxVersion: String(d, "sandbox_version"),
IdleSessionLifetime: Float64(d, "idle_session_lifetime", IsNewResource(), HasChange()),
EnabledLocales: List(d, "enabled_locales").List(),
ChangePassword: expandTenantChangePassword(d),
GuardianMFAPage: expandTenantGuardianMFAPage(d),
ErrorPage: expandTenantErrorPage(d),
Flags: expandTenantFlags(d),
UniversalLogin: expandTenantUniversalLogin(d),
}

return t
Expand Down

0 comments on commit 1c60a83

Please sign in to comment.