Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terraform-community-modules/tf_aws_virttype

Lookup the virtualization types (hvm or pv) supported for AWS instance types
https://github.com/terraform-community-modules/tf_aws_virttype

Last synced: about 2 months ago
JSON representation

Lookup the virtualization types (hvm or pv) supported for AWS instance types

Awesome Lists containing this project

README

        

# tf_aws_virttype

Simple terraform module to allow you to look up the type of AMI
you need to use for a particular instance type.

You simply pass the module your ''instance_type'' and it outputs
an ''prefer_hvm'' and an ''prefer_pv'',
which will contain either 'hvm' or 'pv'.

You can then use this in your AMI lookup module to work out which
AMI you need.

Data in this module is generated from:

https://github.com/powdahound/ec2instances.info/blob/master/www/instances.json

Use this in your terraform code like this:

module "virttype" {
source = "github.com/terraform-community-modules/tf_aws_virttype"
instance_type = "m3.xlarge"
}

And you can then reference:

"${module.virttype.prefer_hvm}"

which will return either 'hvm' or 'pv'

The two outputs are given as some instance types support both types
of virtualization (e.g. m3.large), and so you can express a preference
by using one output or the other.