-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
d9edfda
commit abc1d99
Showing
19 changed files
with
707 additions
and
838 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
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
.../subscription-1/rg-app-001/dev.bicepparam → .../subscription-1/rg-app-001/dev.bicepparam
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
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
41 changes: 41 additions & 0 deletions
41
deployments/contoso/landing-zones/subscription-1/rg-app-003/deploy.bicep
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,41 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
// Note: | ||
// This Azure Bicep code demonstrates using an AVM module. | ||
|
||
module vault 'br/public:avm/res/key-vault/vault:0.3.5' = { | ||
// The name of the deployment. | ||
name: '${uniqueString(deployment().name)}-test-kvvwaf' | ||
params: { | ||
|
||
// The name of the key vault. | ||
name: 'kvvwaf002' | ||
|
||
// Try setting any of these to false to flag an issue. | ||
enablePurgeProtection: true | ||
enableRbacAuthorization: true | ||
|
||
networkAcls: { | ||
bypass: 'AzureServices' | ||
|
||
// Try setting the firewall to 'Allow' traffic by default to flag an issue. | ||
defaultAction: 'Deny' | ||
} | ||
|
||
diagnosticSettings: [ | ||
{ | ||
workspaceResourceId: '<workspaceResourceId>' | ||
} | ||
] | ||
|
||
softDeleteRetentionInDays: 7 | ||
|
||
// An env tag must be test, dev, or prod. | ||
// Try setting this to 'demo' to fail the custom organization Org.Azure.Tags rule. | ||
// See .ps-rule/Org.Rule.yaml for details. | ||
tags: { | ||
env: 'dev' | ||
} | ||
} | ||
} |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// Create or update a Private Endpoint for the Storage Account. | ||
|
||
// ---------- | ||
// PARAMETERS | ||
// ---------- | ||
|
||
@description('The name of the Private Endpoint.') | ||
param name string | ||
|
||
@metadata({ | ||
strongType: 'location' | ||
example: 'eastus' | ||
}) | ||
@description('The Azure region to deploy to.') | ||
param location string | ||
|
||
@description('The unique resource identifer for the resource to expose through the Private Endpoint.') | ||
param resourceId string | ||
|
||
@allowed([ | ||
'blob' | ||
'file' | ||
'table' | ||
'queue' | ||
]) | ||
@description('The sub-resources to register the Private Endpoint for.') | ||
param groupId string | ||
|
||
@metadata({ | ||
strongType: 'Microsoft.Network/virtualNetworks/subnets' | ||
}) | ||
@description('The unique resource identifer for the subnet to join the private endpoint to.') | ||
param subnetId string | ||
|
||
@metadata({ | ||
strongType: 'Microsoft.Network/privateDnsZones' | ||
}) | ||
@description('The private DNS zone to register the private endpoint within.') | ||
param privateDnsZoneId string = '' | ||
|
||
@description('Tags to apply to the resource.') | ||
param tags object | ||
|
||
// --------- | ||
// VARIABLES | ||
// --------- | ||
|
||
// --------- | ||
// RESOURCES | ||
// --------- | ||
|
||
@description('Create or update a Private Endpoint for a resource.') | ||
resource endpoint 'Microsoft.Network/privateEndpoints@2023-04-01' = { | ||
location: location | ||
name: name | ||
properties: { | ||
subnet: { | ||
id: subnetId | ||
} | ||
privateLinkServiceConnections: [ | ||
{ | ||
name: name | ||
properties: { | ||
privateLinkServiceId: resourceId | ||
groupIds: [ | ||
groupId | ||
] | ||
} | ||
} | ||
] | ||
} | ||
tags: tags | ||
} | ||
|
||
@description('Configures DNS for the Private Endpoint.') | ||
resource endpointGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2023-04-01' = if (!empty(privateDnsZoneId)) { | ||
parent: endpoint | ||
name: 'default' | ||
properties: { | ||
privateDnsZoneConfigs: [ | ||
{ | ||
name: replace(last(split(privateDnsZoneId, '/')), '.', '-') | ||
properties: { | ||
privateDnsZoneId: privateDnsZoneId | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
// ------- | ||
// OUTPUTS | ||
// ------- | ||
|
||
@description('A unique identifier for the Private Endpoint.') | ||
output id string = endpoint.id | ||
|
||
@description('The name of the associated Private DNS Zone.') | ||
output privateDnsZone string = last(split(privateDnsZoneId, '/')) | ||
|
||
@description('The name of the Resource Group where the Private Endpoint is deployed.') | ||
output resourceGroupName string = resourceGroup().name | ||
|
||
@description('The guid for the subscription where the Private Endpoint is deployed.') | ||
output subscriptionId string = subscription().subscriptionId |
Oops, something went wrong.