Skip to content

Commit

Permalink
Merge pull request #6108 from brunhil/master
Browse files Browse the repository at this point in the history
Fix `azurerm_iothub_dps_shared_access_policy`: `primary_connection_string` and `secondary_connection_string`
  • Loading branch information
tombuildsstuff authored Mar 16, 2020
2 parents 7121d98 + 82f4da4 commit 35c926d
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 35c926d

Please sign in to comment.