Skip to main content

Tag custom cloud resources

Tagging allows resource categorization, which simplifies governance, cost allocation, and system performance review. Custom cloud tags propagate to resources on the Aiven platform and in your own cloud infrastructure.

important

Since the tags propagate to your own cloud infrastructure, the contents and total number of the tags need to stay within limits imposed by your cloud provider.

Types of tagging

You can tag your custom cloud resources by:

Tagging service nodes and VMs

If you add a tag to a BYOC service, all the service nodes and VMs inherit this tag, and the tag propagates to your own cloud infrastructure.

Prerequisites

Tag service nodes and VMs

Create a resource tag for a BYOC service the same way you create it for a regular Aiven-managed service. Ensure you use the byoc_resource_tag prefix in the tag key.

For example, to label all VMs running a particular BYOC service with the tag that has my-cost-center as a key and 12345 as a value, create a resource tag for this service with key byoc_resource_tag:my-cost-center and value 12345.

For instructions on how to add, update, remove, or list service tags in the Aiven Console, see Use resource tags, where you also find limits and limitations that apply to service tags and tagging.

Tagging infrastructure components

You can define a set of tags for each taggable infrastructure component created by the Terraform infrastructure template (for example, VPCs, subnets, or security groups). You can manage the tags using the Aiven CLI client or directly in the variable file used to run the Terraform infrastructure template.

note

Tagging GCP BYOC infrastructure uses Google labels, not Google tags.

Limitations

  • Tag keys are in lower case and can include ASCII alphanumeric printable English characters. Punctuation characters other than dashes (between words) are not allowed.
  • Do not use tag keys that start with aiven.
  • Do not change the tags that the Terraform template applies by default.

Before you start

Manage infrastructure tags

Use the avn byoc tags update command to add or update infrastructure tags for your custom cloud. Pass the tags as an option.

avn byoc tags update                            \
--organization-id "ORGANIZATION_IDENTIFIER" \
--byoc-id "CUSTOM_CLOUD_IDENTIFIER" \
--add-tag TAG_KEY_A=TAG_VALUE_A \
--add-tag TAG_KEY_B=TAG_VALUE_B
important

Any change to infrastructure tags requires reapplying the Terraform template.