Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
109b1a1
commit 8a566df
Showing
7 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...-definitions/storageAccount-Firewalls-and-virtualNetworks/azurepolicyset.definitions.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
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
25 changes: 0 additions & 25 deletions
25
policy-definitions/restric-public-storageAccount/README.md
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
policy-definitions/restrict-public-storageAccount/README.md
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,25 @@ | ||
# Restrict public-facing Storage Accounts | ||
|
||
This policy restrict creation of storage accounts that are not connected to a VNet Service Endpoint. | ||
## Try on Portal | ||
|
||
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/?feature.customportal=falseµsoft_azure_policy=trueµsoft_azure_policy_policyinsights=true&feature.microsoft_azure_security_policy=trueµsoft_azure_marketplace_policy=true#blade/Microsoft_Azure_Policy/CreatePolicyDefinitionBlade/uri/https%3A%2F%2Fraw.githubusercontent.com%2Ftyconsulting%2Fazurepolicy%2Fmaster%2Fpolicy-definitions%2Frestric-public-storageAccount%2Fazurepolicy.json) | ||
|
||
## Try with PowerShell | ||
|
||
````powershell | ||
$definition = New-AzureRmPolicyDefinition -Name "restrict-public-storageAccount" -DisplayName "Restrict Storage Accounts firewall rules" -description "This policy restrict creation of storage accounts that are not connected to a VNet Service Endpoint" -Policy 'https://raw.githubusercontent.com/tyconsulting/azurepolicy/master/policy-definitions/restrict-public-storageAccount/azurepolicy.rules.json' -Parameter 'https://raw.githubusercontent.com/tyconsulting/azurepolicy/master/policy-definitions/restrict-public-storageAccount/azurepolicy.parameters.json' -Mode All | ||
$definition | ||
$assignment = New-AzureRMPolicyAssignment -Name <assignmentname> -Scope <scope> -PolicyDefinition $definition | ||
$assignment | ||
```` | ||
|
||
## Try with CLI | ||
|
||
````cli | ||
az policy definition create --name 'restrict-public-storageAccount' --display-name 'Restrict Storage Accounts firewall rules' --description 'This policy restrict creation of storage accounts that are not connected to a VNet Service Endpoint' --rules 'https://raw.githubusercontent.com/tyconsulting/azurepolicy/master/policy-definitions/restrict-public-storageAccount/azurepolicy.rules.json' --params 'https://raw.githubusercontent.com/tyconsulting/azurepolicy/master/policy-definitions/restrict-public-storageAccount/azurepolicy.parameters.json' --mode All | ||
az policy assignment create --name <assignmentname> --scope <scope> --policy "restrict-public-storageAccount" | ||
```` |
File renamed without changes.
File renamed without changes.
File renamed without changes.