Terraform module to find Amazon linux NAT instance AMI
- region - E.g. eu-central-1
- version - E.g. 2015.03.0 (default: 2015.03.0)
- virttype - hvm or pv (default: hvm)
- volumetype - gp2 or ebs (default: gp2)
- ami_id
module "nat_ami" {
source = "github.com/atsaki/tf_aws_nat_ami"
region = "eu-central-1"
}
resource "aws_instance" "nat" {
ami = "${module.nat_ami.ami_id}"
instance_type = "t2.micro"
...
}
The AMI list shuould be updated when new versions are released. You can update AMI list in the following steps.
-
Install AWS SDK for Ruby
$ bundle install --path vendor/bundle
-
Set up AWS credentials by
~/.aws/credentials
or environment varialbles -
Remove old variables.tf.json
$ rm variables.tf.json
-
Run make
$ make
-
Update default version of main.tf and README.md
-
Commit changes
Most of the module is based on