Hey again 👋 Welcome to part 2.
Just to set the scene in terms of what we are looking to achieve here:
- We will be creating AWS IAM access keys and storing them in our Terraform Cloud secrets vault.
- We won't be installing Terraform locally.
- We won't be putting AWS keys in any Terraform files.
- We will be using a local git repository to store our Terraform files.
- We will be connecting our local git repository with a remote repository on Github.
- When we commit our Terraform files locally, we will then push them to our remote github repository.
- Our push to github will then trigger a remote Terraform plan in Terraform Cloud.
- We will then review the plan in Terraform Cloud before permitting it to build the defined AWS assets.
- We will then destroy the AWS assets using Terraform Cloud.
To get started with Terraform and Cloud we are going to need to create accounts for both platforms, so let's begin with Terraform Cloud.
Head over to Terraform Cloud and sign up with an email address.
Confirm your email as requested.
Once your email address has been confirmed, you should see the welcome page, choose 'start from scratch'
Next up we need to create an organisation, here you can see I that I have unimaginatively made one up called 'ACME'
Now we need to create a workplace, so we need to choose how we are going to interact (programmatically) with our Terrform Cloud instance. We are going to use Github for that so select 'version control workflow'.
Great, let's leave it there for now and come back later once we have created our Github account.
Okay, so on to Github, head over to Github.
This is such a cool onboarding process..
Drop in your email address, a strong password and a unique username.
You should now have a mail in your inbox with a launch code, drop that in next.
We like free stuff, so select the free account option.
Last step, provide a unique name for the repository (it doesn't matter if it is private or public, that is up to you, we won't be dropping any sensitive information in there).
Alright, all done. Let's move on to syncing up the Github repository with your newly minted Terraform Cloud.