IT3110 - System Automation

IT3110 @ utahtech

IT 3110: Systems Automation

Terraform 2

Assignment

In this assignment, you will automagically create various AWS resources (Infrastructure as Code) using Terraform.

You will do the same as the last assignment, but you should utilize terraform cloud.

If you don’t already have your aws code in a git repo, create a new repo now and put your terraform file in it. Remove the profile = "default" line from your configuration. This instructs terraform to look in the normal place (.aws/credentials) for any login info. When we use the cloud, we don’t want this.

You must enable the aws provider for your organization. Click on your organization, registry, search for public providers. Find aws. Add it to your organization. This allows users of your organization to use the aws provider.

You should also make sure that the provider lines of your terraform file MATCH whatever the aws registry indicates.

On Terraform cloud, begin by creating a new workspace. You should select the topmost selection Version control workflow. You will need to connect it to your github provider. After doing so, choose your repo and Create workspace.

Then, you must add your workspace variables to the cloud so that it can communicate with AWS infrastructure..

You should create the following variables (these are all found in your .aws/credentials file):

Those variables are case sensitive AND they should be stored as ENVIRONMENT Variables NOT terraform variables.

When you make a push to your git repo, it should trigger a new terraform apply event.

Submission

Probably a screenshot or several of you successful outputs on the website.