Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tag an EC2 instance using Ruby in Chef?

I'm playing around with Chef to launch EC2 instances. Everything is working pretty well, but Chef doesn't seem to have the ability to tag the instances. Am I missing something?

Otherwise, what's the preferred Ruby library for achieving this? Can I do it without requiring additional gems?

Thanks

like image 234
Zach Avatar asked May 20 '11 22:05

Zach


1 Answers

Version 0.5.12 of the knife-ec2 Gem supports tagging EC2 instances on creation with the --tags option.

knife ec2 server create [... your options...] --tags Tag=Value
like image 117
jtimberman Avatar answered Sep 21 '22 13:09

jtimberman