royge / terraform-aws-autoscaling

Terraform template for AWS Autoscaling stack

Home Page:https://registry.terraform.io/modules/royge/autoscaling/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Autoscaling Template

Build Status

WARNING: You are fully aware that AWS resources created by this template are not always free even during tests.

Getting Started

  1. Clone the repo

    $ git clone git@github.com:royge/terraform-aws-autoscaling.git
    
  2. Set AWS credentials

    $ export AWS_ACCESS_KEY_ID=<your-access-key-id>
    $ export AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
    
  3. Run docker terraform docker container

    $ make docker
    

    Alternative:

    If you don't like docker, you can install terraform directly on your machine using the following command.

    $ wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip
    $ sudo unzip -o -d /usr/local/bin terraform_0.11.8_linux_amd64.zip
    $ terraform version
    
  4. Initialize and validate

    $ ENV=test make init
    $ ENV=test make validate
    
  5. Execute plan

    $ ENV=test make plan
    
  6. Execute apply

    $ ENV=test make apply
    
  7. Execute destroy

    $ ENV=test make destroy
    

Integration Testing

  1. Install Go 1.11 or above

  2. Download tests dependencies

    $ make test-prepare
    
  3. Execute tests

    Before running this command, make sure to have terraformtest.io certificate added in ap-southeast-1 region of you AWS account. If you have existing certificate you can modify domain and awsRegion variable values in the autoscaling_test.go file.

    $ make test
    

TODO

  1. Make userdata.sh location configurable

About

Terraform template for AWS Autoscaling stack

https://registry.terraform.io/modules/royge/autoscaling/


Languages

Language:HCL 54.2%Language:Go 33.4%Language:Makefile 10.7%Language:Shell 1.8%