Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #173 from articulate/bugfix/#172
Browse files Browse the repository at this point in the history
Auth server issuer should be computed
  • Loading branch information
quantumew committed May 16, 2019
2 parents b506260 + 5feb9ca commit a05578d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions okta/resource_auth_server.go
Expand Up @@ -56,7 +56,7 @@ func resourceAuthServer() *schema.Resource {
},
"issuer": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "EA Feature: allows you to use a custom issuer URL",
},
"issuer_mode": &schema.Schema{
Expand Down Expand Up @@ -92,7 +92,6 @@ func buildAuthServer(d *schema.ResourceData) *AuthorizationServer {
},
Description: d.Get("description").(string),
Name: d.Get("name").(string),
Issuer: d.Get("issuer").(string),
IssuerMode: d.Get("issuer_mode").(string),
}
}
Expand Down Expand Up @@ -129,15 +128,11 @@ func resourceAuthServerRead(d *schema.ResourceData, m interface{}) error {
d.Set("description", authServer.Description)
d.Set("name", authServer.Name)
d.Set("status", authServer.Status)
d.Set("issuer", authServer.Issuer)

// Do not sync these unless the issuer mode is specified since it is an EA feature and is computed in some cases
if authServer.IssuerMode != "" {
d.Set("issuer_mode", authServer.IssuerMode)

// Ignore this property if it is not custom
if authServer.IssuerMode != "ORG_URL" {
d.Set("issuer", authServer.Issuer)
}
}

return nil
Expand Down

0 comments on commit a05578d

Please sign in to comment.