Skip to content

ktech-org/interview-test-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published