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

Added several user defined types, ability for custom resources names in vwanConnectivity and mgDiagSettings #656

Merged
merged 32 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5b168e0
Added type virtualWanOptionsType, introduceded parUseCustomNamingSche…
johnlokerse Oct 13, 2023
0458900
Merge branch 'main' into issue/625
johnlokerse Oct 13, 2023
9ce72df
Check if parUseCustomNamingScheme is present in object
johnlokerse Oct 13, 2023
71501fa
Merge remote-tracking branch 'origin/issue/625' into issue/625
johnlokerse Oct 13, 2023
40b5d21
Merge branch 'main' into issue/625
johnlokerse Oct 13, 2023
d61d82a
Fixed parameter casing in baseline
johnlokerse Oct 13, 2023
11d9b08
Generate Parameter Markdowns [johnlokerse/40134377]
github-actions[bot] Oct 13, 2023
647e47b
Added parameters for resource names
johnlokerse Oct 13, 2023
1067b84
Merge remote-tracking branch 'origin/issue/625' into issue/625
johnlokerse Oct 13, 2023
ba1fd3d
Added subnetOptionsType
johnlokerse Oct 13, 2023
5bef430
Generate Parameter Markdowns [johnlokerse/40134377]
github-actions[bot] Oct 13, 2023
cf7cf41
Added descriptions
johnlokerse Oct 13, 2023
f3f5761
Added nonComplianceMessageType
johnlokerse Oct 13, 2023
48f6f3d
Added changes to parameter files, added diagnostic settings name to o…
johnlokerse Oct 16, 2023
91b68b1
Generate Parameter Markdowns [johnlokerse/40134377]
github-actions[bot] Oct 16, 2023
f3317e1
Merge branch 'main' into issue/625
johnlokerse Oct 17, 2023
2539d90
Merge branch 'main' into issue/625
johnlokerse Oct 19, 2023
534ea81
Merge branch 'main' into issue/625
johnlokerse Oct 25, 2023
b3895fb
Merge branch 'main' into issue/625
oZakari Oct 26, 2023
6870e7b
Merge branch 'main' into issue/625
johnlokerse Nov 1, 2023
859e7cb
Merge branch 'main' into issue/625
johnlokerse Nov 3, 2023
b99115f
Fix error for "List Azure Resources Types" because of usage of type
johnlokerse Nov 6, 2023
b92c651
Merge branch 'main' into issue/625
johnlokerse Nov 6, 2023
4edd4b8
Reduced complexity by using coalesce and safe-dereference operator
johnlokerse Nov 6, 2023
8df10a9
Merge branch 'main' into issue/625
johnlokerse Nov 10, 2023
3eb173b
Removed default value on description
johnlokerse Nov 10, 2023
d95225f
Generate Parameter Markdowns [johnlokerse/4e1ac12d]
github-actions[bot] Nov 10, 2023
016a826
Merge branch 'main' into issue/625
oZakari Nov 13, 2023
8d739de
Improve clarity for user defined type properties for the custom resou…
oZakari Nov 17, 2023
ef5590e
Merge branch 'main' into issue/625
oZakari Nov 17, 2023
38ba41d
Generate Parameter Markdowns [oZakari/ef8a90cc]
github-actions[bot] Nov 17, 2023
4a66214
Merge branch 'main' into issue/625
oZakari Nov 20, 2023
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
19 changes: 18 additions & 1 deletion infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
metadata name = 'ALZ Bicep - Hub Networking Module'
metadata description = 'ALZ Bicep Module used to set up Hub Networking'

type subnetOptionsType = ({
@description('Name of subnet.')
name: string

@description('IP-address range for subnet.')
ipAddressRange: string

@description('Id of Network Security Group to associate with subnet.')
networkSecurityGroupId: string?

@description('Id of Route Table to associate with subnet.')
routeTableId: string?

@description('Name of the delegation to create for the subnet.')
delegation: string?
})[]

@sys.description('The Azure Region to deploy the resources into.')
param parLocation string = resourceGroup().location

Expand All @@ -14,7 +31,7 @@ param parHubNetworkName string = '${parCompanyPrefix}-hub-${parLocation}'
param parHubNetworkAddressPrefix string = '10.10.0.0/16'

