Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
segraef committed Feb 24, 2024
1 parent 67f545f commit 615675b
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions avm/res/automation/automation-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -331,31 +331,42 @@ resource automationAccount_diagnosticSettings 'Microsoft.Insights/diagnosticSett
module automationAccount_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.3.1' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
name: '${uniqueString(deployment().name, location)}-automationAccount-PrivateEndpoint-${index}'
params: {
privateLinkServiceConnections: [
name: privateEndpoint.?name ?? 'pep-${last(split(automationAccount.id, '/'))}-${privateEndpoint.service}-${index}'
privateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections != true ? [
{
name: name
name: privateEndpoint.?privateLinkServiceConnectionName ?? '${last(split(automationAccount.id, '/'))}-${privateEndpoint.service}-${index}'
properties: {
privateLinkServiceId: automationAccount.id
groupIds: [
privateEndpoint.?service ?? 'automationaccount'
privateEndpoint.service
]
}
}
]
name: privateEndpoint.?name ?? 'pep-${last(split(automationAccount.id, '/'))}-${privateEndpoint.?service ?? privateEndpoint.service}-${index}'
] : null
manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections == true ? [
{
name: privateEndpoint.?privateLinkServiceConnectionName ?? '${last(split(automationAccount.id, '/'))}-${privateEndpoint.service}-${index}'
properties: {
privateLinkServiceId: automationAccount.id
groupIds: [
privateEndpoint.service
]
requestMessage: privateEndpoint.?manualConnectionRequestMessage ?? 'Manual approval required.'
}
}
] : null
subnetResourceId: privateEndpoint.subnetResourceId
enableTelemetry: privateEndpoint.?enableTelemetry ?? enableTelemetry
location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
lock: privateEndpoint.?lock ?? lock
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
enableTelemetry: privateEndpoint.?enableTelemetry ?? enableTelemetry
}
}]

Expand Down Expand Up @@ -438,7 +449,7 @@ type privateEndpointType = {
@description('Optional. The location to deploy the private endpoint to.')
location: string?

@description('Required. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
@description('Required. The subresource to deploy the private endpoint for. For example "blob", "table", "queue" or "file".')
service: string

@description('Required. Resource ID of the subnet where the endpoint needs to be created.')
Expand All @@ -450,6 +461,12 @@ type privateEndpointType = {
@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. If Manual Private Link Connection is required.')
isManualConnection: bool?

@description('Optional. A message passed to the owner of the remote resource with the manual connection request. Restricted to 140 chars.')
manualConnectionRequestMessage: string?

@description('Optional. Custom DNS configurations.')
customDnsConfigs: {
@description('Required. Fqdn that resolves to private endpoint ip address.')
Expand Down Expand Up @@ -492,9 +509,6 @@ type privateEndpointType = {
@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?
}[]?
Expand Down

0 comments on commit 615675b

Please sign in to comment.