Skip to content

A basic repository which can be given to interviewees to use as a base for their project.

Notifications You must be signed in to change notification settings

StratusGrid/terraform-aws-interview-starter

Repository files navigation

Contact Us | Stratusphere FinOps | StratusGrid Home | Blog

Interview Starter

This is to provide a foundation which interview candidates can build terraform projects on top of.

Init:

Without Role Assumption:

terraform init -backend-config=./init-tfvars/dev.tfvars

With MFA Role Assumption:

awsudo -u \<profile\> terraform init -backend-config=./init-tfvars/dev.tfvars 

Apply:

Without Role Assumption:

terraform apply -var-file ./apply-tfvars/dev.tfvars

With MFA Role Assumption:

awsudo -u \<profile\> terraform apply -var-file ./apply-tfvars/dev.tfvars

Tools to use

  • awsudo
  • tfenv (if using multiple versions of terraform)

Requirements

Name Version
terraform ~> 1.7.5
aws >= 5.44.0

Resources

Name Type

Inputs

Name Description Type Default Required
access_key AWS access key string "" no
account_numbers Whitelisted account numbers to apply terraform code in. Can apply in any if left blank. list(string) [] no
append_name_suffix String to append to the name_suffix used on object names. This is optional, so start with dash if using like so: -mysuffix. This will result in prefix-objectname-env-mysuffix string "" no
aws_profile AWS Profile credentials to use string "" no
developer name of developer who has written this code string n/a yes
env_name Environment name string to be used for decisions and name generation. Appended to name_suffix to create full_suffix string n/a yes
name_prefix String to use as prefix on object names string n/a yes
override_name_suffix String to completely override the name_suffix string "" no
prepend_name_suffix String to prepend to the name_suffix used on object names. This is optional, so start with dash if using like so: -mysuffix. This will result in prefix-objectname-mysuffix-env string "" no
region AWS Region to target string n/a yes
secret_key AWS secret key string "" no
source_repo name of repo which holds this code string n/a yes
token MFA Token retrieved with sts get-session-token string "" no

Outputs

Name Description
account_id Account which terraform was run on
aws_region AWS region
common_tags tags which should be applied to all taggable objects
name_prefix string to prepend to all resource names
name_suffix string to append to all resource names

Note, manual changes to the README will be overwritten when the documentation is updated. To update the documentation, run terraform-docs -c .config/.terraform-docs.yml

About

A basic repository which can be given to interviewees to use as a base for their project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages