How can we improve Azure Governance?

Support for functions in Resource Manager Policies

Support for functions in Resource Manager Policies:

{
"if": {
"field": "tags",
"exists": "false"
},
"then": {
"effect": "append",
"details": [
{
"field": "tags",
"value": { "creator": "CurrentUser()" }
},
{
"field": "tags",
"value": { "created": "DatetTime()" }
}
]
}
}

25 votes
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)

We’ll send you updates on this idea

Alex shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

3 comments

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...
  • Justin commented  ·   ·  Flag as inappropriate

    I second the Now() and CurrentUser() functions as a minimum: that would allow fixing two glaring omissions in resource metadata. Full functions would allow us to make much-more involved policies.

  • Lester Waters commented  ·   ·  Flag as inappropriate

    Functions may be a bit much... but a few dynamic values that could be used in the rules would be great. Such as: CurrentUser, ...

  • Armin Reiter commented  ·   ·  Flag as inappropriate

    it is already possible to set tags for resources, but it should be possible to use functions for it. like Now() for the creation date or CurrentUser() for the user who created the resource.

Feedback and Knowledge Base