Guardrails for GitHub →
Mods
GCP

Policy: GCP > Project > Labels > Template

The template is used to generate the keys and values for GCP project.

Labels not defined in Project Labels Template will not be modified or deleted. Setting a label value to undefined will result in the label being deleted.

See Labels 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 $.defaultLabels.tags | length == 0 %} [] {%- elif $.defaultLabels.tags != undefined %}{{ $.defaultLabels.tags | dump | safe }}{% endif %}
Default template input
|
{
defaultLabels: resource {
tags(resolution: RECOMMENDED)
}
}
Examples [YAML]
  • foo: bar
    environment: prod
    
  • - foo123: bar
    - environment: dev
    
  • - cost-center: zz123
    - delete-me: undefined
    

Category

In Your Workspace

Developers