Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Mods
GCP
Loading policies...

Policy: GCP > Compute Engine > Region Disk > Labels > Template

The template is used to generate the keys and values for GCP Compute Engine region disk.

Labels not defined in Region Disk 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.

Targets

This policy targets the following resource types:

  • GCP > Compute Engine > Region Disk

Primary Policy

This policy is used with the following primary policy:

  • GCP > Compute Engine > Region Disk > Labels

Controls

Setting this policy configures this control:

  • GCP > Compute Engine > Region Disk > Labels

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
- |
{
project {
turbot {
id
}
}
}
- |
{
defaultLabels: policyValue(uri:"tmod:@turbot/gcp-computeengine#/policy/types/computeEngineLabelsTemplate" resourceId: "{{ $.project.turbot.id }}") {
value
}
}
Examples [YAML]
  • foo: bar
    environment: prod
    
  • - foo123: bar
    - environment: dev
    
  • - cost-center: zz123
    - delete-me: undefined
    

Category

  • Resource > Tags

In Your Workspace

  • Policy Settings by Type report

Developers

    Category URI
    • tmod:@turbot/turbot#/control/categories/resourceTags
  • Policy Type URI
    • tmod:@turbot/gcp-computeengine#/policy/types/regionDiskLabelsTemplate
  • GraphQL
    • query policyType(id: "tmod:@turbot/gcp-computeengine#/policy/types/regionDiskLabelsTemplate") { … }
    • query policySettings(filter: "policyTypeId:'tmod:@turbot/gcp-computeengine#/policy/types/regionDiskLabelsTemplate'") { … }
    • query policyValues(filter: "policyTypeId:'tmod:@turbot/gcp-computeengine#/policy/types/regionDiskLabelsTemplate'") { … }
  • CLI
    • Get Policy Type
    • turbot graphql policy-type --id "tmod:@turbot/gcp-computeengine#/policy/types/regionDiskLabelsTemplate"
    • Get Policy Settings
    • turbot graphql policy-settings --filter "policyTypeId:tmod:@turbot/gcp-computeengine#/policy/types/regionDiskLabelsTemplate"
Guardrails
Guardrails Hub
  • Hub
  • Docs
  • Blog
  • Changelog
Products
  • GuardrailsGuardrails
  • PipesPipes
  • SteampipeSteampipe
  • PowerpipePowerpipe
  • FlowpipeFlowpipe
  • TailpipeTailpipe
Turbot
  • Home
  • About us
  • We're hiring!
  • Contact us
Community

Our community of practitioners love to discuss cloud governance & security.

Slack logoJoin us on Slack →

System StatusLegalSecurity
Terms of UseSecurityPrivacy
39
Mods
144
Resource Types
2,478
Policies
1,204
Controls
118
Quick Actions
87
IAM