ec2-tags Ohai Plugin
An Ohai plugin for getting EC2 instance tags
Install & Usage Instructions
In order to use this plugin you will need ensure that the following are in your
The recipe will install the required
aws-sdk gem and the
ec2-tags plugin at
compile time, so it is recommended that this is the first recipe in your runlist
so that the node data it creates can be consumed during the rest of the compilation.
Once the plugin has been installed by the
the instance tags will be available under
node['ec2']['tags'] as a hash with
the tag key being the hash key, i.e
'Name' => 'instance_name',
'my_custom_tag' => 'value'
The instances will need to have an IAM instance profile that allows at least
the EC2 DescribeTags endpoint to be called.