Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed parDdosEnabled/parDdosPlanName camel casing #196

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infra-as-code/bicep/modules/hubNetworking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The module requires the following inputs:
| parPrivateDNSZonesEnabled | bool | true | Switch to enable deployment of Azure Private DNS Zones | None | true |
| parPrivateDnsZones | array | See example parameters file [`hubNetworking.parameters.json`](hubNetworking.parameters.example.json) | Array of DNS Zones to provision in Hub Virtual Network. Default: All known Azure Private DNS Zones except for: `privatelink.batch.azure.com`, `privatelink.azmk8s.io` and `privatelink.siterecovery.windowsazure.com` as these are region specific, which you can add to the parameters file with the required region in the zone name that you wish to deploy for. For more details on private DNS Zones please refer to the above link. | None | See Default |
| parCompanyPrefix | string | alz | Prefix value which will be pre-appended to all resource names | 1-10 char | alz |
| parDdosPlanName | string | ${parCompanyPrefix}-DDos-Plan | Name which will be associated with distributed denial of service protection plan | 1-80 char | alz-DDos-Plan |
| parDdosPlanName | string | ${parCompanyPrefix}-Ddos-Plan | Name which will be associated with distributed denial of service protection plan | 1-80 char | alz-Ddos-Plan |
cbezenco marked this conversation as resolved.
Show resolved Hide resolved
| parBastionName | string | ${parCompanyPrefix}-bastion | Name which will be associated with Bastion Service. | 1-80 char | alz-bastion |
| parBastionSku | string | Standard | SKU or Tier of Bastion Service to deploy | Standard or Basic | Standard |
| parPublicIPSku | string | Standard | SKU or Tier of Public IP to deploy | Standard or Basic | Standard |
Expand Down
20 changes: 10 additions & 10 deletions infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ param parBastionName string = '${parCompanyPrefix}-bastion'
param parBastionSku string = 'Standard'

@description('Switch which allows DDOS deployment to be disabled. Default: true')
param parDDoSEnabled bool = true
param parDdosEnabled bool = true

@description('DDOS Plan Name. Default: {parCompanyPrefix}-DDos-Plan')
param parDDoSPlanName string = '${parCompanyPrefix}-DDoS-Plan'
@description('DDOS Plan Name. Default: {parCompanyPrefix}-Ddos-Plan')
param parDdosPlanName string = '${parCompanyPrefix}-Ddos-Plan'

@description('Switch which allows Azure Firewall deployment to be disabled. Default: true')
param parAzureFirewallEnabled bool = true
Expand Down Expand Up @@ -208,13 +208,13 @@ var varGwConfig = [
// Customer Usage Attribution Id
var varCuaid = '2686e846-5fdc-4d4f-b533-16dcb09d6e6c'

resource resDDoSProtectionPlan 'Microsoft.Network/ddosProtectionPlans@2021-02-01' = if (parDDoSEnabled) {
name: parDDoSPlanName
resource resDdosProtectionPlan 'Microsoft.Network/ddosProtectionPlans@2021-02-01' = if (parDdosEnabled) {
name: parDdosPlanName
location: parLocation
tags: parTags
}

//DDos Protection plan will only be enabled if parDDoSEnabled is true.
//DDos Protection plan will only be enabled if parDdosEnabled is true.
resource resHubVirtualNetwork 'Microsoft.Network/virtualNetworks@2021-02-01' = {
name: parHubNetworkName
location: parLocation
Expand All @@ -229,9 +229,9 @@ resource resHubVirtualNetwork 'Microsoft.Network/virtualNetworks@2021-02-01' = {
dnsServers: parDNSServerIPArray
}
subnets: varSubnetProperties
enableDdosProtection: parDDoSEnabled
ddosProtectionPlan: (parDDoSEnabled) ? {
id: resDDoSProtectionPlan.id
enableDdosProtection: parDdosEnabled
ddosProtectionPlan: (parDdosEnabled) ? {
id: resDdosProtectionPlan.id
} : null
}
}
Expand Down Expand Up @@ -482,6 +482,6 @@ output outPrivateDnsZones array = [for i in range(0, length(parPrivateDnsZones))
id: resPrivateDnsZones[i].id
}]

output outDDoSPlanResourceID string = resDDoSProtectionPlan.id
output outDdosPlanResourceID string = resDdosProtectionPlan.id
output outHubVirtualNetworkName string = resHubVirtualNetwork.name
output outHubVirtualNetworkID string = resHubVirtualNetwork.id
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ module modPolicyAssignmentConnEnableDDoSVNET '../../policy/assignments/policyAss
parPolicyAssignmentParameters: varPolicyAssignmentEnableDDoSVNET.libDefinition.properties.parameters
parPolicyAssignmentParameterOverrides: {
ddosPlan: {
value: modHubNetworking.outputs.outDDoSPlanResourceID
value: modHubNetworking.outputs.outDdosPlanResourceID
}
}
parPolicyAssignmentIdentityType: varPolicyAssignmentEnableDDoSVNET.libDefinition.identity.type
Expand Down