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

Fix connection display name #304

Merged
merged 2 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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