Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass additional options to cloudformation #64

Closed
dmeadows opened this issue Oct 14, 2015 · 10 comments
Closed

pass additional options to cloudformation #64

dmeadows opened this issue Oct 14, 2015 · 10 comments

Comments

@dmeadows
Copy link

Any additional options don't appear to be forwarded on to cloudformation during stack creation. We need to be able to pass "disable-rollback" for debugging bootstrapping issues.

@aboutte
Copy link

aboutte commented Oct 15, 2015

We disable rollback with --disable-rollback. For example:

./cloudformation.rb cfn-create-stack stack-name --region us-west-2 --capabilities CAPABILITY_IAM --parameters "key=value;key2=value" --disable-rollback --timeout 20

@dmeadows
Copy link
Author

@aboutte Are you using version 1.0.4?

@aboutte
Copy link

aboutte commented Oct 15, 2015

oops sorry...did not think about that. I am running 0.4.7.

@jonaf
Copy link
Contributor

jonaf commented Oct 21, 2015

Good catch, @dmeadows ! It looks like we just need to do some opt parsing and pass anything we don't specifically account for into the options hash we provide to the Cloudformation client in cfntemplate.rb. This should be relatively easy (parse the extra options, convert them to lowercase and hyphens to underscores, and merge them into the options hash) to do, but it is a bug in 1.0.4.

@jonaf
Copy link
Contributor

jonaf commented Oct 21, 2015

@dmeadows Can you do me a favor and check out b180666 and let me know if it works for you? Note that some options might have slightly altered names (e.g., --timeout is now --timeout-in-minutes, as Amazon's Ruby SDK has named it as such: http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Client.html#create_stack-instance_method).

@apohor
Copy link

apohor commented Nov 30, 2015

Hey @jonaf, I've got following error with this codebase using --disable-rollback parameter:

"/Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/seahorse/model/shapes.rb:204:in `member': no such member :_c (ArgumentError)\n\tfrom /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/param_builder.rb:25:in `block in structure'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/param_builder.rb:23:in `each_pair'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/param_builder.rb:23:in `structure'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/param_builder.rb:16:in `apply'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/handler.rb:48:in `apply_params'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/handler.rb:42:in `build_request'\n\tfrom /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/query/handler.rb:26:in `call'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/plugins/endpoint.rb:34:in `call'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/plugins/param_converter.rb:21:in `call'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/plugins/response_target.rb:21:in `call'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/request.rb:70:in `send_request'
from /Library/Ruby/Gems/2.0.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
from /Library/Ruby/Gems/2.0.0/gems/cloudformation-ruby-dsl-1.0.4/lib/cloudformation-ruby-dsl/cfntemplate.rb:280:in `cfn'
from /Library/Ruby/Gems/2.0.0/gems/cloudformation-ruby-dsl-1.0.4/lib/cloudformation-ruby-dsl/cfntemplate.rb:503:in `exec!'
from ./service.rb:284:in `<main>'"

@jonaf
Copy link
Contributor

jonaf commented Dec 3, 2015

hi @apogoryelyi. It looks like that error is coming from the Seahorse library in the AWS Ruby SDK. Did you run bundle install?

@apohor
Copy link

apohor commented Dec 3, 2015

@jonaf it seems like I do my test incorrectly, please merge this change

@jonaf
Copy link
Contributor

jonaf commented Dec 3, 2015

Thanks for verifying, @apogoryelyi !

@jonaf
Copy link
Contributor

jonaf commented Dec 3, 2015

Closed by #68

@jonaf jonaf closed this as completed Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants