Skip to content

Commit

Permalink
[Modules] Updated PE schema to AVM specs (#4147)
Browse files Browse the repository at this point in the history
* Updated templates

* Update to latest

* Regenerated templates

* Updated readmes

* Applied fixes & regen
  • Loading branch information
AlexanderSehr authored Oct 25, 2023
1 parent 90e7f30 commit 579ac97
Show file tree
Hide file tree
Showing 123 changed files with 13,558 additions and 1,259 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ module testDeployment '../../main.bicep' = {
nestedDependencies.outputs.privateDNSZoneResourceId

]
service: 'configurationStores'
subnetResourceId: nestedDependencies.outputs.subnetResourceId
tags: {
'hidden-title': 'This is visible in the resource name'
Expand Down
165 changes: 162 additions & 3 deletions modules/app-configuration/configuration-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
service: 'configurationStores'
subnetResourceId: '<subnetResourceId>'
tags: {
Environment: 'Non-Prod'
Expand Down Expand Up @@ -458,7 +457,6 @@ module configurationStore 'br:bicep/modules/app-configuration.configuration-stor
"privateDnsZoneResourceIds": [
"<privateDNSZoneResourceId>"
],
"service": "configurationStores",
"subnetResourceId": "<subnetResourceId>",
"tags": {
"Environment": "Non-Prod",
Expand Down Expand Up @@ -690,7 +688,168 @@ Name of the Azure App Configuration.
Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
- Required: No
- Type: array
- Default: `[]`


| Name | Required | Type | Description |
| :-- | :-- | :--| :-- |
| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | No | array | Optional. Application security groups in which the private endpoint IP configuration is included. |
| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | No | array | Optional. Custom DNS configurations. |
| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | No | string | Optional. The custom name of the network interface attached to the private endpoint. |
| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | No | bool | Optional. Enable/Disable usage telemetry for module. |
| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | No | array | Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
| [`location`](#parameter-privateendpointslocation) | No | string | Optional. The location to deploy the private endpoint to. |
| [`lock`](#parameter-privateendpointslock) | No | object | Optional. Specify the type of lock. |
| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | No | array | Optional. Manual PrivateLink Service Connections. |
| [`name`](#parameter-privateendpointsname) | No | string | Optional. The name of the private endpoint. |
| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | No | string | Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | No | array | Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
| [`roleAssignments`](#parameter-privateendpointsroleassignments) | No | array | Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
| [`service`](#parameter-privateendpointsservice) | No | string | Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | Yes | string | Required. Resource ID of the subnet where the endpoint needs to be created. |
| [`tags`](#parameter-privateendpointstags) | No | object | Optional. Tags to be applied on all resources/resource groups in this deployment. |

### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`

Optional. Application security groups in which the private endpoint IP configuration is included.

- Required: No
- Type: array

### Parameter: `privateEndpoints.customDnsConfigs`

Optional. Custom DNS configurations.

- Required: No
- Type: array

| Name | Required | Type | Description |
| :-- | :-- | :--| :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | No | string | |
| [`ipAddresses`](#parameter-privateendpointscustomdnsconfigsipaddresses) | Yes | array | |

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`
- Required: No
- Type: string

### Parameter: `privateEndpoints.customDnsConfigs.ipAddresses`
- Required: Yes
- Type: array


### Parameter: `privateEndpoints.customNetworkInterfaceName`

Optional. The custom name of the network interface attached to the private endpoint.

- Required: No
- Type: string

### Parameter: `privateEndpoints.enableTelemetry`

Optional. Enable/Disable usage telemetry for module.

- Required: No
- Type: bool

### Parameter: `privateEndpoints.ipConfigurations`

Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.

- Required: No
- Type: array

| Name | Required | Type | Description |
| :-- | :-- | :--| :-- |
| [`groupId`](#parameter-privateendpointsipconfigurationsgroupid) | Yes | string | |
| [`memberName`](#parameter-privateendpointsipconfigurationsmembername) | Yes | string | |
| [`name`](#parameter-privateendpointsipconfigurationsname) | Yes | string | |
| [`privateIpAddress`](#parameter-privateendpointsipconfigurationsprivateipaddress) | Yes | string | |

### Parameter: `privateEndpoints.ipConfigurations.groupId`
- Required: Yes
- Type: string

### Parameter: `privateEndpoints.ipConfigurations.memberName`
- Required: Yes
- Type: string

### Parameter: `privateEndpoints.ipConfigurations.name`
- Required: Yes
- Type: string

### Parameter: `privateEndpoints.ipConfigurations.privateIpAddress`
- Required: Yes
- Type: string


### Parameter: `privateEndpoints.location`

Optional. The location to deploy the private endpoint to.

- Required: No
- Type: string

### Parameter: `privateEndpoints.lock`

Optional. Specify the type of lock.

- Required: No
- Type: object

### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`

Optional. Manual PrivateLink Service Connections.

- Required: No
- Type: array

### Parameter: `privateEndpoints.name`

Optional. The name of the private endpoint.

- Required: No
- Type: string

### Parameter: `privateEndpoints.privateDnsZoneGroupName`

Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.

- Required: No
- Type: string

### Parameter: `privateEndpoints.privateDnsZoneResourceIds`

Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.

- Required: No
- Type: array

### Parameter: `privateEndpoints.roleAssignments`

Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.

- Required: No
- Type: array

### Parameter: `privateEndpoints.service`

Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".

- Required: No
- Type: string

### Parameter: `privateEndpoints.subnetResourceId`

Required. Resource ID of the subnet where the endpoint needs to be created.

- Required: Yes
- Type: string

### Parameter: `privateEndpoints.tags`

Optional. Tags to be applied on all resources/resource groups in this deployment.

- Required: No
- Type: object

### Parameter: `publicNetworkAccess`

Expand Down
87 changes: 71 additions & 16 deletions modules/app-configuration/configuration-store/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ param diagnosticMetricsToEnable array = [
param diagnosticSettingsName string = ''

@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
param privateEndpoints array = []
param privateEndpoints privateEndpointType

var enableReferencedModulesTelemetry = false

Expand Down Expand Up @@ -247,27 +247,27 @@ resource configurationStore_roleAssignments 'Microsoft.Authorization/roleAssignm
scope: configurationStore
}]

module configurationStore_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in privateEndpoints: {
name: '${uniqueString(deployment().name, location)}-AppConfig-PrivateEndpoint-${index}'
module configurationStore_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
name: '${uniqueString(deployment().name, location)}-configurationStore-PrivateEndpoint-${index}'
params: {
groupIds: [
privateEndpoint.service
privateEndpoint.?service ?? 'configurationStores'
]
name: contains(privateEndpoint, 'name') ? privateEndpoint.name : 'pe-${last(split(configurationStore.id, '/'))}-${privateEndpoint.service}-${index}'
name: privateEndpoint.?name ?? 'pep-${last(split(configurationStore.id, '/'))}-${privateEndpoint.?service ?? 'configurationStores'}-${index}'
serviceResourceId: configurationStore.id
subnetResourceId: privateEndpoint.subnetResourceId
enableDefaultTelemetry: enableReferencedModulesTelemetry
location: contains(privateEndpoint, 'location') ? privateEndpoint.location : reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
lock: privateEndpoint.?lock ?? lock
privateDnsZoneGroupName: contains(privateEndpoint, 'privateDnsZoneGroupName') ? privateEndpoint.privateDnsZoneGroupName : 'default'
privateDnsZoneResourceIds: contains(privateEndpoint, 'privateDnsZoneResourceIds') ? privateEndpoint.privateDnsZoneResourceIds : []
roleAssignments: contains(privateEndpoint, 'roleAssignments') ? privateEndpoint.roleAssignments : []
tags: contains(privateEndpoint, 'tags') ? privateEndpoint.tags : {}
manualPrivateLinkServiceConnections: contains(privateEndpoint, 'manualPrivateLinkServiceConnections') ? privateEndpoint.manualPrivateLinkServiceConnections : []
customDnsConfigs: contains(privateEndpoint, 'customDnsConfigs') ? privateEndpoint.customDnsConfigs : []
ipConfigurations: contains(privateEndpoint, 'ipConfigurations') ? privateEndpoint.ipConfigurations : []
applicationSecurityGroupResourceIds: contains(privateEndpoint, 'applicationSecurityGroupResourceIds') ? privateEndpoint.applicationSecurityGroupResourceIds : []
customNetworkInterfaceName: contains(privateEndpoint, 'customNetworkInterfaceName') ? privateEndpoint.customNetworkInterfaceName : ''
privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
roleAssignments: privateEndpoint.?roleAssignments
tags: privateEndpoint.?tags ?? tags
manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
customDnsConfigs: privateEndpoint.?customDnsConfigs
ipConfigurations: privateEndpoint.?ipConfigurations
applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
}
}]

Expand Down Expand Up @@ -320,3 +320,58 @@ type roleAssignmentType = {
@description('Optional. The Resource Id of the delegated managed identity resource.')
delegatedManagedIdentityResourceId: string?
}[]?

type privateEndpointType = {
@description('Optional. The name of the private endpoint.')
name: string?

@description('Optional. The location to deploy the private endpoint to.')
location: string?

@description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
service: string?

@description('Required. Resource ID of the subnet where the endpoint needs to be created.')
subnetResourceId: string

@description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
privateDnsZoneGroupName: string?

@description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
privateDnsZoneResourceIds: string[]?

@description('Optional. Custom DNS configurations.')
customDnsConfigs: {
fqdn: string?
ipAddresses: string[]
}[]?

@description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
ipConfigurations: {
name: string
groupId: string
memberName: string
privateIpAddress: string
}[]?

@description('Optional. Application security groups in which the private endpoint IP configuration is included.')
applicationSecurityGroupResourceIds: string[]?

@description('Optional. The custom name of the network interface attached to the private endpoint.')
customNetworkInterfaceName: string?

@description('Optional. Specify the type of lock.')
lock: lockType

@description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalId\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
roleAssignments: roleAssignmentType

@description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
tags: object?

@description('Optional. Manual PrivateLink Service Connections.')
manualPrivateLinkServiceConnections: array?

@description('Optional. Enable/Disable usage telemetry for module.')
enableTelemetry: bool?
}[]?
Loading

0 comments on commit 579ac97

Please sign in to comment.