Skip to content

Commit

Permalink
feat: VPN-Server-Configuration - Update to latest UDTs (#4337)
Browse files Browse the repository at this point in the history
## Description

Update to latest UDTs

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.network.vpn-server-configuration](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.network.vpn-server-configuration.yml/badge.svg?branch=users%2Falsehr%2FvpnServerConfig&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.network.vpn-server-configuration.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
  • Loading branch information
AlexanderSehr authored Jan 29, 2025
1 parent 61363ba commit ff8c44e
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 78 deletions.
37 changes: 18 additions & 19 deletions avm/res/network/vpn-server-configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This module deploys a VPN Server Configuration for a Virtual Hub P2S Gateway.
- [Usage examples](#Usage-examples)
- [Parameters](#Parameters)
- [Outputs](#Outputs)
- [Cross-referenced modules](#Cross-referenced-modules)
- [Data Collection](#Data-Collection)

## Resource Types
Expand Down Expand Up @@ -47,8 +48,7 @@ module vpnServerConfiguration 'br/public:avm/res/network/vpn-server-configuratio
// Non-required parameters
aadAudience: '11111111-1234-4321-1234-111111111111'
aadIssuer: 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
aadTenant: 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
location: '<location>'
aadTenant: '<aadTenant>'
p2sConfigurationPolicyGroups: [
{
isDefault: 'true'
Expand Down Expand Up @@ -97,10 +97,7 @@ module vpnServerConfiguration 'br/public:avm/res/network/vpn-server-configuratio
"value": "https://sts.windows.net/11111111-1111-1111-1111-111111111111/"
},
"aadTenant": {
"value": "https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111"
},
"location": {
"value": "<location>"
"value": "<aadTenant>"
},
"p2sConfigurationPolicyGroups": {
"value": [
Expand Down Expand Up @@ -147,8 +144,7 @@ param name = 'vscminVPNConfig'
// Non-required parameters
param aadAudience = '11111111-1234-4321-1234-111111111111'
param aadIssuer = 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
param aadTenant = 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
param location = '<location>'
param aadTenant = '<aadTenant>'
p2sConfigurationPolicyGroups: [
{
isDefault: 'true'
Expand Down Expand Up @@ -192,7 +188,7 @@ module vpnServerConfiguration 'br/public:avm/res/network/vpn-server-configuratio
// Non-required parameters
aadAudience: '11111111-1234-4321-1234-111111111111'
aadIssuer: 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
aadTenant: 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
aadTenant: '<aadTenant>'
location: '<location>'
p2sConfigurationPolicyGroups: [
{
Expand Down Expand Up @@ -322,7 +318,7 @@ module vpnServerConfiguration 'br/public:avm/res/network/vpn-server-configuratio
"value": "https://sts.windows.net/11111111-1111-1111-1111-111111111111/"
},
"aadTenant": {
"value": "https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111"
"value": "<aadTenant>"
},
"location": {
"value": "<location>"
Expand Down Expand Up @@ -464,7 +460,7 @@ param name = 'vscmaxVPNConfig'
// Non-required parameters
param aadAudience = '11111111-1234-4321-1234-111111111111'
param aadIssuer = 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
param aadTenant = 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
param aadTenant = '<aadTenant>'
param location = '<location>'
p2sConfigurationPolicyGroups: [
{
Expand Down Expand Up @@ -589,8 +585,7 @@ module vpnServerConfiguration 'br/public:avm/res/network/vpn-server-configuratio
// Non-required parameters
aadAudience: '11111111-1234-4321-1234-111111111111'
aadIssuer: 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
aadTenant: 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
location: '<location>'
aadTenant: '<aadTenant>'
p2sConfigurationPolicyGroups: [
{
isDefault: 'true'
Expand Down Expand Up @@ -639,10 +634,7 @@ module vpnServerConfiguration 'br/public:avm/res/network/vpn-server-configuratio
"value": "https://sts.windows.net/11111111-1111-1111-1111-111111111111/"
},
"aadTenant": {
"value": "https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111"
},
"location": {
"value": "<location>"
"value": "<aadTenant>"
},
"p2sConfigurationPolicyGroups": {
"value": [
Expand Down Expand Up @@ -689,8 +681,7 @@ param name = 'vscwafVPNConfig'
// Non-required parameters
param aadAudience = '11111111-1234-4321-1234-111111111111'
param aadIssuer = 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
param aadTenant = 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
param location = '<location>'
param aadTenant = '<aadTenant>'
p2sConfigurationPolicyGroups: [
{
isDefault: 'true'
Expand Down Expand Up @@ -1017,6 +1008,14 @@ The allowed VPN protocols for the configuration.
| `resourceGroupName` | string | The name of the resource group the user VPN configuration was deployed into. |
| `resourceId` | string | The resource ID of the user VPN configuration. |

## Cross-referenced modules

This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).

| Reference | Type |
| :-- | :-- |
| `br/public:avm/utl/types/avm-common-types:0.5.1` | Remote reference |

## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the [repository](https://aka.ms/avm/telemetry). There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
11 changes: 2 additions & 9 deletions avm/res/network/vpn-server-configuration/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ param vpnProtocols array = []
@description('Optional. Tags of the resource.')
param tags object?

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

@description('Optional. Enable/Disable usage telemetry for module.')
param enableTelemetry bool = true
Expand Down Expand Up @@ -187,14 +188,6 @@ output location string = vpnServerConfig.location
// Definitions //
// =============== //

type lockType = {
@description('Optional. Specify the name of lock.')
name: string?

@description('Optional. Specify the type of lock.')
kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
}?

@export()
type vpnClientIpsecPoliciesType = {
@description('Optional. The Diffie-Hellman group used in IKE phase 1. Required if using IKEv2.')
Expand Down
60 changes: 33 additions & 27 deletions avm/res/network/vpn-server-configuration/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,13 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "1311591598024692949"
"version": "0.33.13.18514",
"templateHash": "14313600575703393398"
},
"name": "VPN Server Configuration",
"description": "This module deploys a VPN Server Configuration for a Virtual Hub P2S Gateway."
},
"definitions": {
"lockType": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Specify the name of lock."
}
},
"kind": {
"type": "string",
"allowedValues": [
"CanNotDelete",
"None",
"ReadOnly"
],
"nullable": true,
"metadata": {
"description": "Optional. Specify the type of lock."
}
}
},
"nullable": true
},
"vpnClientIpsecPoliciesType": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -100,6 +75,36 @@
"metadata": {
"__bicep_export!": true
}
},
"lockType": {
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. Specify the name of lock."
}
},
"kind": {
"type": "string",
"allowedValues": [
"CanNotDelete",
"None",
"ReadOnly"
],
"nullable": true,
"metadata": {
"description": "Optional. Specify the type of lock."
}
}
},
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.5.1"
}
}
}
},
"parameters": {
Expand Down Expand Up @@ -235,6 +240,7 @@
},
"lock": {
"$ref": "#/definitions/lockType",
"nullable": true,
"metadata": {
"description": "Optional. The lock settings of the service."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ param serviceShort string = 'vscmin'
@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.')
param namePrefix string = '#_namePrefix_#'



// ============ //
// Dependencies //
// ============ //
Expand Down Expand Up @@ -52,19 +50,18 @@ module testDeployment '../../../main.bicep' = [
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
location: resourceLocation
name: '${namePrefix}${serviceShort}VPNConfig'
aadAudience: '11111111-1234-4321-1234-111111111111'
aadIssuer: 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
aadTenant: 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
aadTenant: '${environment().authentication.loginEndpoint}11111111-1111-1111-1111-111111111111'
p2sConfigurationPolicyGroups: [
{
userVPNPolicyGroupName: 'DefaultGroup'
policymembers: [
{
name: 'UserGroup1'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-2222-3333-111111111111'
name: 'UserGroup1'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-2222-3333-111111111111'
}
]
priority: '0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ param serviceShort string = 'vscmax'
@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.')
param namePrefix string = '#_namePrefix_#'


// ============ //
// Dependencies //
// ============ //
Expand Down Expand Up @@ -57,21 +56,21 @@ module testDeployment '../../../main.bicep' = [
name: '${namePrefix}${serviceShort}VPNConfig'
aadAudience: '11111111-1234-4321-1234-111111111111'
aadIssuer: 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
aadTenant: 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
aadTenant: '${environment().authentication.loginEndpoint}11111111-1111-1111-1111-111111111111'
p2sConfigurationPolicyGroups: [
{
userVPNPolicyGroupName: 'DefaultGroup'
policymembers: [
{
name: 'UserGroup1'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-2222-3333-111111111111'
name: 'UserGroup1'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-2222-3333-111111111111'
}
{
name: 'UserGroup2'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-3333-4444-111111111111'
}
}
]
priority: '0'
isDefault: 'true'
Expand All @@ -80,15 +79,15 @@ module testDeployment '../../../main.bicep' = [
userVPNPolicyGroupName: 'AdditionalGroup'
policymembers: [
{
name: 'UserGroup3'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-4444-5555-111111111111'
name: 'UserGroup3'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-4444-5555-111111111111'
}
{
name: 'UserGroup4'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-5555-6666-111111111111'
}
}
]
priority: '1'
isDefault: 'false'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ param serviceShort string = 'vscwaf'
@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.')
param namePrefix string = '#_namePrefix_#'


// ============ //
// Dependencies //
// ============ //
Expand Down Expand Up @@ -53,19 +52,18 @@ module testDeployment '../../../main.bicep' = [
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
location: resourceLocation
name: '${namePrefix}${serviceShort}VPNConfig'
aadAudience: '11111111-1234-4321-1234-111111111111'
aadIssuer: 'https://sts.windows.net/11111111-1111-1111-1111-111111111111/'
aadTenant: 'https://login.microsoftonline.com/11111111-1111-1111-1111-111111111111'
aadTenant: '${environment().authentication.loginEndpoint}11111111-1111-1111-1111-111111111111'
p2sConfigurationPolicyGroups: [
{
userVPNPolicyGroupName: 'DefaultGroup'
policymembers: [
{
name: 'UserGroup1'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-2222-3333-111111111111'
name: 'UserGroup1'
attributeType: 'AADGroupId'
attributeValue: '11111111-1111-2222-3333-111111111111'
}
]
priority: '0'
Expand Down

0 comments on commit ff8c44e

Please sign in to comment.