Comments (7)
We definitely should, this is essential functionality for our own internal project tracking.
from chef-provisioning-aws.
kitchen-ec2 handles this by having a config[:tags]
element that is auto populated with {:created_by => 'Test Kitchen'}
but can be expanded with user supplied tags.
I think we could do something similar. @fnichol suggested having users supply this to the with_driver
block because these tags will apply to more than just machines. They apply to most AWS objects.
from chef-provisioning-aws.
+1, we use this for elastic search's EC2 discovery.
from chef-provisioning-aws.
I see there is now tagging being implemented in #190. I'd expect the next version of the gem would include this.
However, in the meantime I've just built chef-provisioning-1.2.0.dev.0.gem
and the provisioning of EC2 instances successfully tagged them.
machine node['my_cookbook']['fqdn'] do
machine_options({
:aws_tags => {:MyKey => 'MyValue', :AnotherKey => 'AnotherValue'},
:use_private_ip_for_ssh => true,
:associate_public_ip_address => false,
:source_key => node['my_cookbook']['aws_ssh_key_path'],
:bootstrap_options => {
:availability_zone => node['my_cookbook']['AZ'],
:subnet_id => node['my_cookbook']['subnet'],
:security_group_ids => [
node['my_cookbook']['secgroups']['default']
],
:private_ip_address => node['my_cookbook']['ip_address'],
:key_name => node['my_cookbook']['aws_ssh_key_id'],
:instance_type => node['my_cookbook']['instance_type']
},
:image_id => node['my_cookbook']['ami']
})
end
from chef-provisioning-aws.
Glad it worked! I've added several specs to cover multiple cases. I merged #190 sometime last week, so it will be included in the next release.
from chef-provisioning-aws.
I'm looking to get a release out this week, but I keep putting it off because there are some conflicting dependencies in the ChefDK that I'll have to do the sacred Conflicting Dependency Dance to solve
from chef-provisioning-aws.
This fix was released and is currently in 1.3.x branch of CPA
from chef-provisioning-aws.
Related Issues (20)
- aws_ebs_volume from snapshot_id ?
- Unable to create an Instance on us-east-2 HOT 2
- Error when using a lazy attribute in bootstrap options HOT 1
- machine_batch fails while machine alone resouce works fine HOT 6
- machine_options[:convergence_options] ignored on machine resource HOT 5
- with_machine_options() being ignored 100% with machine_batch HOT 1
- AWS Tags Issue HOT 2
- Examples for aws_cloudwatch_alarm work only with aws-sdk-v1
- launch_configuration expects base64 encoded user_data
- machine/machine_image resources no longer wait for transport
- auto_scaling_group now requires new way to specify subnets
- Random error "ECONNREFUSED" when provisioning a CentOs machine HOT 1
- Not able to assign custom Service Linked Role for Auto Scaling Group
- Allow longer AMI IDs HOT 2
- AWS EBS Volume gets created but failing to attache to machine HOT 1
- call to aws_eip_address failing with NoMethodError: undefined method `[]' for nil:NilClass HOT 1
- Dependabot can't parse your Gemfile
- Attaching a rule to a security-group involving an sg from a Peering VPC is failing
- undefined method `aws_vpc' for cookbook: aws, recipe: default :Chef::Recipe
- -1 Chef server for AWS INFRASTRUCTURE provisioning I'm using aws cook book in chef and I'm adding vpc creation: my_vpc = aws_vpc 'my_vpc' do cidr_block '10.0.0.0/24' main_routes '0.0.0.0/0' => :internet_gateway internet_gateway true`enter code here` end my_sg = aws_security_group 'my_sg' do vpc lazy { my_vpc.aws_object.id } inbound_rules '0.0.0.0/0' => [ 22, 80 ] end my_subnet = aws_subnet 'my_subnet' do vpc lazy { my_vpc.aws_object.id } cidr_block '10.0.0.0/24' availability_zone 'eu-west-1a' map_public_ip_on_launch true end machine 'my_machine' do machine_options( lazy do { bootstrap_options: { subnet_id: my_subnet.aws_object.id, security_group_ids: [my_sg.aws_object.id] } } end ) end I'm experiencing "undefined method" error NoMethodError undefined method `aws_vpc' for cookbook: chef-aws, recipe: default :Chef::Recipe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-provisioning-aws.