Skip to content

Commit 7732c3f

Browse files
authored
feat: Express Route add new parameter and update API version (#4570)
## Description Updated API version to 2024-05-01 Added new parameter Updated user defined types to avm-common-types ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.network.express-route-circuit](https://github.com/arnoldna/bicep-registry-modules/actions/workflows/avm.res.network.express-route-circuit.yml/badge.svg?branch=avm%2Fres%2Fnetwork%2Fer)](https://github.com/arnoldna/bicep-registry-modules/actions/workflows/avm.res.network.express-route-circuit.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. - [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`. - [X] 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. - [X] My corresponding pipelines / checks run clean and green without any errors or warnings <!-- Please keep up to date with the contribution guide at https://aka.ms/avm/contribute/bicep -->
1 parent ebb547e commit 7732c3f

File tree

5 files changed

+260
-285
lines changed

5 files changed

+260
-285
lines changed

avm/res/network/express-route-circuit/README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This module deploys an Express Route Circuit.
88
- [Usage examples](#Usage-examples)
99
- [Parameters](#Parameters)
1010
- [Outputs](#Outputs)
11+
- [Cross-referenced modules](#Cross-referenced-modules)
1112
- [Data Collection](#Data-Collection)
1213

1314
## Resource Types
@@ -17,7 +18,7 @@ This module deploys an Express Route Circuit.
1718
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
1819
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
1920
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
20-
| `Microsoft.Network/expressRouteCircuits` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/expressRouteCircuits) |
21+
| `Microsoft.Network/expressRouteCircuits` | [2024-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2024-05-01/expressRouteCircuits) |
2122

2223
## Usage examples
2324

@@ -144,6 +145,7 @@ module expressRouteCircuit 'br/public:avm/res/network/express-route-circuit:<ver
144145
workspaceResourceId: '<workspaceResourceId>'
145146
}
146147
]
148+
enableDirectPortRateLimit: true
147149
location: '<location>'
148150
lock: {
149151
kind: 'CanNotDelete'
@@ -224,6 +226,9 @@ module expressRouteCircuit 'br/public:avm/res/network/express-route-circuit:<ver
224226
}
225227
]
226228
},
229+
"enableDirectPortRateLimit": {
230+
"value": true
231+
},
227232
"location": {
228233
"value": "<location>"
229234
},
@@ -302,6 +307,7 @@ param diagnosticSettings = [
302307
workspaceResourceId: '<workspaceResourceId>'
303308
}
304309
]
310+
param enableDirectPortRateLimit = true
305311
param location = '<location>'
306312
param lock = {
307313
kind: 'CanNotDelete'
@@ -526,6 +532,7 @@ param tags = {
526532
| [`authorizationNames`](#parameter-authorizationnames) | array | List of names for ExpressRoute circuit authorizations to create. To fetch the `authorizationKey` for the authorization, use the `existing` resource reference for `Microsoft.Network/expressRouteCircuits/authorizations`. |
527533
| [`bandwidthInGbps`](#parameter-bandwidthingbps) | int | The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. Available when configuring Express Route Direct. Default value of 0 will set the property to null. |
528534
| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
535+
| [`enableDirectPortRateLimit`](#parameter-enabledirectportratelimit) | bool | Flag denoting rate-limiting status of the ExpressRoute direct-port circuit. |
529536
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. |
530537
| [`expressRoutePortResourceId`](#parameter-expressrouteportresourceid) | string | The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. Available when configuring Express Route Direct. |
531538
| [`globalReachEnabled`](#parameter-globalreachenabled) | bool | Flag denoting global reach status. To enable ExpressRoute Global Reach between different geopolitical regions, your circuits must be Premium SKU. |
@@ -612,7 +619,7 @@ The diagnostic settings of the service.
612619
| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection. |
613620
| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
614621
| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of metrics that will be streamed. "allMetrics" includes all possible metrics for the resource. Set to `[]` to disable metric collection. |
615-
| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
622+
| [`name`](#parameter-diagnosticsettingsname) | string | The name of the diagnostic setting. |
616623
| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | 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. |
617624
| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | 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. |
618625

@@ -722,7 +729,7 @@ Enable or disable the category explicitly. Default is `true`.
722729

723730
### Parameter: `diagnosticSettings.name`
724731

725-
The name of diagnostic setting.
732+
The name of the diagnostic setting.
726733

727734
- Required: No
728735
- Type: string
@@ -741,6 +748,14 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it
741748
- Required: No
742749
- Type: string
743750

751+
### Parameter: `enableDirectPortRateLimit`
752+
753+
Flag denoting rate-limiting status of the ExpressRoute direct-port circuit.
754+
755+
- Required: No
756+
- Type: bool
757+
- Default: `False`
758+
744759
### Parameter: `enableTelemetry`
745760

746761
Enable/Disable usage telemetry for module.
@@ -1025,6 +1040,14 @@ Specifies the identifier that is used to identify the customer.
10251040
| `serviceKey` | string | The service key of the express route circuit. |
10261041
| `serviceProviderProvisioningState` | string | The service provider provisioning state of the express route circuit. |
10271042

1043+
## Cross-referenced modules
1044+
1045+
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).
1046+
1047+
| Reference | Type |
1048+
| :-- | :-- |
1049+
| `br/public:avm/utl/types/avm-common-types:0.5.1` | Remote reference |
1050+
10281051
## Data Collection
10291052

10301053
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.

avm/res/network/express-route-circuit/main.bicep

Lines changed: 11 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,23 @@ param bandwidthInGbps int = 0
6969
@description('Optional. The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. Available when configuring Express Route Direct.')
7070
param expressRoutePortResourceId string = ''
7171

72+
@description('Optional. Flag denoting rate-limiting status of the ExpressRoute direct-port circuit.')
73+
param enableDirectPortRateLimit bool = false
74+
7275
@description('Optional. Flag denoting global reach status. To enable ExpressRoute Global Reach between different geopolitical regions, your circuits must be Premium SKU.')
7376
param globalReachEnabled bool = false
7477

78+
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
7579
@description('Optional. The diagnostic settings of the service.')
76-
param diagnosticSettings diagnosticSettingType
80+
param diagnosticSettings diagnosticSettingFullType[]?
7781

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

86+
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
8187
@description('Optional. Array of role assignments to create.')
82-
param roleAssignments roleAssignmentType
88+
param roleAssignments roleAssignmentType[]?
8389

8490
@description('Optional. Tags of the resource.')
8591
param tags object?
@@ -135,7 +141,7 @@ resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableT
135141
}
136142
}
137143

138-
resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2023-04-01' = {
144+
resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2024-05-01' = {
139145
name: name
140146
location: location
141147
tags: tags
@@ -153,6 +159,7 @@ resource expressRouteCircuit 'Microsoft.Network/expressRouteCircuits@2023-04-01'
153159
]
154160
globalReachEnabled: globalReachEnabled
155161
bandwidthInGbps: bandwidthInGbps != 0 ? bandwidthInGbps : null
162+
enableDirectPortRateLimit: enableDirectPortRateLimit
156163
expressRoutePort: !empty(expressRoutePortResourceId)
157164
? {
158165
id: expressRoutePortResourceId
@@ -258,85 +265,3 @@ output serviceProviderProvisioningState string = expressRouteCircuit.properties.
258265

259266
@description('The location the resource was deployed into.')
260267
output location string = expressRouteCircuit.location
261-
262-
// =============== //
263-
// Definitions //
264-
// =============== //
265-
266-
type lockType = {
267-
@description('Optional. Specify the name of lock.')
268-
name: string?
269-
270-
@description('Optional. Specify the type of lock.')
271-
kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
272-
}?
273-
274-
type roleAssignmentType = {
275-
@description('Optional. The name (as GUID) of the role assignment. If not provided, a GUID will be generated.')
276-
name: string?
277-
278-
@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\'.')
279-
roleDefinitionIdOrName: string
280-
281-
@description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
282-
principalId: string
283-
284-
@description('Optional. The principal type of the assigned principal ID.')
285-
principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
286-
287-
@description('Optional. The description of the role assignment.')
288-
description: string?
289-
290-
@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".')
291-
condition: string?
292-
293-
@description('Optional. Version of the condition.')
294-
conditionVersion: '2.0'?
295-
296-
@description('Optional. The Resource Id of the delegated managed identity resource.')
297-
delegatedManagedIdentityResourceId: string?
298-
}[]?
299-
300-
type diagnosticSettingType = {
301-
@description('Optional. The name of diagnostic setting.')
302-
name: string?
303-
304-
@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection.')
305-
logCategoriesAndGroups: {
306-
@description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
307-
category: string?
308-
309-
@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.')
310-
categoryGroup: string?
311-
312-
@description('Optional. Enable or disable the category explicitly. Default is `true`.')
313-
enabled: bool?
314-
}[]?
315-
316-
@description('Optional. The name of metrics that will be streamed. "allMetrics" includes all possible metrics for the resource. Set to `[]` to disable metric collection.')
317-
metricCategories: {
318-
@description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to `AllMetrics` to collect all metrics.')
319-
category: string
320-
321-
@description('Optional. Enable or disable the category explicitly. Default is `true`.')
322-
enabled: bool?
323-
}[]?
324-
325-
@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.')
326-
logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
327-
328-
@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.')
329-
workspaceResourceId: string?
330-
331-
@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.')
332-
storageAccountResourceId: string?
333-
334-
@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.')
335-
eventHubAuthorizationRuleResourceId: string?
336-
337-
@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.')
338-
eventHubName: string?
339-
340-
@description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
341-
marketplacePartnerResourceId: string?
342-
}[]?

0 commit comments

Comments
 (0)