Skip to content

Commit 5379df8

Browse files
feat: Web-Site - Updated UDTs to pending specs #4099 (#4101)
## Description Updated user-defined types with pending Azure/Azure-Verified-Modules#1738 & #4098. ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | [![avm.res.web.site](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.web.site.yml/badge.svg?branch=users%2Falsehr%2Favm.res.web.site_udt&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.web.site.yml) ## Type of Change <!-- Use the checkboxes [x] on the options that are relevant. --> - [ ] Update to CI Environment or utilities (Non-module affecting changes) - [x] Azure Verified Module updates: - [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation
1 parent 72f2207 commit 5379df8

File tree

18 files changed

+1498
-1743
lines changed

18 files changed

+1498
-1743
lines changed

avm/res/web/site/README.md

Lines changed: 28 additions & 81 deletions
Large diffs are not rendered by default.

avm/res/web/site/main.bicep

Lines changed: 22 additions & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ param clientAffinityEnabled bool = true
4040
@description('Optional. The resource ID of the app service environment to use for this resource.')
4141
param appServiceEnvironmentResourceId string?
4242

43+
import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
4344
@description('Optional. The managed identity definition for this resource.')
44-
param managedIdentities managedIdentitiesType
45+
param managedIdentities managedIdentityAllType?
4546

4647
@description('Optional. The resource ID of the assigned identity to be used to access a key vault with.')
4748
param keyVaultAccessIdentityResourceId string?
@@ -95,14 +96,16 @@ param appSettingsKeyValuePairs object?
9596
@description('Optional. The auth settings V2 configuration.')
9697
param authSettingV2Configuration object?
9798

99+
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
98100
@description('Optional. The lock settings of the service.')
99-
param lock lockType
101+
param lock lockType?
100102

101103
@description('Optional. The logs settings configuration.')
102104
param logsConfiguration object?
103105

106+
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
104107
@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
105-
param privateEndpoints privateEndpointType
108+
param privateEndpoints privateEndpointSingleServiceType[]?
106109

107110
@description('Optional. Configuration for deployment slots for an app.')
108111
param slots array?
@@ -113,11 +116,13 @@ param tags object?
113116
@description('Optional. Enable/Disable usage telemetry for module.')
114117
param enableTelemetry bool = true
115118

119+
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
116120
@description('Optional. Array of role assignments to create.')
117-
param roleAssignments roleAssignmentType
121+
param roleAssignments roleAssignmentType[]?
118122

123+
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
119124
@description('Optional. The diagnostic settings of the service.')
120-
param diagnosticSettings diagnosticSettingType
125+
param diagnosticSettings diagnosticSettingFullType[]?
121126

122127
@description('Optional. To enable client certificate authentication (TLS mutual authentication).')
123128
param clientCertEnabled bool = false
@@ -480,7 +485,15 @@ resource app_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01
480485
module app_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.7.1' = [
481486
for (privateEndpoint, index) in (privateEndpoints ?? []): {
482487
name: '${uniqueString(deployment().name, location)}-app-PrivateEndpoint-${index}'
483-
scope: resourceGroup(privateEndpoint.?resourceGroupName ?? '')
488+
scope: !empty(privateEndpoint.?resourceGroupResourceId)
489+
? resourceGroup(
490+
split((privateEndpoint.?resourceGroupResourceId ?? '//'), '/')[2],
491+
split((privateEndpoint.?resourceGroupResourceId ?? '////'), '/')[4]
492+
)
493+
: resourceGroup(
494+
split((privateEndpoint.?subnetResourceId ?? '//'), '/')[2],
495+
split((privateEndpoint.?subnetResourceId ?? '////'), '/')[4]
496+
)
484497
params: {
485498
name: privateEndpoint.?name ?? 'pep-${last(split(app.id, '/'))}-${privateEndpoint.?service ?? 'sites'}-${index}'
486499
privateLinkServiceConnections: privateEndpoint.?isManualConnection != true
@@ -545,11 +558,11 @@ output slotResourceIds array = [for (slot, index) in (slots ?? []): app_slots[in
545558
output resourceGroupName string = resourceGroup().name
546559

547560
@description('The principal ID of the system assigned identity.')
548-
output systemAssignedMIPrincipalId string = app.?identity.?principalId ?? ''
561+
output systemAssignedMIPrincipalId string? = app.?identity.?principalId
549562

550563
@description('The principal ID of the system assigned identity of slots.')
551-
output slotSystemAssignedMIPrincipalIds array = [
552-
for (slot, index) in (slots ?? []): app_slots[index].outputs.systemAssignedMIPrincipalId
564+
output slotSystemAssignedMIPrincipalIds string[] = [
565+
for (slot, index) in (slots ?? []): app_slots[index].outputs.systemAssignedMIPrincipalId ?? ''
553566
]
554567

555568
@description('The location the resource was deployed into.')
@@ -577,179 +590,3 @@ output slotPrivateEndpoints array = [for (slot, index) in (slots ?? []): app_slo
577590

578591
@description('The outbound IP addresses of the app.')
579592
output outboundIpAddresses string = app.properties.outboundIpAddresses
580-
// =============== //
581-
// Definitions //
582-
// =============== //
583-
584-
type managedIdentitiesType = {
585-
@description('Optional. Enables system assigned managed identity on the resource.')
586-
systemAssigned: bool?
587-
588-
@description('Optional. The resource ID(s) to assign to the resource.')
589-
userAssignedResourceIds: string[]?
590-
}?
591-
592-
type lockType = {
593-
@description('Optional. Specify the name of lock.')
594-
name: string?
595-
596-
@description('Optional. Specify the type of lock.')
597-
kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
598-
}?
599-
600-
type roleAssignmentType = {
601-
@description('Optional. The name (as GUID) of the role assignment. If not provided, a GUID will be generated.')
602-
name: string?
603-
604-
@description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
605-
roleDefinitionIdOrName: string
606-
607-
@description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
608-
principalId: string
609-
610-
@description('Optional. The principal type of the assigned principal ID.')
611-
principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
612-
613-
@description('Optional. The description of the role assignment.')
614-
description: string?
615-
616-
@description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container".')
617-
condition: string?
618-
619-
@description('Optional. Version of the condition.')
620-
conditionVersion: '2.0'?
621-
622-
@description('Optional. The Resource Id of the delegated managed identity resource.')
623-
delegatedManagedIdentityResourceId: string?
624-
}[]?
625-
626-
type privateEndpointType = {
627-
@description('Optional. The name of the private endpoint.')
628-
name: string?
629-
630-
@description('Optional. The location to deploy the private endpoint to.')
631-
location: string?
632-
633-
@description('Optional. The name of the private link connection to create.')
634-
privateLinkServiceConnectionName: string?
635-
636-
@description('Optional. The subresource to deploy the private endpoint for. For example "vault", "mysqlServer" or "dataFactory".')
637-
service: string?
638-
639-
@description('Required. Resource ID of the subnet where the endpoint needs to be created.')
640-
subnetResourceId: string
641-
642-
@description('Optional. The private DNS zone group to configure for the private endpoint.')
643-
privateDnsZoneGroup: {
644-
@description('Optional. The name of the Private DNS Zone Group.')
645-
name: string?
646-
647-
@description('Required. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones.')
648-
privateDnsZoneGroupConfigs: {
649-
@description('Optional. The name of the private DNS zone group config.')
650-
name: string?
651-
652-
@description('Required. The resource id of the private DNS zone.')
653-
privateDnsZoneResourceId: string
654-
}[]
655-
}?
656-
657-
@description('Optional. If Manual Private Link Connection is required.')
658-
isManualConnection: bool?
659-
660-
@description('Optional. A message passed to the owner of the remote resource with the manual connection request.')
661-
@maxLength(140)
662-
manualConnectionRequestMessage: string?
663-
664-
@description('Optional. Custom DNS configurations.')
665-
customDnsConfigs: {
666-
@description('Optional. FQDN that resolves to private endpoint IP address.')
667-
fqdn: string?
668-
669-
@description('Required. A list of private IP addresses of the private endpoint.')
670-
ipAddresses: string[]
671-
}[]?
672-
673-
@description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
674-
ipConfigurations: {
675-
@description('Required. The name of the resource that is unique within a resource group.')
676-
name: string
677-
678-
@description('Required. Properties of private endpoint IP configurations.')
679-
properties: {
680-
@description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
681-
groupId: string
682-
683-
@description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
684-
memberName: string
685-
686-
@description('Required. A private IP address obtained from the private endpoint\'s subnet.')
687-
privateIPAddress: string
688-
}
689-
}[]?
690-
691-
@description('Optional. Application security groups in which the private endpoint IP configuration is included.')
692-
applicationSecurityGroupResourceIds: string[]?
693-
694-
@description('Optional. The custom name of the network interface attached to the private endpoint.')
695-
customNetworkInterfaceName: string?
696-
697-
@description('Optional. Specify the type of lock.')
698-
lock: lockType
699-
700-
@description('Optional. Array of role assignments to create.')
701-
roleAssignments: roleAssignmentType
702-
703-
@description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
704-
tags: object?
705-
706-
@description('Optional. Enable/Disable usage telemetry for module.')
707-
enableTelemetry: bool?
708-
709-
@description('Optional. Specify if you want to deploy the Private Endpoint into a different resource group than the main resource.')
710-
resourceGroupName: string?
711-
}[]?
712-
713-
type diagnosticSettingType = {
714-
@description('Optional. The name of diagnostic setting.')
715-
name: string?
716-
717-
@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection.')
718-
logCategoriesAndGroups: {
719-
@description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
720-
category: string?
721-
722-
@description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to `allLogs` to collect all logs.')
723-
categoryGroup: string?
724-
725-
@description('Optional. Enable or disable the category explicitly. Default is `true`.')
726-
enabled: bool?
727-
}[]?
728-
729-
@description('Optional. The name of metrics that will be streamed. "allMetrics" includes all possible metrics for the resource. Set to `[]` to disable metric collection.')
730-
metricCategories: {
731-
@description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to `AllMetrics` to collect all metrics.')
732-
category: string
733-
734-
@description('Optional. Enable or disable the category explicitly. Default is `true`.')
735-
enabled: bool?
736-
}[]?
737-
738-
@description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
739-
logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
740-
741-
@description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
742-
workspaceResourceId: string?
743-
744-
@description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
745-
storageAccountResourceId: string?
746-
747-
@description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
748-
eventHubAuthorizationRuleResourceId: string?
749-
750-
@description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
751-
eventHubName: string?
752-
753-
@description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
754-
marketplacePartnerResourceId: string?
755-
}[]?

0 commit comments

Comments
 (0)