Skip to content

Commit

Permalink
r/private_endpoint: fixing the casing on `private_connection_resource…
Browse files Browse the repository at this point in the history
…_id` if needed
  • Loading branch information
tombuildsstuff committed Nov 12, 2021
1 parent 8f5b3dc commit 7f84f4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/services/network/private_endpoint_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"strings"
"time"

"github.com/hashicorp/terraform-provider-azurerm/internal/services/signalr/sdk/2020-05-01/signalr"

"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down Expand Up @@ -623,6 +625,11 @@ func flattenPrivateLinkEndpointServiceConnection(serviceConnections *[]network.P
privateConnectionId = serverId.ID()
}
}
if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.signalrservice") {
if serviceId, err := signalr.ParseSignalRIDInsensitively(privateConnectionId); err == nil {
privateConnectionId = serviceId.ID()
}
}
attrs["private_connection_resource_id"] = privateConnectionId
}

Expand Down

0 comments on commit 7f84f4a

Please sign in to comment.