pillar | category | online version |
---|---|---|
Cost Optimization |
Metadata tagging |
Tag resources and resource groups with a valid environment.
Resources and resource groups pass when they have an environment tag set to one of the valid environments. If the environment tag is not set, the resource or resource group is skipped. The rule will fail when the environment tag is set, but doesn't match a valid environment.
By default, this rule uses the Env
tag and accepts Prod
, Dev
, QA
, Stage
, Test
as valid environments.
Consider updating the environment tag on the resource or resource group to a valid environment. Additionally consider enforcing tag values with Azure Policy.
To configure this rule:
- Override
CAF_EnvironmentTag
with the name of the environment tag. - Override
CAF_Environments
with an array of valid environments. - Override
CAF_MatchTagNameCase
withfalse
to make tag names case-insensitive. By default tag names are case-sensitive. This option affects all tag rules. - Override
CAF_MatchTagValueCase
withfalse
to make tag values case-insensitive. By default tag values are case-sensitive. This option affects all tag rules.