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

Policy: GCP > Kubernetes Engine > Labels Template [Default]

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

By default, all Kubernetes Engine 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