Git Product home page Git Product logo

interview-test-terraform's Introduction

Interview Test Terraform

Usage

All aspects of this exercise have been Dockerised, to run this on a local machine (or server) all you need is Docker installed.

Localstack

Be aware, Localstack only emulates AWS and does NOT emulate all AWS services.

For initial startup, localstack needs to be running.
The following command will build and start up a "clean" environment.

$ make up

Once finished, cleanup can be done with the following command.

$ make down

Terraform

The "main" commands have been abstracted to the Makefile to work with Docker.

$ make init
$ make plan
$ make apply
$ make destroy

If for any reason, you want more flexibility on these commands (or use other commands), you can do so using the following.

$ CMD=init make terraform
$ CMD=plan make terraform
$ CMD=apply make terraform
$ CMD=destroy make terraform

AWS CLI

The AWS CLI has also been abstracted into the Makefile and needs a simple translation to work with any CLI command.

$ SERVICE=ec2 CMD=describe-instances make aws

Known issues

AMIs

Using the AMI data source does not seem to work when trying to query Localstack.
A valid AMI ID has been set in the locals within the variables.tf file but a list of images can be found by querying the AWS CLI.

$ SERVICE=ec2 CMD=describe-images make aws

Instance type

It's a bit tricky to know which instance types are available.
A valid instance type has been set in the locals within the variables.tf file.

interview-test-terraform's People

Watchers

James Cloos avatar

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.