Skip to content

Commit 344fb82

Browse files
feat: Updated Bicep Lock Type to allow for custom notes (#2154)
1 parent 3d36ac9 commit 344fb82

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
lock: 'CanNotDelete'
1+
lock: {
2+
kind: 'CanNotDelete'
3+
name: 'myCustomLockName'
4+
notes: 'This is a custom lock note.'
5+
}

docs/static/includes/interfaces/bicep/int.locks.udt.schema.bicep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// ============== //
32
// Parameters //
43
// ============== //
@@ -15,7 +14,9 @@ resource >singularMainResourceType<_lock 'Microsoft.Authorization/locks@2020-05-
1514
name: lock.?name ?? 'lock-${name}'
1615
properties: {
1716
level: lock.?kind ?? ''
18-
notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
17+
notes: lock.?notes ?? (lock.?kind == 'CanNotDelete'
18+
? 'Cannot delete resource or child resources.'
19+
: 'Cannot delete or modify the resource or child resources.')
1920
}
2021
scope: >singularMainResourceType<
2122
}

0 commit comments

Comments
 (0)