Skip to content

Commit

Permalink
fix: service bus authorization rules default value fix (#1890)
Browse files Browse the repository at this point in the history
## Description

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes #123
Fixes #456
Closes #123
Closes #456
-->

Closes #1694 

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.service-bus.namespace](https://github.com/ChrisSidebotham/bicep-registry-modules/actions/workflows/avm.res.service-bus.namespace.yml/badge.svg?branch=sbus-auth-rule)](https://github.com/ChrisSidebotham/bicep-registry-modules/actions/workflows/avm.res.service-bus.namespace.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:
- [x] 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 -->
  • Loading branch information
ChrisSidebotham authored May 9, 2024
1 parent f86e359 commit 898d1a9
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 107 deletions.
4 changes: 2 additions & 2 deletions avm/res/service-bus/namespace/authorization-rule/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "15856701624247874001"
"version": "0.26.170.59819",
"templateHash": "8796609182952388149"
},
"name": "Service Bus Namespace Authorization Rules",
"description": "This module deploys a Service Bus Namespace Authorization Rule.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "3332271240583753856"
"version": "0.26.170.59819",
"templateHash": "2457681488755677620"
},
"name": "Service Bus Namespace Disaster Recovery Configs",
"description": "This module deploys a Service Bus Namespace Disaster Recovery Config",
Expand Down
53 changes: 21 additions & 32 deletions avm/res/service-bus/namespace/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": "9228932977984857525"
"version": "0.26.170.59819",
"templateHash": "14015486326288544360"
},
"name": "Service Bus Namespaces",
"description": "This module deploys a Service Bus Namespace.",
Expand Down Expand Up @@ -1468,8 +1468,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "15856701624247874001"
"version": "0.26.170.59819",
"templateHash": "8796609182952388149"
},
"name": "Service Bus Namespace Authorization Rules",
"description": "This module deploys a Service Bus Namespace Authorization Rule.",
Expand Down Expand Up @@ -1572,8 +1572,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "3332271240583753856"
"version": "0.26.170.59819",
"templateHash": "2457681488755677620"
},
"name": "Service Bus Namespace Disaster Recovery Configs",
"description": "This module deploys a Service Bus Namespace Disaster Recovery Config",
Expand Down Expand Up @@ -1677,8 +1677,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "3812335497838251447"
"version": "0.26.170.59819",
"templateHash": "16322713515483912947"
},
"name": "Service Bus Namespace Migration Configuration",
"description": "This module deploys a Service Bus Namespace Migration Configuration.",
Expand Down Expand Up @@ -1782,8 +1782,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "7745744247225628529"
"version": "0.26.170.59819",
"templateHash": "12093830653931933232"
},
"name": "Service Bus Namespace Network Rule Sets",
"description": "This module deploys a ServiceBus Namespace Network Rule Set.",
Expand Down Expand Up @@ -1982,8 +1982,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "6465956085720113527"
"version": "0.26.170.59819",
"templateHash": "10463460824316688291"
},
"name": "Service Bus Namespace Queue",
"description": "This module deploys a Service Bus Namespace Queue.",
Expand Down Expand Up @@ -2224,18 +2224,7 @@
},
"authorizationRules": {
"type": "array",
"defaultValue": [
{
"name": "RootManageSharedAccessKey",
"properties": {
"rights": [
"Listen",
"Manage",
"Send"
]
}
}
],
"defaultValue": [],
"metadata": {
"description": "Optional. Authorization Rules for the Service Bus Queue."
}
Expand Down Expand Up @@ -2367,8 +2356,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "11000394867797752922"
"version": "0.26.170.59819",
"templateHash": "10634119713895385684"
},
"name": "Service Bus Namespace Queue Authorization Rules",
"description": "This module deploys a Service Bus Namespace Queue Authorization Rule.",
Expand Down Expand Up @@ -2548,8 +2537,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "10365585985239248264"
"version": "0.26.170.59819",
"templateHash": "1083080372138021216"
},
"name": "Service Bus Namespace Topic",
"description": "This module deploys a Service Bus Namespace Topic.",
Expand Down Expand Up @@ -3031,8 +3020,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8469884519860433031"
"version": "0.26.170.59819",
"templateHash": "2461421453721833613"
},
"name": "Service Bus Namespace Topic Authorization Rules",
"description": "This module deploys a Service Bus Namespace Topic Authorization Rule.",
Expand Down Expand Up @@ -3181,8 +3170,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "14842378053022621119"
"version": "0.26.170.59819",
"templateHash": "14488930902207824569"
},
"name": "Service Bus Namespace Topic Subscription",
"description": "This module deploys a Service Bus Namespace Topic Subscription.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "3812335497838251447"
"version": "0.26.170.59819",
"templateHash": "16322713515483912947"
},
"name": "Service Bus Namespace Migration Configuration",
"description": "This module deploys a Service Bus Namespace Migration Configuration.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/service-bus/namespace/network-rule-set/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "7745744247225628529"
"version": "0.26.170.59819",
"templateHash": "12093830653931933232"
},
"name": "Service Bus Namespace Network Rule Sets",
"description": "This module deploys a ServiceBus Namespace Network Rule Set.",
Expand Down
16 changes: 1 addition & 15 deletions avm/res/service-bus/namespace/queue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,7 @@ Authorization Rules for the Service Bus Queue.

