Fetch the most recent Amazon Linux 2 AMI.
Example:
module "amzn2_latest" {
source = "github.com/andreswebs/terraform-aws-ami-amzn2"
}
locals {
ami_id = module.amzn2_latest.ami_id
}
## --> use `local.ami_id
Name | Description | Type | Default | Required |
---|---|---|---|---|
arch | Processor architecture | string |
"x86_64" |
no |
minimal | Use minimal? | bool |
false |
no |
storage_type | AMI storage type | string |
"gp2" |
no |
virt_type | Virtualization type | string |
"hvm" |
no |
No modules.
Name | Description |
---|---|
ami | SSM parameter resource containing the AMI data |
ami_id | AMI ID |
Name | Version |
---|---|
aws | ~> 3.50 |
Name | Version |
---|---|
terraform | ~> 1.1 |
aws | ~> 3.50 |
Name | Type |
---|---|
aws_ssm_parameter.amzn2 | data source |
Andre Silva - @andreswebs
This project is licensed under the Unlicense.