Nat gateway hotfix. (#607)
* Nat gateway hotfix. * AuthorizedIPRanges patch.
This commit is contained in:
Родитель
06cc1eda08
Коммит
11ac999807
|
@ -1261,6 +1261,7 @@ var azureDefenderSecurityProfile = {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
var aksProperties = union({
|
||||
kubernetesVersion: kubernetesVersion
|
||||
enableRBAC: true
|
||||
|
@ -1270,8 +1271,8 @@ var aksProperties = union({
|
|||
enableAzureRBAC: enableAzureRBAC
|
||||
tenantID: aad_tenant_id
|
||||
} : null
|
||||
apiServerAccessProfile: !empty(authorizedIPRanges) ? {
|
||||
authorizedIPRanges: authorizedIPRanges
|
||||
apiServerAccessProfile: !empty(authorizedIPRanges) ? {
|
||||
authorizedIPRanges: createNatGateway ? concat(authorizedIPRanges, network.outputs.natGwIpArr) : authorizedIPRanges
|
||||
} : {
|
||||
enablePrivateCluster: enablePrivateCluster
|
||||
privateDNSZone: enablePrivateCluster ? aksPrivateDnsZone : ''
|
||||
|
|
|
@ -61,6 +61,10 @@ var bastion_baseSubnet = {
|
|||
}
|
||||
var bastion_subnet = bastion && networkSecurityGroups ? union(bastion_baseSubnet, nsgBastion.outputs.nsgSubnetObj) : bastion_baseSubnet
|
||||
|
||||
//NatGatewayEgress
|
||||
|
||||
var NatAvailabilityZone = array(first(availabilityZones))
|
||||
|
||||
var acrpool_subnet_name = 'acrpool-sn'
|
||||
var acrpool_baseSubnet = {
|
||||
name: acrpool_subnet_name
|
||||
|
@ -507,20 +511,23 @@ resource natGwIp 'Microsoft.Network/publicIPAddresses@2021-08-01' = [for i in r
|
|||
sku: {
|
||||
name: 'Standard'
|
||||
}
|
||||
zones: !empty(availabilityZones) ? availabilityZones : []
|
||||
zones: !empty(availabilityZones) ? NatAvailabilityZone : []
|
||||
properties: {
|
||||
publicIPAllocationMethod: 'Static'
|
||||
}
|
||||
}]
|
||||
|
||||
output natGwIpArr array = [for i in range(0, natGatewayPublicIps): natGateway ? natGwIp[i].properties.ipAddress : null]
|
||||
|
||||
var natGwName = 'ng-${resourceName}'
|
||||
|
||||
resource natGw 'Microsoft.Network/natGateways@2021-08-01' = if(natGateway) {
|
||||
name: natGwName
|
||||
location: location
|
||||
sku: {
|
||||
name: 'Standard'
|
||||
}
|
||||
zones: !empty(availabilityZones) ? first(availabilityZones) : []
|
||||
zones: !empty(availabilityZones) ? NatAvailabilityZone : []
|
||||
properties: {
|
||||
publicIpAddresses: [for i in range(0, natGatewayPublicIps): {
|
||||
id: natGwIp[i].id
|
||||
|
|
Загрузка…
Ссылка в новой задаче