Skip to content

Commit

Permalink
dns biceps
Browse files Browse the repository at this point in the history
  • Loading branch information
katherinelc321 committed Jan 30, 2025
1 parent 8d0f6bc commit 3a71de1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-infrastructure/modules/aks-cluster-base.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ resource azuremonitormetrics_dcra_clusterResourceId 'Microsoft.Insights/dataColl
}
}


// Outputs
output userAssignedIdentities array = [
for i in range(0, length(workloadIdentities)): {
Expand All @@ -622,3 +623,4 @@ output aksNodeSubnetId string = aksNodeSubnet.id
output aksOidcIssuerUrl string = aksCluster.properties.oidcIssuerProfile.issuerURL
output aksClusterName string = aksClusterName
output aksClusterKeyVaultSecretsProviderPrincipalId string = aksCluster.properties.addonProfiles.azureKeyvaultSecretsProvider.identity.objectId
output istioIngressGatewayIPAddress string = istioIngressGatewayIPAddress.outputs.ipAddress
2 changes: 2 additions & 0 deletions dev-infrastructure/modules/network/publicipaddress.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = i
properties: roleAssignmentProperties
scope: publicIPAddress
}

output ipAddress string = publicIPAddress.properties.ipAddress
22 changes: 22 additions & 0 deletions dev-infrastructure/templates/svc-cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ resource serviceKeyVault 'Microsoft.KeyVault/vaults@2024-04-01-preview' existing
scope: resourceGroup(serviceKeyVaultResourceGroup)
}

@description('The name of the Azure DNS zone for the service')
param dnsRecordSetName string = 'frontend.${regionalSvcDNSZoneName}'

module svcCluster '../modules/aks-cluster-base.bicep' = {
name: 'cluster'
scope: resourceGroup()
Expand Down Expand Up @@ -433,3 +436,22 @@ module frontendIngressCertCSIAccess '../modules/keyvault/keyvault-secret-access.
secretName: frontendIngressCertName
}
}

// FRONTEND DNS

resource dnsZone 'Microsoft.Network/dnsZones@2022-09-01' existing = {
name: regionalSvcDNSZoneName
}

resource dnsRecord 'Microsoft.Network/dnsZones/A@2022-09-01' = {
name: dnsRecordSetName
parent: dnsZone
properties: {
TTL: 300
ARecords: [
{
ipv4Address: svcCluster.outputs.istioIngressGatewayIPAddress
}
]
}
}

0 comments on commit 3a71de1

Please sign in to comment.