@sys.description('The name, IP address range, network security group, route table and delegation serviceName for each subnet in the virtual networks.')
param parSubnets array = [
param parSubnets subnetOptionsType = [
{
name: 'AzureBastionSubnet'
ipAddressRange: '10.10.15.0/24'
Expand Down
12 changes: 12 additions & 0 deletions infra-as-code/bicep/modules/logging/generateddocs/logging.bicep.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ parTags | No | Tags you would like to be applied to all resources i
parAutomationAccountTags | No | Tags you would like to be applied to Automation Account.
parLogAnalyticsWorkspaceTags | No | Tags you would like to be applied to Log Analytics Workspace.
parUseSentinelClassicPricingTiers | No | Set Parameter to true to use Sentinel Classic Pricing Tiers, following changes introduced in July 2023 as documented here: https://learn.microsoft.com/azure/sentinel/enroll-simplified-pricing-tier.
parLogAnalyticsLinkedServiceAutomationAccountName | No | Log Analytics LinkedService name for Automation Account.
parTelemetryOptOut | No | Set Parameter to true to Opt-out of deployment telemetry

### parLogAnalyticsWorkspaceName
Expand Down Expand Up @@ -138,6 +139,14 @@ Set Parameter to true to use Sentinel Classic Pricing Tiers, following changes i

- Default value: `False`

### parLogAnalyticsLinkedServiceAutomationAccountName

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Log Analytics LinkedService name for Automation Account.

- Default value: `Automation`

### parTelemetryOptOut

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -222,6 +231,9 @@ outAutomationAccountId | string |
"parUseSentinelClassicPricingTiers": {
"value": false
},
"parLogAnalyticsLinkedServiceAutomationAccountName": {
"value": "Automation"
},
"parTelemetryOptOut": {
"value": false
}
Expand Down
5 changes: 4 additions & 1 deletion infra-as-code/bicep/modules/logging/logging.bicep
johnlokerse marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ param parLogAnalyticsWorkspaceTags object = parTags
@sys.description('Set Parameter to true to use Sentinel Classic Pricing Tiers, following changes introduced in July 2023 as documented here: https://learn.microsoft.com/azure/sentinel/enroll-simplified-pricing-tier.')
param parUseSentinelClassicPricingTiers bool = false

@sys.description('Log Analytics LinkedService name for Automation Account.')
param parLogAnalyticsLinkedServiceAutomationAccountName string = 'Automation'

@sys.description('Set Parameter to true to Opt-out of deployment telemetry')
param parTelemetryOptOut bool = false

Expand Down Expand Up @@ -147,7 +150,7 @@ resource resLogAnalyticsWorkspaceSolutions 'Microsoft.OperationsManagement/solut

resource resLogAnalyticsLinkedServiceForAutomationAccount 'Microsoft.OperationalInsights/workspaces/linkedServices@2020-08-01' = if (parLogAnalyticsWorkspaceLinkAutomationAccount) {
parent: resLogAnalyticsWorkspace
name: 'Automation'
name: parLogAnalyticsLinkedServiceAutomationAccountName
properties: {
resourceId: resAutomationAccount.id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Module used to set up Diagnostic Settings for Management Groups
Parameter name | Required | Description
-------------- | -------- | -----------
parLogAnalyticsWorkspaceResourceId | Yes | Log Analytics Workspace Resource ID.
parDiagnosticSettingsName | No | Diagnostic Settings Name.
parTelemetryOptOut | No | Set Parameter to true to Opt-out of deployment telemetry

### parLogAnalyticsWorkspaceResourceId
Expand All @@ -15,6 +16,14 @@ parTelemetryOptOut | No | Set Parameter to true to Opt-out of deployment t

Log Analytics Workspace Resource ID.

### parDiagnosticSettingsName

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Diagnostic Settings Name.

- Default value: `toLa`

### parTelemetryOptOut

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand All @@ -38,6 +47,9 @@ Set Parameter to true to Opt-out of deployment telemetry
"parLogAnalyticsWorkspaceResourceId": {
"value": ""
},
"parDiagnosticSettingsName": {
"value": "toLa"
},
"parTelemetryOptOut": {
"value": false
}
Expand Down
johnlokerse marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ metadata description = 'Module used to set up Diagnostic Settings for Management
@sys.description('Log Analytics Workspace Resource ID.')
param parLogAnalyticsWorkspaceResourceId string

@sys.description('Diagnostic Settings Name.')
param parDiagnosticSettingsName string = 'toLa'

@sys.description('Set Parameter to true to Opt-out of deployment telemetry')
param parTelemetryOptOut bool = false

// Customer Usage Attribution Id
var varCuaid = '5d17f1c2-f17b-4426-9712-0cd2652c4435'

resource mgDiagSet 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
name: 'toLa'
name: parDiagnosticSettingsName
properties: {
workspaceId: parLogAnalyticsWorkspaceResourceId
logs: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ targetScope = 'managementGroup'
metadata name = 'ALZ Bicep - Management Group Policy Assignments'
metadata description = 'Module used to assign policy definitions to management groups'

type nonComplianceMessageType = {
@description('The message to display when the policy is non-compliant.')
message: string

@description('The reference ID of the policy definition.')
policyDefinitionReferenceId: string
}[]

@minLength(1)
@maxLength(24)
@sys.description('The name of the policy assignment. e.g. "Deny-Public-IP"')
Expand All @@ -24,7 +32,7 @@ param parPolicyAssignmentParameters object = {}
param parPolicyAssignmentParameterOverrides object = {}

@sys.description('An array containing object/s for the non-compliance messages for the policy to be assigned. See https://docs.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure#non-compliance-messages for more details on use.')
param parPolicyAssignmentNonComplianceMessages array = []
param parPolicyAssignmentNonComplianceMessages nonComplianceMessageType = []

@sys.description('An array containing a list of scope Resource IDs to be excluded for the policy assignment. e.g. [\'/providers/Microsoft.Management/managementgroups/alz\', \'/providers/Microsoft.Management/managementgroups/alz-sandbox\' ].')
param parPolicyAssignmentNotScopes array = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Parameter name | Required | Description
-------------- | -------- | -----------
parLocation | No | Region in which the resource group was created.
parCompanyPrefix | No | Prefix value which will be prepended to all resource names.
parAzFirewallTier | No | Azure Firewall Tier associated with the Firewall to deploy.
parAzFirewallTier | No | Azure Firewall Tier associated with the Firewall to deploy. If not set, the default value is Standard.
parAzFirewallIntelMode | No | The Azure Firewall Threat Intelligence Mode. If not set, the default value is Alert.
parVirtualHubEnabled | No | Switch to enable/disable Virtual Hub deployment.
parAzFirewallDnsProxyEnabled | No | Switch to enable/disable Azure Firewall DNS Proxy.
parAzFirewallDnsServers | No | Array of custom DNS servers used by Azure Firewall
parAzFirewallDnsServers | No | Array of custom DNS servers used by Azure Firewall.
parVirtualWanName | No | Prefix Used for Virtual WAN.
parVirtualWanHubName | No | Prefix Used for Virtual WAN Hub.
parVirtualWanHubs | No | Array Used for multiple Virtual WAN Hubs deployment. Each object in the array represents an individual Virtual WAN Hub configuration. Add/remove additional objects in the array to meet the number of Virtual WAN Hubs required. - `parVpnGatewayEnabled` - Switch to enable/disable VPN Gateway deployment on the respective Virtual WAN Hub. - `parExpressRouteGatewayEnabled` - Switch to enable/disable ExpressRoute Gateway deployment on the respective Virtual WAN Hub. - `parAzFirewallEnabled` - Switch to enable/disable Azure Firewall deployment on the respective Virtual WAN Hub. - `parVirtualHubAddressPrefix` - The IP address range in CIDR notation for the vWAN virtual Hub to use. - `parHubLocation` - The Virtual WAN Hub location. - `parHubRoutingPreference` - The Virtual WAN Hub routing preference. The allowed values are `ASN`, `VpnGateway`, `ExpressRoute`. - `parVirtualRouterAutoScaleConfiguration` - The Virtual WAN Hub capacity. The value should be between 2 to 50. - `parVirtualHubRoutingIntentDestinations` - The Virtual WAN Hub routing intent destinations, leave empty if not wanting to enable routing intent. The allowed values are `Internet`, `PrivateTraffic`.
parVpnGatewayName | No | Prefix Used for VPN Gateway.
parExpressRouteGatewayName | No | Prefix Used for ExpressRoute Gateway.
parVirtualWanHubs | No | Array Used for multiple Virtual WAN Hubs deployment. Each object in the array represents an individual Virtual WAN Hub configuration. Add/remove additional objects in the array to meet the number of Virtual WAN Hubs required. - `parVpnGatewayEnabled` - Switch to enable/disable VPN Gateway deployment on the respective Virtual WAN Hub. - `parExpressRouteGatewayEnabled` - Switch to enable/disable ExpressRoute Gateway deployment on the respective Virtual WAN Hub. - `parAzFirewallEnabled` - Switch to enable/disable Azure Firewall deployment on the respective Virtual WAN Hub. - `parVirtualHubAddressPrefix` - The IP address range in CIDR notation for the vWAN virtual Hub to use. - `parHubLocation` - The Virtual WAN Hub location. - `parHubRoutingPreference` - The Virtual WAN Hub routing preference. The allowed values are `ASN`, `VpnGateway`, `ExpressRoute`. - `parVirtualRouterAutoScaleConfiguration` - The Virtual WAN Hub capacity. The value should be between 2 to 50. - `parVirtualHubRoutingIntentDestinations` - The Virtual WAN Hub routing intent destinations, leave empty if not wanting to enable routing intent. The allowed values are `Internet`, `PrivateTraffic`. - `parUseCustomNamingScheme` - Switch to enable/disable custom naming scheme. When enabled a custom name can be given for Azure Firewall, ExpressRoute Gateway, VPN Gateway and Virtual Hubs.
parVpnGatewayName | No | VPN Gateway Name.
parExpressRouteGatewayName | No | ExpressRoute Gateway Name.
parAzFirewallName | No | Azure Firewall Name.
parAzFirewallAvailabilityZones | No | Availability Zones to deploy the Azure Firewall across. Region must support Availability Zones to use. If it does not then leave empty.
parAzFirewallPoliciesName | No | Azure Firewall Policies Name.
Expand Down Expand Up @@ -54,7 +54,7 @@ Prefix value which will be prepended to all resource names.

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Azure Firewall Tier associated with the Firewall to deploy.
Azure Firewall Tier associated with the Firewall to deploy. If not set, the default value is Standard.

- Default value: `Standard`

Expand Down Expand Up @@ -90,7 +90,7 @@ Switch to enable/disable Azure Firewall DNS Proxy.

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Array of custom DNS servers used by Azure Firewall
Array of custom DNS servers used by Azure Firewall.

### parVirtualWanName

Expand Down Expand Up @@ -122,22 +122,23 @@ Array Used for multiple Virtual WAN Hubs deployment. Each object in the array re
- `parHubRoutingPreference` - The Virtual WAN Hub routing preference. The allowed values are `ASN`, `VpnGateway`, `ExpressRoute`.
- `parVirtualRouterAutoScaleConfiguration` - The Virtual WAN Hub capacity. The value should be between 2 to 50.
- `parVirtualHubRoutingIntentDestinations` - The Virtual WAN Hub routing intent destinations, leave empty if not wanting to enable routing intent. The allowed values are `Internet`, `PrivateTraffic`.
- `parUseCustomNamingScheme` - Switch to enable/disable custom naming scheme. When enabled a custom name can be given for Azure Firewall, ExpressRoute Gateway, VPN Gateway and Virtual Hubs.



### parVpnGatewayName

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Prefix Used for VPN Gateway.
VPN Gateway Name.

- Default value: `[format('{0}-vpngw', parameters('parCompanyPrefix'))]`

### parExpressRouteGatewayName

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Prefix Used for ExpressRoute Gateway.
ExpressRoute Gateway Name.

- Default value: `[format('{0}-ergw', parameters('parCompanyPrefix'))]`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ module minimum_vwan_conn '../vwanConnectivity.bicep' = {
parAzFirewallEnabled: true
parVirtualHubAddressPrefix: '10.100.0.0/23'
parHubLocation: 'centralus'
parhubRoutingPreference: 'ExpressRoute' //allowed values are 'ASN','VpnGateway','ExpressRoute'
parvirtualRouterAutoScaleConfiguration: 2 //minimum capacity should be between 2 to 50
parHubRoutingPreference: 'ExpressRoute' //allowed values are 'ASN','VpnGateway','ExpressRoute'
parVirtualRouterAutoScaleConfiguration: 2 //minimum capacity should be between 2 to 50
parVirtualHubRoutingIntentDestinations: []
} ]
parAzFirewallDnsProxyEnabled: true
Expand Down
Loading
Loading