Skip to content

Commit

Permalink
Fix azurerm_iothub_dps_shared_access_policy 'primary_connection_strin…
Browse files Browse the repository at this point in the history
…g' and 'secondary_connection_string'
  • Loading branch information
Jack Batzner committed Mar 14, 2020
1 parent 7066eab commit 82f4da4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func dataSourceIotHubDPSSharedAccessPolicyRead(d *schema.ResourceData, meta inte

primaryConnectionString := ""
secondaryConnectionString := ""
if iothubDps.Properties != nil && iothubDps.Properties.DeviceProvisioningHostName != nil {
hostname := iothubDps.Properties.DeviceProvisioningHostName
if iothubDps.Properties != nil && iothubDps.Properties.ServiceOperationsHostName != nil {
hostname := iothubDps.Properties.ServiceOperationsHostName
if primary := accessPolicy.PrimaryKey; primary != nil {
primaryConnectionString = getSAPConnectionString(*hostname, keyName, *primary)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ func resourceArmIotHubDPSSharedAccessPolicyRead(d *schema.ResourceData, meta int

primaryConnectionString := ""
secondaryConnectionString := ""
if iothubDps.Properties != nil && iothubDps.Properties.DeviceProvisioningHostName != nil {
hostname := iothubDps.Properties.DeviceProvisioningHostName
if iothubDps.Properties != nil && iothubDps.Properties.ServiceOperationsHostName != nil {
hostname := iothubDps.Properties.ServiceOperationsHostName
if primary := accessPolicy.PrimaryKey; primary != nil {
primaryConnectionString = getSAPConnectionString(*hostname, keyName, *primary)
}
Expand Down

0 comments on commit 82f4da4

Please sign in to comment.