Docs Menu

Docs HomeLaunch & Manage MongoDBMongoDB Atlas

Resource Tags

On this page

  • Parameters
  • Considerations
  • Best Practices
  • Required Access
  • Suggested Tags
  • Next Steps

You can use resource tags to categorize resources by purpose, environment, team, or billing center. You can add tags to your projects and database deployments to better understand, organize, and identify these resources. Each tag is a key-value pair. For example, you might add an environment : production tag. In this example, you set the tag key to environment and you set the tag value to production. You can manage resource tags from the Atlas UI, Atlas Administration API, and Atlas CLI.

Note

These resource tags differ from the pre-defined replica set tags that Atlas provides. You can't change those replica set tags. You can provide and manage these resource tags.

Resource tags must adhere to the following parameters:

Important

Don't include sensitive information such as Personally Identifiable Information (PII) or Protected Health Information (PHI) in your resource tags. Other MongoDB services, such as Billing, can access resource tags. Resource tags are not intended for private and sensitive data. To learn more, see Sensitive Information.

  • You can have a maximum of 50 tags per database deployment.

  • Each tag must contain a key and a value.

  • Each tag key can have a maximum of 255 characters.

  • Each tag key must be unique.

  • Each tag value can have a maximum of 255 characters.

  • Each tag can contain only the following allowable characters:

    • letters

    • numbers

    • spaces

    • semi-colons (;)

    • at symbols (@)

    • underscores (_)

    • dashes (-)

    • periods (.)

    • plus signs (+)

Important

Don't include sensitive information such as Personally Identifiable Information (PII) or Protected Health Information (PHI) in your resource tags. Other MongoDB services, such as Billing, can access resource tags. Resource tags are not intended for private and sensitive data. To learn more, see Sensitive Information.

  • Add tags (key-value pairs) to your resources to better understand, organize, and identify your resources.

  • Use tags to categorize resources by purpose, environment, team, or billing center.

  • Cluster labels will be deprecated in one of the future releases. We strongly recommend that you use resource tags instead.

    Note

    Tags aren't supported for Datadog integrations. If you integrate with Datadog, continue using labels. To define labels, use the labels parameter in the Modify One Cluster API endpoint.

  • Tags keys and tag values are case sensitive. For example, Atlas accepts both environment and Environment as separate tag keys.

  • If you delete a tag, Atlas removes the tag from the associated resources.

  • Whenever a user adds, modifies, or deletes a resource tag, Atlas reflects the event in the Project Activity Feed.

Important

Don't include sensitive information such as Personally Identifiable Information (PII) or Protected Health Information (PHI) in your resource tags. Other MongoDB services, such as Billing, can access resource tags. Resource tags are not intended for private and sensitive data. To learn more, see Sensitive Information.

  • Use a standardized, case-sensitive format for tags, and apply it consistently across all resource types.

  • Create a tagging strategy that uses standard tags across all of your resource types.

  • Apply tags for cost allocation. Use a consistent tag key, such as cost-center or billing-unit, to associate related resources based on the billing entity or purpose. Doing so can help you perform cost allocation based on custom dimensions. To learn more, see Resource Tags on Invoices.

  • Apply tags for resource organization. Use a consistent tag key, such as environment, application, team, or owner, to group resources.

  • Use the Atlas Administration API, the Atlas CLI , or the HashiCorp Terraform MongoDB Atlas Provider to programmatically manage tags across your resources.

To create or modify resource tags, you must have the Project Owner role for the project or the Organization Owner role on its parent organization.

When you create resource tags in the Atlas UI, Atlas automatically suggests tag keys and values. We recommend that you apply the environment and application tag keys to every resource.

The following suggested tag keys appear in the Key drop-down:

Tag Key
Description
application
Key for the project, service, or application of the resource.
environment
Key for the deployment environment of the resource.

If you select the environment suggested tag key, the following suggested tag values appear in the Value drop-down:

  • development

  • production

  • staging

  • test

Your recent tags appear under the suggested ones. This list includes tags previously used for other resources.

To add tags to your database deployments, see Tags on Database Deployments.

← Restore a Collection from Queryable Legacy Backup