Mods
GCP

Policy: GCP > Dataproc > Labels Template [Default]

A template used to generate the keys and values for GCP Dataproc resources.

By default, all Dataproc resource Labels > Template policies will use this value.

Resource Types

This policy targets the following resource types:

Policy Specification

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

Category

In Your Workspace

Developers