AWS_AMI_MAPS.tf 865 B

123456789101112131415161718192021222324252627282930313233343536
  1. ###############################################
  2. # DO NOT EDIT THIS FILE
  3. #
  4. # This file is generated through 'make all'.
  5. # If you need to make changes, make your changes
  6. # to the corresponding .j file and then rerun
  7. # make all
  8. ###############################################
  9. #############
  10. # New method: Search for it!
  11. data "aws_ami" "ubuntu" {
  12. most_recent = true
  13. filter {
  14. name = "name"
  15. values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"]
  16. }
  17. filter {
  18. name = "virtualization-type"
  19. values = ["hvm"]
  20. }
  21. owners = ["099720109477"] # Canonical
  22. }
  23. # Use via: ami = "${data.aws_ami.ubuntu.id}"
  24. #############
  25. # Old fashioned method, manual mapping:
  26. variable "ubuntu_amis" {
  27. type = "map"
  28. default = {
  29. us-east-1 = "ami-40d28157"
  30. us-east-2 = "ami-153e6470"
  31. }
  32. }
  33. # Use with: ami = "${lookup(var.ubuntu_amis, var.region)}"