Skip to content

Commit

Permalink
Fix resource not found error caused by implicit dependency properties…
Browse files Browse the repository at this point in the history
… when private endpoint resources aren't created.
  • Loading branch information
MarcusFelling authored Oct 24, 2023
1 parent 0baa119 commit 843efea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iac/createResources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ resource kv 'Microsoft.KeyVault/vaults@2022-07-01' = {
tags: resourceTags
properties: {
contentType: 'endpoint url (fqdn) of the (internal) carts api'
value: cartsinternalapiaca.properties.configuration.ingress.fqdn
value: deployPrivateEndpoints ? cartsinternalapiaca.properties.configuration.ingress.fqdn : ''
}
}

Expand Down Expand Up @@ -1490,11 +1490,11 @@ resource jumpboxvmschedule 'Microsoft.DevTestLab/schedules@2018-09-15' = {
module privateDnsZone './createPrivateDnsZone.bicep' = if (deployPrivateEndpoints) {
name: 'createPrivateDnsZone'
params: {
privateDnsZoneName: join(skip(split(cartsinternalapiaca.properties.configuration.ingress.fqdn, '.'), 2), '.')
privateDnsZoneName: deployPrivateEndpoints ? join(skip(split(cartsinternalapiaca.properties.configuration.ingress.fqdn, '.'), 2), '.') : ''
privateDnsZoneVnetId: vnet.id
privateDnsZoneVnetLinkName: privateDnsZoneVnetLinkName
privateDnsZoneARecordName: join(take(split(cartsinternalapiaca.properties.configuration.ingress.fqdn, '.'), 2), '.')
privateDnsZoneARecordIp: cartsinternalapiacaenv.properties.staticIp
privateDnsZoneARecordName: deployPrivateEndpoints ? join(take(split(cartsinternalapiaca.properties.configuration.ingress.fqdn, '.'), 2), '.') : ''
privateDnsZoneARecordIp: deployPrivateEndpoints ? cartsinternalapiacaenv.properties.staticIp : ''
resourceTags: resourceTags
}
}
Expand Down

0 comments on commit 843efea

Please sign in to comment.