Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #304 from alexkappa/fix-connection-display_name
Browse files Browse the repository at this point in the history
Fix connection display name
  • Loading branch information
Yvo authored Apr 6, 2021
2 parents 8d4eb6c + f768025 commit adb14ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions auth0/resource_auth0_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ func readConnection(d *schema.ResourceData, m interface{}) error {

d.SetId(auth0.StringValue(c.ID))
d.Set("name", c.Name)
d.Set("display_name", c.DisplayName)
d.Set("is_domain_connection", c.IsDomainConnection)
d.Set("strategy", c.Strategy)
d.Set("options", flattenConnectionOptions(d, c.Options))
Expand Down
3 changes: 3 additions & 0 deletions auth0/resource_auth0_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@ func TestAccConnectionSAML(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
random.TestCheckResourceAttr("auth0_connection.my_connection", "name", "Acceptance-Test-SAML-{{.random}}", rand),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "strategy", "samlp"),
random.TestCheckResourceAttr("auth0_connection.my_connection", "display_name", "Acceptance-Test-SAML-{{.random}}", rand),
),
},
{
Expand All @@ -1288,6 +1289,7 @@ func TestAccConnectionSAML(t *testing.T) {
const testConnectionSAMLConfigCreate = `
resource "auth0_connection" "my_connection" {
name = "Acceptance-Test-SAML-{{.random}}"
display_name = "Acceptance-Test-SAML-{{.random}}"
strategy = "samlp"
options {
signing_cert = <<EOF
Expand Down Expand Up @@ -1341,6 +1343,7 @@ EOF
const testConnectionSAMLConfigUpdate = `
resource "auth0_connection" "my_connection" {
name = "Acceptance-Test-SAML-{{.random}}"
display_name = "Acceptance-Test-SAML-{{.random}}"
strategy = "samlp"
options {
signing_cert = <<EOF
Expand Down
1 change: 1 addition & 0 deletions auth0/structure_auth0_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ func expandConnection(d ResourceData) *management.Connection {

c := &management.Connection{
Name: String(d, "name", IsNewResource()),
DisplayName: String(d, "display_name"),
Strategy: String(d, "strategy", IsNewResource()),
IsDomainConnection: Bool(d, "is_domain_connection"),
EnabledClients: Set(d, "enabled_clients").List(),
Expand Down

0 comments on commit adb14ef

Please sign in to comment.