ResourceGroup Name how to add regional code to the name #9100
Answered
by
jeskew
pattisanta
asked this question in
General
-
currently a piece of the code I have for deploying resource group is constructing the name for example something like this param name string = 'rg-${workload}-${location}-${env}-01'
@description ('subscription environment')
@allowed ([
'xxx'
'xxx'
'xxx'
'xxx'
'xxx'
'xxx'
])
param env string
@description()
param workload string
param location string what I would like to happen is the location to become a regional code. I was looking at something like this var regionCodes = {
centralus: 'cus'
eastus: 'eus'
} My issue is not sure how to make it happen. if someone can point me to a really good resource, I would really be grateful. Thank you, |
Beta Was this translation helpful? Give feedback.
Answered by
jeskew
Nov 22, 2022
Replies: 1 comment 1 reply
-
Where you planning on including var locationCode = regionCodes[location] |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pattisanta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where you planning on including
regionCodes
within your template? If so, you can use a parameter as a key look up the value withinregionCodes
: