-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Private subnet policy and portal update (#1728)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jack Tracey <[email protected]>
- Loading branch information
1 parent
658f2cb
commit 27e31f4
Showing
8 changed files
with
154 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...Arm/managementGroupTemplates/policyAssignments/ENFORCE-SubnetPrivatePolicyAssignment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"effect": { | ||
"type": "string", | ||
"allowedValues": [ | ||
"Deny", | ||
"Audit", | ||
"Disabled" | ||
], | ||
"defaultValue": "Audit" | ||
}, | ||
"enforcementMode": { | ||
"type": "string", | ||
"allowedValues": [ | ||
"Default", | ||
"DoNotEnforce" | ||
], | ||
"defaultValue": "Default" | ||
}, | ||
"nonComplianceMessagePlaceholder": { | ||
"type": "string", | ||
"defaultValue": "{enforcementMode}" | ||
} | ||
}, | ||
"variables": { | ||
"policyDefinitions": { | ||
"privateSubnet": "/providers/Microsoft.Authorization/policyDefinitions/7bca8353-aa3b-429b-904a-9229c4385837" | ||
}, | ||
"policyAssignmentNames": { | ||
"privateSubnet": "Enforce-Subnet-Private", | ||
"description": "Ensure your subnets are secure by default by preventing default outbound access. For more information go to https://aka.ms/defaultoutboundaccessretirement", | ||
"displayName": "Subnets should be private" | ||
}, | ||
"nonComplianceMessage": { | ||
"message": "Subnets {enforcementMode} be private.", | ||
"Default": "must", | ||
"DoNotEnforce": "should" | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Authorization/policyAssignments", | ||
"apiVersion": "2022-06-01", | ||
"name": "[variables('policyAssignmentNames').privateSubnet]", | ||
"properties": { | ||
"description": "[variables('policyAssignmentNames').description]", | ||
"displayName": "[variables('policyAssignmentNames').displayName]", | ||
"policyDefinitionId": "[variables('policyDefinitions').privateSubnet]", | ||
"enforcementMode": "[parameters('enforcementMode')]", | ||
"nonComplianceMessages": [ | ||
{ | ||
"message": "[replace(variables('nonComplianceMessage').message, parameters('nonComplianceMessagePlaceholder'), variables('nonComplianceMessage')[parameters('enforcementMode')])]" | ||
} | ||
], | ||
"parameters": { | ||
"effect": { | ||
"value": "[parameters('effect')]" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"outputs": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.