Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Unable to create EC2 instance with EBS block device mappings #236

Closed
SuperGeno opened this issue Jan 27, 2017 · 2 comments
Closed

Unable to create EC2 instance with EBS block device mappings #236

SuperGeno opened this issue Jan 27, 2017 · 2 comments
Labels

Comments

@SuperGeno
Copy link

SuperGeno commented Jan 27, 2017

Description

Unable to set up/configure EBS block devices within EC2 instance template.

Expected behavior

Should be able to set up/configure EBS block device mappings within EC2 instance template.

Observed behavior

When EBS block store configuration is declared within the ec2_instance template, running a convection diff/print_template/converge fails with undefined local variable or method 'config'.

It looks like the problem is just due to using the wrong variable name (config vs. ebs) when setting up the EBS properties in aws_ec2_block_device_mapping.rb.

No issue with setting up/configuring Ephemeral storage.

Steps to Reproduce

Install version 1.0.4 of the gem and run convection print_template on a stack that includes ebs block definition within an ec2_instance template:

ec2_instance 'MyEC2Instance' do
  # some settings

  block_device do
    device_name '/dev/sdf'
    ebs do
      volume_size 30
      delete_on_termination true
    end
  end
end

Stack Trace or Log Messages

Stack trace for `brief error context`
.../convection-1.0.4/lib/convection/model/template/resource_property/aws_ec2_block_device_mapping.rb:19:in `ebs': undefined local variable or method `config' for #<Convection::Model::Template::ResourceProperty::EC2BlockDeviceMapping:0x007fecd9d90468>(NameError)
@SuperGeno SuperGeno changed the title Unable to create EC2 instance with EBS block device mappings. Unable to create EC2 instance with EBS block device mappings Jan 27, 2017
erran-r7 pushed a commit that referenced this issue Mar 2, 2017
@erran-r7 erran-r7 added the bug label Mar 2, 2017
@erran-r7
Copy link
Contributor

erran-r7 commented Mar 6, 2017

@SuperGeno you can use 'convection', >= 1.1.0 in your Gemfile/gemspec for these changes.

@SuperGeno
Copy link
Author

Thanks @erran-r7, really appreciate it!

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants