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.
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:
- Service tagging, affecting Aiven service nodes and VMs
- Infrastructure tagging, affecting all taggable BYOC infrastructure components
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
- Aiven Console
- Aiven CLI
- At least one custom cloud created in your Aiven organization
- Access to the Aiven Console
- Organization admin role in your Aiven organization
- At least one custom cloud created in your Aiven organization
- Aiven CLI client installed
- Organization admin role in your Aiven organization
Tag service nodes and VMs
- Aiven Console
- Aiven CLI
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.
For your BYOC service, create tags using the Aiven CLI the same way you create it for a
regular Aiven-managed service.
Ensure you use the byoc_resource_tag
prefix in the tag key.
avn service tags update SERVICE_NAME
--add-tag byoc_resource_tag:business_unit=sales
--add-tag byoc_resource_tag:env=smoke_test
For instructions on how to add, update, remove, or list service tags via Aiven CLI, 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.
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
- You have at least one custom cloud created in your Aiven organization.
- You have the Aiven CLI client installed.
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
Any change to infrastructure tags requires reapplying the Terraform template.