amis.tf 545 B

1234567891011121314151617181920212223242526272829303132
  1. locals {
  2. ami_map = {
  3. "tq" = data.aws_ami.tq.image_id,
  4. }
  5. # We need some data from the block devices
  6. block_device_mappings = {
  7. "tq" = {
  8. for bd in data.aws_ami.tq.block_device_mappings :
  9. bd.device_name => bd
  10. }
  11. }
  12. }
  13. data "aws_ami" "tq" {
  14. most_recent = true
  15. owners = [var.common_services_account]
  16. filter {
  17. name = "virtualization-type"
  18. values = ["hvm"]
  19. }
  20. filter {
  21. name = "root-device-type"
  22. values = ["ebs"]
  23. }
  24. filter {
  25. name = "name"
  26. values = ["XDR_ThreatQ_*"]
  27. }
  28. }