Skip to content

k-ader/terraform-aws-ami-find

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Name Version
terraform >= 1
aws >= 5

Providers

Name Version
aws >= 5

Modules

No modules.

Example

module "ami-find" {
  source       = "./modules/terraform-aws-ami-find"
  os           = "rhel8"
  architecture = "x86_64"
}

output "ami_id" {
  value = "${module.ami-find.ami_id}"
}
output "ami_name" {
  value = "${module.ami-find.name}"
}

output "ami_date" {
  value = "${module.ami-find.creation_date}"
}

Resources

Name Type
aws_ami.find data source

Inputs

Name Description Type Default Required
amis_map_owners n/a map(string)
{
"amazon2": "137112412989",
"rhel8": "309956199498"
}
no
amis_map_public n/a map(string)
{
"amazon2": "true",
"rhel8": "false"
}
no
amis_map_regex n/a map(string)
{
"amazon2": "^amzn2-ami-hvm",
"rhel8": "^RHEL-8.[8-9]"
}
no
architecture OS architecture of the AMI (ie: i386 or x86_64). string n/a yes
os The OS reference to search for string n/a yes

Outputs

Name Description
ami_id The ID of the found AMI
creation_date Date and time the image was created
deprecation_time Date and time when the image will be deprecated
name The AMI Name
owner_id AWS account ID of the image owner
root_device_name Device name of the root device.

About

Find RHEL or Amazon2 Linux images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages