Skip to content

Commit

Permalink
added trafficSelectorPolicies property
Browse files Browse the repository at this point in the history
  • Loading branch information
fabmas committed Aug 17, 2024
1 parent a445890 commit 0b83d8a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
9 changes: 9 additions & 0 deletions avm/res/network/connection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ module connection 'br/public:avm/res/network/connection:<version>' = {
| [`peer`](#parameter-peer) | object | The remote peer. Used for connection connectionType [ExpressRoute]. |
| [`routingWeight`](#parameter-routingweight) | int | The weight added to routes learned from this BGP speaker. |
| [`tags`](#parameter-tags) | object | Tags of the resource. |
| [`trafficSelectorPolicies`](#parameter-trafficselectorpolicies) | array | The traffic selector policies to be considered by this connection. |
| [`useLocalAzureIpAddress`](#parameter-uselocalazureipaddress) | bool | Use private local Azure IP for the connection. Only available for IPSec Virtual Network Gateways that use the Azure Private IP Property. |
| [`usePolicyBasedTrafficSelectors`](#parameter-usepolicybasedtrafficselectors) | bool | Enable policy-based traffic selectors. |
| [`virtualNetworkGateway2`](#parameter-virtualnetworkgateway2) | object | The remote Virtual Network Gateway. Used for connection connectionType [Vnet2Vnet]. |
Expand Down Expand Up @@ -542,6 +543,14 @@ Tags of the resource.
- Required: No
- Type: object

### Parameter: `trafficSelectorPolicies`

The traffic selector policies to be considered by this connection.

- Required: No
- Type: array
- Default: `[]`

### Parameter: `useLocalAzureIpAddress`

Use private local Azure IP for the connection. Only available for IPSec Virtual Network Gateways that use the Azure Private IP Property.
Expand Down
4 changes: 4 additions & 0 deletions avm/res/network/connection/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ param dpdTimeoutSeconds int = 45
@description('Optional. Enable policy-based traffic selectors.')
param usePolicyBasedTrafficSelectors bool = false

@description('Optional. The traffic selector policies to be considered by this connection.')
param trafficSelectorPolicies array = []

@description('Optional. Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled. Only available when connection connectionType is Express Route.')
param enablePrivateLinkFastPath bool = false

Expand Down Expand Up @@ -132,6 +135,7 @@ resource connection 'Microsoft.Network/connections@2023-04-01' = {
peer: connectionType == 'ExpressRoute' ? peer : null
authorizationKey: connectionType == 'ExpressRoute' && !empty(authorizationKey) ? authorizationKey : null
sharedKey: connectionType != 'ExpressRoute' ? vpnSharedKey : null
trafficSelectorPolicies: trafficSelectorPolicies
usePolicyBasedTrafficSelectors: usePolicyBasedTrafficSelectors
ipsecPolicies: !empty(customIPSecPolicy.ipsecEncryption)
? [
Expand Down
12 changes: 10 additions & 2 deletions avm/res/network/connection/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "16458068655280591810"
"version": "0.29.47.4906",
"templateHash": "13075925260036107325"
},
"name": "Virtual Network Gateway Connections",
"description": "This module deploys a Virtual Network Gateway Connection.",
Expand Down Expand Up @@ -119,6 +119,13 @@
"description": "Optional. Enable policy-based traffic selectors."
}
},
"trafficSelectorPolicies": {
"type": "array",
"defaultValue": [],
"metadata": {
"description": "Optional. The traffic selector policies to be considered by this connection."
}
},
"enablePrivateLinkFastPath": {
"type": "bool",
"defaultValue": false,
Expand Down Expand Up @@ -258,6 +265,7 @@
"peer": "[if(equals(parameters('connectionType'), 'ExpressRoute'), parameters('peer'), null())]",
"authorizationKey": "[if(and(equals(parameters('connectionType'), 'ExpressRoute'), not(empty(parameters('authorizationKey')))), parameters('authorizationKey'), null())]",
"sharedKey": "[if(not(equals(parameters('connectionType'), 'ExpressRoute')), parameters('vpnSharedKey'), null())]",
"trafficSelectorPolicies": "[parameters('trafficSelectorPolicies')]",
"usePolicyBasedTrafficSelectors": "[parameters('usePolicyBasedTrafficSelectors')]",
"ipsecPolicies": "[if(not(empty(parameters('customIPSecPolicy').ipsecEncryption)), createArray(createObject('saLifeTimeSeconds', parameters('customIPSecPolicy').saLifeTimeSeconds, 'saDataSizeKilobytes', parameters('customIPSecPolicy').saDataSizeKilobytes, 'ipsecEncryption', parameters('customIPSecPolicy').ipsecEncryption, 'ipsecIntegrity', parameters('customIPSecPolicy').ipsecIntegrity, 'ikeEncryption', parameters('customIPSecPolicy').ikeEncryption, 'ikeIntegrity', parameters('customIPSecPolicy').ikeIntegrity, 'dhGroup', parameters('customIPSecPolicy').dhGroup, 'pfsGroup', parameters('customIPSecPolicy').pfsGroup)), parameters('customIPSecPolicy').ipsecEncryption)]",
"routingWeight": "[parameters('routingWeight')]",
Expand Down

0 comments on commit 0b83d8a

Please sign in to comment.