bobtfish/puppet-aws_api — pull request #3 by rubyruy (2014-07-29 17:35:10+00:00)
Title: WIP: New resources for EC2 nodes, IAM roles, security groups, internet gateway routing and various other fixes

Hey there, not sure what the best way of doing this is - but I'm doing some fairly heavy duty work on your project, figured you might want to take a looksy as I go rather than eat the whole patch bomb at once? Already a fair bit of stuff accumulated.

Please note this is still a work in progress, I actually do NOT advise merging to master just yet.

As mentioned in the title there are several new resources:
- aws_ec2_instance (most but not all RunInstance options are supported)
- aws_iam_role
- aws_security_group

In addition to the above, I have modified the subnet, vpc and igw classes so the igw they are all automatically added to the main route -table for the subnet. (This was some lazyness on my part in lieu of further modifying the aws_routetable resource).

I had to branch off the strip_multi_credentials branch as master is currently broken when using ENV variables for auth. Seems reasonable stable btw.

I've also removed some of the begin/except blocks - hope that's ok. As far as I can tell puppet's handling of ruby exception is fine and the only thing achieved by exception wrapping is that the exception source becomes obscured. If there is something I'm missing about this let me know.

In fact, this is my first major puppet module contribution, so there's a lot of ignorant cargo-culting going on. I'm fairly certain the way I set up the newtype property definitions are either wrong or making extra work for myself in the provider. Either way, code review would be appreciated :)

Anyway, this is all for some internal deployment tools at work, so I'll keep on trucking for a while longer - R34 classes are coming next. I might get around refactoring a few bits around the base provider interface (ec2_api) if it gets sufficiently painful. I'll be happy to keep in touch with you as I go if you have time to look this over and merge it in, otherwise this will just continue living on our fork and I'll probably package a forked puppet module on forge as well until you have a chance to look this over.

Cheers!