

# Tag resources

Tags make your registered resources selectable in backup plans and usable for cost allocation, exactly like tags on AWS resources. AWS Backup offers three ways to tag discovered resources.

## Synced VMware tags
<a name="tag-mapping"></a>

You can have AWS Backup copy selected VMware tags from each VM to its resource target. When you register or edit a vCenter Server or ESXi resource provider, list up to 10 vSphere tag category names in Synced VMware tag keys (`TargetTagKeysToSync` in the API). At every resource sync, AWS Backup applies the VM's tags for each listed category in which the VM has exactly one tag as AWS tags with the prefix `aws-backup-external-synced/`. For example, a VM with the VMware tag `gold` in the category `backup` gets the AWS tag `aws-backup-external-synced/backup = gold`. To select these VMs in a backup plan, use the prefixed tag key. Synced VMware tags are available for VMware only.

## Target tags on create
<a name="tag-target-tags-on-create"></a>

Target tags on create are a set of AWS tags that AWS Backup applies automatically to every newly discovered resource target under a resource provider. You can use this to protect everything under a resource provider by filtering a backup plan on the automatically applied tag. Like synced VMware tag keys, these tags are a property of the resource provider.

## System property tags
<a name="tag-system-property"></a>

AWS Backup automatically imports useful properties from your source environment as system tags, for example, the folder and resource pool paths for VMware. These system property tags are applied to all resource targets and cannot be configured or turned off. Some keys are specific to a resource type.
+ All resource targets: `aws:backup-external:provider-arn`.
+ VMware: `aws:backup-external:vmware-vm/folder-path` and `aws:backup-external:vmware-vm/resource-pool-path`.
+ SQL Server: `aws:backup-external:mssql-database/instance-name`.

## Tagging limits
<a name="tag-limits"></a>

The following limits apply to each resource:
+ Up to 10 synced VMware tag keys per resource provider.
+ Up to 10 target-tags-on-create per resource provider.

A resource can have a maximum of 50 user tags overall.

## When tags are applied
<a name="tag-one-way-sync"></a>

AWS Backup applies target tags on create once, when it first discovers a resource target. After that, you can change a target's tags with the `TagResource` and `UntagResource` API operations. AWS Backup updates synced VMware tags at every resource sync, which runs on a schedule and when you start a sync. Synced tags use the `aws-backup-external-synced/` prefix, so they don't conflict with the other AWS tags on the resource target.

## No separate tagging role required
<a name="tag-no-role-required"></a>

Tagging for registered resources does not require a separate tagging IAM role.