Skip to content

Terraform

Build a MkDocs Site with Terraform and S3

PAGE UNDER CONSTRUCTION

Find the latest code for this project on my GitHub

Chances are you have seen a website or documentation that make use of MkDocs, and especially Material for MkDocs. In fact, this blog site runs using Material for MkDocs and I have to say it is a delight compared to typical blog or WordPress platforms!

This becomes really powerful - and cost-effective - combined with the ability to host a static website using Amazon S3.

In this post I will show you how to create the AWS resources necessary for hosting your website using Terraform, as well as how to set up a basic MkDocs site.

Unit Test IaC with Terraform Tests

Testing Terraform

PAGE UNDER CONSTRUCTION

A challenge of being a DevOps engineer is that some of the typical dev parts don't always fit nicely. Unit testing is one example, where IaC is often hard to test in isolation and without some sort of actual deployment in a "test" or "sandbox" environment to validate against.

The lines between unit and integration testing become blurred for many DevOps or Platform engineers. Thankfully, HashiCorp has seen this gap and has introduced Terraform Tests to help bridge this gap!

In this post I will go over some basic unit testing that can be done for validating your IaC using terraform test to improve your code quality and provide additional peace of mind when making changes to your IaC!

AWS SSO with Terraform and Secrets Manager

You can find the latest code for this project on GitHub: https://github.com/shadetree-dev/terraform-aws-sso-permission-sets-example

We'll go through a few stages in this journey to get there:

  1. Bitch about SSO a bit and why it's such a burden to deal with
  2. Delegate an administrator for IAM Identity Center (SSO)
  3. Set up some AWS Secrets Manager secrets to pull dynamically from (avoid hard-coding)
  4. Write some Terraform and apply it!