Giter Site home page Giter Site logo

terraform-aws-ami-search's Introduction

AWS AMI SEARCH Terraform module

Terraform module to find the last version of an AWS Ami IDs for working region, using common os name.

Usage

Set the 'os' var from the below list:

# Linux
ubuntu -> ubuntu-16.04
ubuntu-14.04
ubuntu-16.04
centos -> centos-7
centos-6
centos-7
centos-8
rhel -> rhel-7
rhel-6
rhel-7
rhel-8
debian -> debian-9
debian-8
debian-9
debian-10
fedora-27
amazon
amazon-2_lts
suse-les -> suse-les-12
suse-les-12


# Windows
windows -> windows-2019-base
windows-2019-base
windows-2016-base
windows-2012-r2-base
windows-2012-base
windows-2008-r2-base

Examples

module "ami-search" {
  source  = "otassetti/ami-search/aws"
  os = "centos-7"
}

resource "aws_instance" "web" {
  ami = "${module.ami-search.ami_id}"
  instance_type = "t2.micro"

  tags {
    Name = "HelloWorld"
  }
}

Limitations

  • Hvm type only (Hardcoded in the filter module)

Authors

Module managed by [Olivier Tassetti].

License

Apache 2 Licensed. See LICENSE for full details.

terraform-aws-ami-search's People

Contributors

alfred-nsh avatar amit-tewari avatar fdaugan avatar lbnotassetti avatar otassetti avatar otassetti-talend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

terraform-aws-ami-search's Issues

Error: Ambiguous attribute key

Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 16, in variable "amis_os_map_regex":
  16:     ubuntu-14.04 = "^ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-.*"

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 17, in variable "amis_os_map_regex":
  17:     ubuntu-16.04 = "^ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-.*"

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 18, in variable "amis_os_map_regex":
  18:     ubuntu-18.04 = "^ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-.*"

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 19, in variable "amis_os_map_regex":
  19:     ubuntu-18.10 = "^ubuntu/images/hvm-ssd/ubuntu-cosmic-18.10-amd64-server-.*"

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 20, in variable "amis_os_map_regex":
  20:     ubuntu-19.04 = "^ubuntu/images/hvm-ssd/ubuntu-disco-19.04-amd64-server-.*"

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 52, in variable "amis_os_map_owners":
  52:       ubuntu-14.04 = "099720109477" #CANONICAL

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 53, in variable "amis_os_map_owners":
  53:       ubuntu-16.04 = "099720109477" #CANONICAL

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 54, in variable "amis_os_map_owners":
  54:       ubuntu-18.04 = "099720109477" #CANONICAL

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 55, in variable "amis_os_map_owners":
  55:       ubuntu-18.10 = "099720109477" #CANONICAL

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.


Error: Ambiguous attribute key

  on .terraform/modules/debian10/otassetti-terraform-aws-ami-search-718ff71/variables.tf line 56, in variable "amis_os_map_owners":
  56:       ubuntu-19.04 = "099720109477" #CANONICAL

If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.
$ terraform --version
Terraform v0.12.12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.