Skip to content

Commit 8923f8a

Browse files
Added resourceprefix.bicep file to standardize and simplify resource name prefix generation based on environment and location
1 parent 3caed68 commit 8923f8a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Deployment/resourcePrefix.bicep

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
targetScope = 'subscription'
2+
3+
param environmentName string
4+
param location string
5+
6+
var uniqueId = toLower(uniqueString(subscription().id, environmentName, location))
7+
var resourceprefix = padLeft(take(uniqueId, 10), 10, '0')
8+
9+
output resourcePrefix string = resourceprefix

0 commit comments

Comments
 (0)