Class: CloudFormula::CloudFormation
- Inherits:
-
Object
- Object
- CloudFormula::CloudFormation
- Defined in:
- lib/cloudformula/cloud_formation.rb
Class Method Summary collapse
-
.create_stack(region, stack_name, template, override_options = {}, parameters = {}, aws_access_key_id = nil, aws_secret_key = nil) ⇒ AWS::CloudFormation::Stack
Convenience method which creates a new CloudFormation stack.
-
.update_stack(region, stack_name, template, parameters = {}, aws_access_key_id = nil, aws_secret_key = nil) ⇒ Object
Convenience method which updates an existing CloudFormation stack.
Class Method Details
.create_stack(region, stack_name, template, override_options = {}, parameters = {}, aws_access_key_id = nil, aws_secret_key = nil) ⇒ AWS::CloudFormation::Stack
Convenience method which creates a new CloudFormation stack.
16 17 18 19 20 |
# File 'lib/cloudformula/cloud_formation.rb', line 16 def create_stack(region, stack_name, template, = {}, parameters = {}, aws_access_key_id = nil, aws_secret_key = nil) validate template cfm = get_cloud_formation region, aws_access_key_id, aws_secret_key cfm.stacks.create(stack_name, template.generate, template.(, parameters)) end |
.update_stack(region, stack_name, template, parameters = {}, aws_access_key_id = nil, aws_secret_key = nil) ⇒ Object
Convenience method which updates an existing CloudFormation stack.
31 32 33 34 35 36 |
# File 'lib/cloudformula/cloud_formation.rb', line 31 def update_stack(region, stack_name, template, parameters = {}, aws_access_key_id = nil, aws_secret_key = nil) validate template cfm = get_cloud_formation region, aws_access_key_id, aws_secret_key stack = cfm.stacks[stack_name] stack.update({ :template => template.generate, :parameters => parameters }) end |