Skip to content

Commit

Permalink
feat: avm/utl/types/avm-common-types Private Endpoint UDT includes …
Browse files Browse the repository at this point in the history
…Resource Group ID (#4141)

## Description

Allow the Resource Group to be specified, where a Private Endpoint will
be created. If not specified, use the Resource Group of the Subnet.

Fixes #4140 

## Pipeline Reference

| Pipeline |
| -------- |
|          |

## Type of Change

- [ ] 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`:
- [x] 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.
- [x] 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

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [ ] My corresponding pipelines / checks run clean and green without
any errors or warnings
  • Loading branch information
ReneHezser authored Jan 10, 2025
1 parent 5ed0e20 commit 7ea6765
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions avm/utl/types/avm-common-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ param privateEndpointMultiService privateEndpointMultiServiceType[] = [
}
]
subnetResourceId: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/defaultSubnet'
resourceGroupResourceId: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg'
service: 'blob'
applicationSecurityGroupResourceIds: [
'/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft.Network/applicationSecurityGroups/myAsg'
Expand Down
6 changes: 6 additions & 0 deletions avm/utl/types/avm-common-types/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ type privateEndpointSingleServiceType = {
@description('Required. Resource ID of the subnet where the endpoint needs to be created.')
subnetResourceId: string

@description('Optional. The resource ID of the Resource Group the Private Endpoint will be created in. If not specified, the Resource Group of the provided Virtual Network Subnet is used.')
resourceGroupResourceId: string?

@description('Optional. The private DNS Zone Group to configure for the Private Endpoint.')
privateDnsZoneGroup: privateEndpointPrivateDnsZoneGroupType?

Expand Down Expand Up @@ -319,6 +322,9 @@ type privateEndpointMultiServiceType = {
@description('Required. Resource ID of the subnet where the endpoint needs to be created.')
subnetResourceId: string

@description('Optional. The resource ID of the Resource Group the Private Endpoint will be created in. If not specified, the Resource Group of the provided Virtual Network Subnet is used.')
resourceGroupResourceId: string?

@description('Optional. The private DNS zone group to configure for the private endpoint.')
privateDnsZoneGroup: privateEndpointPrivateDnsZoneGroupType?

Expand Down
22 changes: 19 additions & 3 deletions avm/utl/types/avm-common-types/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "16194187221754358819"
"version": "0.32.4.45862",
"templateHash": "1029853918123623169"
},
"name": "Default interface types for AVM modules",
"description": "This module provides you with all common variants for AVM interfaces to be used in AVM modules.\n\nDetails for how to implement these interfaces can be found in the AVM documentation [here](https://azure.github.io/Azure-Verified-Modules/specs/bcp/res/interfaces/).\n",
Expand Down Expand Up @@ -608,6 +608,14 @@
"description": "Required. Resource ID of the subnet where the endpoint needs to be created."
}
},
"resourceGroupResourceId": {
"type": "string",
"nullable": true,
"metadata": {
"example": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg",
"description": "Optional. The Resource Group the Private Endpoint will be created in. If not specified, the Resource Group of the Subnet is being used."
}
},
"privateDnsZoneGroup": {
"$ref": "#/definitions/privateEndpointPrivateDnsZoneGroupType",
"nullable": true,
Expand Down Expand Up @@ -747,6 +755,14 @@
"description": "Required. Resource ID of the subnet where the endpoint needs to be created."
}
},
"resourceGroupResourceId": {
"type": "string",
"nullable": true,
"metadata": {
"example": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg",
"description": "Optional. The Resource Group the Private Endpoint will be created in. If not specified, the Resource Group of the Subnet is being used."
}
},
"privateDnsZoneGroup": {
"$ref": "#/definitions/privateEndpointPrivateDnsZoneGroupType",
"nullable": true,
Expand Down Expand Up @@ -991,4 +1007,4 @@
}
},
"resources": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ param privateEndpointMultiService privateEndpointMultiServiceType[] = [
}
]
subnetResourceId: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/defaultSubnet'
resourceGroupResourceId: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg'
service: 'blob'
applicationSecurityGroupResourceIds: [
'/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg/providers/Microsoft.Network/applicationSecurityGroups/myAsg'
Expand Down
4 changes: 2 additions & 2 deletions avm/utl/types/avm-common-types/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.4",
"version": "0.5",
"pathFilters": [
"./main.json"
]
}
}

0 comments on commit 7ea6765

Please sign in to comment.