ServiceNow CMDB CI relationship sync: faster, more complete →
Mods
Azure

Policy: Azure > Compute > Virtual Machine Scale Set > Tags > Template

The template is used to generate the keys and values for Azure Compute virtual machine scale set.

Tags not defined in Virtual Machine Scale Set Tags Template will not be modified or deleted. Setting a tag value to undefined will result in the tag being deleted.

See Tags for more information.

Resource Types

This policy targets the following resource types:

Primary Policy

This policy is used with the following primary policy:

Controls

Policy Specification

Default template
{%- if $.defaultTags.value | length == 0 %} [] {%- elif $.defaultTags.value != undefined %}{{ $.defaultTags.value | dump | safe }}{%- else %}{% for item in $.defaultTags.value %}- {{ item }}{% endfor %}{% endif %}
Default template input
- |
{
subscription {
turbot {
id
}
}
}
- |
{
defaultTags: policyValue(uri:"tmod:@turbot/azure-compute#/policy/types/computeTagsTemplate" resourceId: "{{ $.subscription.turbot.id }}") {
value
}
}
Examples [YAML]
  • foo: bar
    environment: prod
    
  • - foo123: bar
    - environment: dev
    
  • - cost-center: zz123
    - delete-me: undefined
    

Category

In Your Workspace

Developers