Skip to content

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

License

Notifications You must be signed in to change notification settings

forter/tf_aws_virttype

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 72.9%
  • HCL 17.1%
  • Makefile 10.0%