Conditionally define module scope #15269
cloudyjobin
started this conversation in
Authoring Help
Replies: 2 comments 2 replies
-
you mean this:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
@cloudyjobin this is messy, but does this work for you?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to define the scope for a module conditionally based on the
subscriptionId
andrgName
parameters. If bothsubscriptionId
andrgName
are defined, the scope should beresourceGroup(subscriptionId, rgName)
. If onlyrgName
is defined, the scope should beresourceGroup(rgName)
. If neither parameter is defined, use the current scope, which isresourceGroup()
.I've tried multiple approaches to make this work, but none have been successful. Can someone help me resolve this issue?
Beta Was this translation helpful? Give feedback.
All reactions