/terraform-aws-ami-ubuntu

Terraform module to fetch the most recent Ubuntu 20.04 AMI by default

Primary LanguageHCLThe UnlicenseUnlicense

terraform-aws-ami-ubuntu

Fetch the most recent Ubuntu 22.04 AMI by default.

Usage

Example:

module "ubuntu_22_04_latest" {
  source = "github.com/andreswebs/terraform-aws-ami-ubuntu"
}

locals {
  ami_id = module.ami_ubuntu_22_04_latest.ami.image_id
}

## --> use `local.ami_id

Inputs

Name Description Type Default Required
arch Processor architecture string "amd64" no
ubuntu_version Ubuntu version string "22.04" no
virtualization_type Virtualization type string "hvm" no
volume_type Volume type string "ebs-gp2" no

Modules

No modules.

Outputs

Name Description
ami SSM parameter resource containing the AMI data
ami_id AMI ID

Providers

Name Version
aws ~> 5.0

Requirements

Name Version
terraform ~> 1.3
aws ~> 5.0

Resources

Name Type
aws_ssm_parameter.this data source

Authors

Andre Silva - @andreswebs

License

This project is licensed under the Unlicense.