GCP Labels and Tags: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:
=Overview=
=Overview=
=Labels=
=Labels=
 
==Label Constraints==
=Label Constraints=
{{External|https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements}}
{{External|https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements}}
* Each resource can have multiple labels, up to a maximum of 64.
* Each resource can have multiple labels, up to a maximum of 64.
* Each label must be a key-value pair.
* Each label must be a key-value pair.
==Key Constraints==
===Key Constraints===
* Keys have a minimum length of 1 character and a maximum length of 63 characters, and cannot be empty.  
* Keys have a minimum length of 1 character and a maximum length of 63 characters, and cannot be empty.  
* Keys can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
* Keys can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
* The key portion of a label must be unique for a given resource. However, you can use the same key with multiple resources.
* The key portion of a label must be unique for a given resource. However, you can use the same key with multiple resources.
* Keys must start with a lowercase letter or international character.
* Keys must start with a lowercase letter or international character.
==Value Constraints==
===Value Constraints===
* Values can be empty, and have a maximum length of 63 characters.
* Values can be empty, and have a maximum length of 63 characters.
* Values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
* Values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
=Tags=
{{External|https://cloud.google.com/vpc/docs/add-remove-network-tags}}

Revision as of 18:31, 6 September 2021

External

Internal

Overview

Labels

Label Constraints

https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements
  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.

Key Constraints

  • Keys have a minimum length of 1 character and a maximum length of 63 characters, and cannot be empty.
  • Keys can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique for a given resource. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

Value Constraints

  • Values can be empty, and have a maximum length of 63 characters.
  • Values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.

Tags

https://cloud.google.com/vpc/docs/add-remove-network-tags