Tags play a vitally important roles when it comes to ease of management. They are used when certain resources have to be used for certain purposes. A tag is a text string that can be attached to a particular resource. In vRealize Automation, resources that can have tags attached to them include the followings:
- Cloud Zone
- Compute Resources
- Network Profiles
- Storage Profiles
We use tags to make a right decision in terms of resource provisioning, meaning, if you have an environment where your test and development will use, you can attach a tag named Test or R&D and use it in your cloud templates, or if you are using an all flash storage or a storage system that use tiering technique, you can assign SSD or Tiered to these resources respectively. Ultimately, to wrap up, tags can be used to organize or categorize your resources:
- Capability
- Location
- Type
- Department
Of course you can use them to whatever use case of your desired preferences and they are not limited to what have been mentioned. In vRA point of view, tags are broadly categorized into two categories:
- Capability Tags
- Constraint Tags
A capability tag as its name points to, is placed on a resource offering a capability, however a Constraint tag is used in Cloud templates (blueprints) or projects. Basically, a constraint tag forces deployment on resources where a capability tag is matched.
As stated, constraint tag is used in YAML cloud templates or in projects and if a conflict occurs, the constraint tag in project takes precedence.
When using tags in projects, we have to proactively decide what to do if in case the condition is not met. For example you have used a tag to deploy your resources on Region-A of your AWS environment where at the moment is fully utilized. What can be done then? To go ahead on another region or stop the deployment? That’s where the concept of Hard or Soft Constraint tags comes in. Yes you can guess that when Hard constraint tag is used it will not allow your deployment to keep going unless the condition is met. On the other hand, soft constraint tag is easygoing and will allow you to go further. Now let’s see it in practice.
Creating a Tag
You can either go directly to the resource that you want to place a tag on, or go to Infrastructure>Configure>Tags in Cloud Assembly.
In Infrastructure tab under Configure section, click Cloud Zones. Open a cloud Zone.
Under Capabilities, you can add capability tags to this cloud zone.
you can use from existing tags or create tags with the syntax of Key:Value and add it to the resource.
Now, form the same section (Configure), click Tags and the click on New Tag.
You can see that there are two things that need to be given here: Key and Value.
Up until now, we covered concepts of tag management and how we can use them in our deployments. In the coming blogpost, we’ll see how tagging is used for storage configuration.
As you probably know, I have created a blogpost series on vRealize Automation, in case you are interested go ahead and catch a look here.
I hope this’s been informative.