Giter Club home page Giter Club logo

terraform-aws-ebs-optimized's Introduction

terraform-aws-ebs-optimized

A terraform module to return true or false based on if an instance type supports the EBS optmized flag. If you want to use various instance types and EBS optimization, this module does the heavy lifting of determining if that's possible. Without the module, EC2 instance creation would fail on unsupported types and -- even worse -- launch configurations will create normally but fail silently when instances attempt to launch. This module means you don't need to think about that problem.

Usage example

A full example leveraging other community modules is contained in the examples/ebs_optimized_test_fixture. Here's the gist of using it via the Terraform registry:

variable "web_type" {
  description = "Size/type of the host."
  default     = "m1.large"
}

module "ebs_optimized" {
  source        = "terraform-aws-modules/ebs-optimized/aws"
  instance_type = "${var.web_type}"
}

resource "aws_instance" "web" {
  ami           = "${data.aws_ami.ubuntu.id}"
  instance_type = "${var.web_type}"
  ebs_optimized = "${module.ebs_optimized.answer}"
}

Testing

This module has been packaged with inspec tests through kitchen and kitchen-terraform. To run them:

  1. Install rvm and the ruby version specified in the Gemfile.

  2. Install bundler and the gems from our Gemfile:

    gem install bundler && bundle install
  3. Test using bundle exec kitchen test from the root of the repo.

inspec AWS resources are relatively new and not working on all platforms yet. If you're working with the module and tests are being skipped, ensure you verify functionality manually in the AWS console.

Doc generation

Documentation should be modified within main.tf and generated using terraform-docs. Generate them like so:

go get github.com/segmentio/terraform-docs
terraform-docs md ./ | cat -s | ghead -n -1 > README.md

Contributing

Report issues/questions/feature requests on in the issues section.

Full contributing guidelines are covered here.

Change log

The changelog captures all important release notes.

Authors

Created and maintained by Brandon O'Connor - [email protected]. Many thanks to the contributors listed here!

License

MIT Licensed. See LICENSE for full details.

Inputs

Name Description Type Default Required
instance_type Instance type to evaluate if EBS optimized is an option. string - yes

Outputs

Name Description
answer Returns 1 (true) or 0 (false) depending on if the instance type is able to be EBS optimized.

terraform-aws-ebs-optimized's People

Contributors

betajobot avatar brandonjbjelland avatar klintrup avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.