Salt grains
grains are used for targeting in salt they can set from the master or can be set into the minion. Based on the value of grains from the minion. We can target specific minion where a particular salt state has to be applied.
setup grains in a minion
In the minion create a file /etc/salt/grains and add the following grains which can be later used to target this minion.
restart the minion
Once the grains have been setup restart the minion. In an ideal situation these are populated via cloud-init or metadata from cloud providers are used to discover and target salt-minions.