Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Tags vs Labels vs Meta-Data

Can someone please explain the difference between Instance Tags vs Labels vs Meta-Data and their respective use-cases in GCP?

1 Answers

I’d be happy to! 😀

Labels (extra link 1, extra link 2) are used to organize resources for billing and reporting.  They let you roll up all the resources and money you spend across multiple projects and then slice and dice that data to help you understand and better manage what you’re doing.  You might want to label resources by environment (e.g. Prod vs Dev), or by client (if you’re some sort of service provider), or by project cost centre, or by microservice in your system, or whatever!

Metadata is used to communicate (send) information from outside of GCE instances to within them.  You set metadata in the GCE control plane and then applications running on your GCE instances can read that information.  You will often provide configuration information to applications in this way, since changes like this to the environment can free you up from having to store such configuration in the application (and this is an important part of 12 Factor Applications).

Network Tags are used to activate different Firewall Rules and Routing Entries for that particular instance (or all instances made from that instance template).  These are used to make your VPC do almost whatever you can imagine.  You can "rewire" this Software-Defined Network by setting various Network Tags on instances and network rules–allowing certain communication and making some other communication impossible.

I hope this helps!


Chirag Suratkal

Thanks Mattias, explanation is really helpful

Mattias Andersson

No problem!

Ahmed Khaled

Thanks Mattias for great explanation

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?