项目作者: royge

项目描述 :
Terraform template for AWS Autoscaling stack
高级语言: HCL
项目地址: git://github.com/royge/terraform-aws-autoscaling.git
创建时间: 2018-08-22T01:15:35Z
项目社区:https://github.com/royge/terraform-aws-autoscaling

开源协议:

下载


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

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

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

    1. $ make docker

    Alternative:

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

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

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

    1. $ ENV=test make plan
  6. Execute apply

    1. $ ENV=test make apply
  7. Execute destroy

    1. $ ENV=test make destroy

Integration Testing

  1. Install Go 1.11 or above

  2. Download tests dependencies

    1. $ 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.

    1. $ make test

TODO

  1. Make userdata.sh location configurable