Skip to content

Commit

Permalink
fix: CDN Profile - Parameter name for originGroups - `avm/res/cdn/pro…
Browse files Browse the repository at this point in the history
…file` (Azure#1742)

## Description

Parameter `originGroup` had a typo (was named: `origionGroups`).
Fixed module and tests and bumped version from 0.1 to 0.2 because the
change is not backwards compatible.

Fixes Azure#1739 
Closes Azure#1739

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.cdn.profile](https://github.com/cloudchristoph/bicep-registry-modules/actions/workflows/avm.res.cdn.profile.yml/badge.svg?branch=1739_fix_cdn_parameter_origingroups)](https://github.com/cloudchristoph/bicep-registry-modules/actions/workflows/avm.res.cdn.profile.yml)
|

## Type of Change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utlities (Non-module effecting
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.
- [ ] 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 day with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

Co-authored-by: Erika Gressi <[email protected]>
  • Loading branch information
cloudchristoph and eriqua authored May 6, 2024
1 parent 734b6d1 commit a787ece
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
16 changes: 8 additions & 8 deletions avm/res/cdn/profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ module profile 'br/public:avm/res/cdn/profile:<version>' = {
}
]
location: 'global'
originResponseTimeoutSeconds: 60
origionGroups: [
originGroups: [
{
loadBalancingSettings: {
additionalLatencyInMilliseconds: 50
Expand All @@ -101,6 +100,7 @@ module profile 'br/public:avm/res/cdn/profile:<version>' = {
]
}
]
originResponseTimeoutSeconds: 60
ruleSets: [
{
name: 'deptestcdnpafdruleset'
Expand Down Expand Up @@ -179,10 +179,7 @@ module profile 'br/public:avm/res/cdn/profile:<version>' = {
"location": {
"value": "global"
},
"originResponseTimeoutSeconds": {
"value": 60
},
"origionGroups": {
"originGroups": {
"value": [
{
"loadBalancingSettings": {
Expand All @@ -200,6 +197,9 @@ module profile 'br/public:avm/res/cdn/profile:<version>' = {
}
]
},
"originResponseTimeoutSeconds": {
"value": 60
},
"ruleSets": {
"value": [
{
Expand Down Expand Up @@ -580,7 +580,7 @@ module profile 'br/public:avm/res/cdn/profile:<version>' = {

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`origionGroups`](#parameter-origiongroups) | array | Array of origin group objects. Required if the afdEndpoints is specified. |
| [`originGroups`](#parameter-origingroups) | array | Array of origin group objects. Required if the afdEndpoints is specified. |

**Optional parameters**

Expand Down Expand Up @@ -631,7 +631,7 @@ The pricing tier (defines a CDN provider, feature list and rate) of the CDN prof
]
```

### Parameter: `origionGroups`
### Parameter: `originGroups`

Array of origin group objects. Required if the afdEndpoints is specified.

Expand Down
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ param secrets array = []
param customDomains array = []

@description('Conditional. Array of origin group objects. Required if the afdEndpoints is specified.')
param origionGroups array = []
param originGroups array = []

@description('Optional. Array of rule set objects.')
param ruleSets array = []
Expand Down Expand Up @@ -202,8 +202,8 @@ module profile_customDomains 'customdomain/main.bicep' = [
]

module profile_originGroups 'origingroup/main.bicep' = [
for (origingroup, index) in origionGroups: {
name: '${uniqueString(deployment().name)}-Profile-OrigionGroup-${index}'
for (origingroup, index) in originGroups: {
name: '${uniqueString(deployment().name)}-Profile-OriginGroup-${index}'
params: {
name: origingroup.name
profileName: profile.name
Expand Down
62 changes: 31 additions & 31 deletions avm/res/cdn/profile/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "9474385640753599051"
"version": "0.26.170.59819",
"templateHash": "2222991004022934698"
},
"name": "CDN Profiles",
"description": "This module deploys a CDN Profile.",
Expand Down Expand Up @@ -175,7 +175,7 @@
"description": "Optional. Array of custom domain objects."
}
},
"origionGroups": {
"originGroups": {
"type": "array",
"defaultValue": [],
"metadata": {
Expand Down Expand Up @@ -337,8 +337,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "5516612458443504281"
"version": "0.26.170.59819",
"templateHash": "2906172435071993445"
},
"name": "CDN Profiles Endpoints",
"description": "This module deploys a CDN Profile Endpoint.",
Expand Down Expand Up @@ -457,8 +457,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "11112660703037023992"
"version": "0.26.170.59819",
"templateHash": "3665403791951260301"
},
"name": "CDN Profiles Endpoints Origins",
"description": "This module deploys a CDN Profile Endpoint Origin.",
Expand Down Expand Up @@ -703,8 +703,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "7298174434641608123"
"version": "0.26.170.59819",
"templateHash": "364931243138434002"
},
"name": "CDN Profiles Secret",
"description": "This module deploys a CDN Profile Secret.",
Expand Down Expand Up @@ -852,8 +852,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "15657388199001378642"
"version": "0.26.170.59819",
"templateHash": "15721665305636481516"
},
"name": "CDN Profiles Custom Domains",
"description": "This module deploys a CDN Profile Custom Domains.",
Expand Down Expand Up @@ -979,37 +979,37 @@
"profile_originGroups": {
"copy": {
"name": "profile_originGroups",
"count": "[length(parameters('origionGroups'))]"
"count": "[length(parameters('originGroups'))]"
},
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('{0}-Profile-OrigionGroup-{1}', uniqueString(deployment().name), copyIndex())]",
"name": "[format('{0}-Profile-OriginGroup-{1}', uniqueString(deployment().name), copyIndex())]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {
"name": {
"value": "[parameters('origionGroups')[copyIndex()].name]"
"value": "[parameters('originGroups')[copyIndex()].name]"
},
"profileName": {
"value": "[parameters('name')]"
},
"loadBalancingSettings": {
"value": "[parameters('origionGroups')[copyIndex()].loadBalancingSettings]"
"value": "[parameters('originGroups')[copyIndex()].loadBalancingSettings]"
},
"healthProbeSettings": {
"value": "[tryGet(parameters('origionGroups')[copyIndex()], 'healthProbeSettings')]"
"value": "[tryGet(parameters('originGroups')[copyIndex()], 'healthProbeSettings')]"
},
"sessionAffinityState": {
"value": "[tryGet(parameters('origionGroups')[copyIndex()], 'sessionAffinityState')]"
"value": "[tryGet(parameters('originGroups')[copyIndex()], 'sessionAffinityState')]"
},
"trafficRestorationTimeToHealedOrNewEndpointsInMinutes": {
"value": "[tryGet(parameters('origionGroups')[copyIndex()], 'trafficRestorationTimeToHealedOrNewEndpointsInMinutes')]"
"value": "[tryGet(parameters('originGroups')[copyIndex()], 'trafficRestorationTimeToHealedOrNewEndpointsInMinutes')]"
},
"origins": {
"value": "[parameters('origionGroups')[copyIndex()].origins]"
"value": "[parameters('originGroups')[copyIndex()].origins]"
}
},
"template": {
Expand All @@ -1019,8 +1019,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8706007645911322422"
"version": "0.26.170.59819",
"templateHash": "12438540618132459307"
},
"name": "CDN Profiles Origin Group",
"description": "This module deploys a CDN Profile Origin Group.",
Expand Down Expand Up @@ -1156,8 +1156,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "16657064743499074369"
"version": "0.26.170.59819",
"templateHash": "8566106020570825253"
},
"name": "CDN Profiles Origin",
"description": "This module deploys a CDN Profile Origin.",
Expand Down Expand Up @@ -1382,8 +1382,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "1809010747275335698"
"version": "0.26.170.59819",
"templateHash": "5891069247146856543"
},
"name": "CDN Profiles Rule Sets",
"description": "This module deploys a CDN Profile rule set.",
Expand Down Expand Up @@ -1468,8 +1468,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8195283154733773558"
"version": "0.26.170.59819",
"templateHash": "4690708071413750601"
},
"name": "CDN Profiles Rules",
"description": "This module deploys a CDN Profile rule.",
Expand Down Expand Up @@ -1656,8 +1656,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8869132357079269087"
"version": "0.26.170.59819",
"templateHash": "3255198433705940781"
},
"name": "CDN Profiles AFD Endpoints",
"description": "This module deploys a CDN Profile AFD Endpoint.",
Expand Down Expand Up @@ -1807,8 +1807,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8525791914559803218"
"version": "0.26.170.59819",
"templateHash": "12469321322924109409"
},
"name": "CDN Profiles AFD Endpoint Route",
"description": "This module deploys a CDN Profile AFD Endpoint route.",
Expand Down
2 changes: 1 addition & 1 deletion avm/res/cdn/profile/tests/e2e/afd/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module testDeployment '../../../main.bicep' = [
certificateType: 'ManagedCertificate'
}
]
origionGroups: [
originGroups: [
{
name: 'dep-${namePrefix}-test-${serviceShort}-origin-group'
loadBalancingSettings: {
Expand Down
4 changes: 2 additions & 2 deletions avm/res/cdn/profile/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.1",
"version": "0.2",
"pathFilters": [
"./main.json"
]
}
}

0 comments on commit a787ece

Please sign in to comment.