Use resource tags
Use tags to add metadata to Aiven resources to categorize them or run custom logic on them. Tags can be attached to projects and services.
Typical uses include:
- Tagging for governance to deploy services with specific tags only.
- Tagging for internal cost reporting, ownership, allocation and accountability.
A tag is a key/value pair, where:
- key: A case-sensitive string that much match
[A-Za-z0-9_-]
and start with a letter. The maximum length for a key is 64 characters. - value: A string value limited to 64 UTF-8 characters.
Within a resource, the tag keys must be unique.
Add tags to resources in Aiven Console
Add tags to projects
- Console
- Terraform
- In your project, click Settings.
- In the Billing tags or Project tags click Add tag.
- Billing tags are returned in the invoice API and displayed on PDF invoices for the project.
- Project tags are returned for resources in the API and displayed in the list of projects.
- Enter a key and value for each tag.
- Click Save changes.
To add billing and project tags, use the tag
attribute in
your aiven_project
resource.
For billing tags, prefix the key
with billing:
. For example:
key = "billing:PO"
.
Add tags to services
- Console
- Terraform
- Log in to the Aiven Console and select your organization and your project from the top navigation bar.
- On the Services page of your project, select the service to tag.
- On the service page, select Service settings from the sidebar.
- In the Service status section, click Actions > Add service tags.
- In the Tag this service dialog, enter a key and its value in the Service Tags fields.
- Click Add tag to add additional tags.
- Click Save changes to apply the tags.
Use the tag
attribute in
your Aiven service resource.
Related pages