- Required: No
- Type: array
- Default:
```Bicep
[
{
name: 'RootManageSharedAccessKey'
properties: {
rights: [
'Listen'
'Manage'
'Send'
]
}
}
]
```
- Default: `[]`

### Parameter: `autoDeleteOnIdle`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "11000394867797752922"
"version": "0.26.170.59819",
"templateHash": "10634119713895385684"
},
"name": "Service Bus Namespace Queue Authorization Rules",
"description": "This module deploys a Service Bus Namespace Queue Authorization Rule.",
Expand Down
32 changes: 10 additions & 22 deletions avm/res/service-bus/namespace/queue/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,7 @@ param enablePartitioning bool = false
param enableExpress bool = false

@description('Optional. Authorization Rules for the Service Bus Queue.')
param authorizationRules array = [
{
name: 'RootManageSharedAccessKey'
properties: {
rights: [
'Listen'
'Manage'
'Send'
]
}
}
]
param authorizationRules array = []

@description('Optional. The lock settings of the service.')
param lock lockType
Expand Down Expand Up @@ -156,17 +145,16 @@ module queue_authorizationRules 'authorization-rule/main.bicep' = [
}
]

resource queue_lock 'Microsoft.Authorization/locks@2020-05-01' =
if (!empty(lock ?? {}) && lock.?kind != 'None') {
name: lock.?name ?? 'lock-${name}'
properties: {
level: lock.?kind ?? ''
notes: lock.?kind == 'CanNotDelete'
? 'Cannot delete resource or child resources.'
: 'Cannot delete or modify the resource or child resources.'
}
scope: queue
resource queue_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
name: lock.?name ?? 'lock-${name}'
properties: {
level: lock.?kind ?? ''
notes: lock.?kind == 'CanNotDelete'
? 'Cannot delete resource or child resources.'
: 'Cannot delete or modify the resource or child resources.'
}
scope: queue
}

resource queue_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [
for (roleAssignment, index) in (roleAssignments ?? []): {
Expand Down
21 changes: 5 additions & 16 deletions avm/res/service-bus/namespace/queue/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": "6465956085720113527"
"version": "0.26.170.59819",
"templateHash": "10463460824316688291"
},
"name": "Service Bus Namespace Queue",
"description": "This module deploys a Service Bus Namespace Queue.",
Expand Down Expand Up @@ -247,18 +247,7 @@
},
"authorizationRules": {
"type": "array",
"defaultValue": [
{
"name": "RootManageSharedAccessKey",
"properties": {
"rights": [
"Listen",
"Manage",
"Send"
]
}
}
],
"defaultValue": [],
"metadata": {
"description": "Optional. Authorization Rules for the Service Bus Queue."
}
Expand Down Expand Up @@ -390,8 +379,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "11000394867797752922"
"version": "0.26.170.59819",
"templateHash": "10634119713895385684"
},
"name": "Service Bus Namespace Queue Authorization Rules",
"description": "This module deploys a Service Bus Namespace Queue Authorization Rule.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8469884519860433031"
"version": "0.26.170.59819",
"templateHash": "2461421453721833613"
},
"name": "Service Bus Namespace Topic Authorization Rules",
"description": "This module deploys a Service Bus Namespace Topic Authorization Rule.",
Expand Down
12 changes: 6 additions & 6 deletions avm/res/service-bus/namespace/topic/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": "10365585985239248264"
"version": "0.26.170.59819",
"templateHash": "1083080372138021216"
},
"name": "Service Bus Namespace Topic",
"description": "This module deploys a Service Bus Namespace Topic.",
Expand Down Expand Up @@ -488,8 +488,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "8469884519860433031"
"version": "0.26.170.59819",
"templateHash": "2461421453721833613"
},
"name": "Service Bus Namespace Topic Authorization Rules",
"description": "This module deploys a Service Bus Namespace Topic Authorization Rule.",
Expand Down Expand Up @@ -638,8 +638,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "14842378053022621119"
"version": "0.26.170.59819",
"templateHash": "14488930902207824569"
},
"name": "Service Bus Namespace Topic Subscription",
"description": "This module deploys a Service Bus Namespace Topic Subscription.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/service-bus/namespace/topic/subscription/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "14842378053022621119"
"version": "0.26.170.59819",
"templateHash": "14488930902207824569"
},
"name": "Service Bus Namespace Topic Subscription",
"description": "This module deploys a Service Bus Namespace Topic Subscription.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/service-bus/namespace/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 898d1a9

Please sign in to comment.