Skip to content

Demo Proposal: Testing Infrastructure is Provisioned Correctly in Terraform, week 5 - #2973

Merged
ericcornelissen merged 4 commits into
KTH:2026from
seahoers:felixhh-pise/demo
Sep 3, 2026
Merged

Demo Proposal: Testing Infrastructure is Provisioned Correctly in Terraform, week 5#2973
ericcornelissen merged 4 commits into
KTH:2026from
seahoers:felixhh-pise/demo

Conversation

@seahoers

@seahoers seahoers commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Assignment Proposal

Title

Testing Infrastructure is Provisioned Correctly in Terraform

Names and KTH ID

Deadline

Week 5

Category

Demo

Description

Prevents incorrect changes to Infrastructure as Code (IaC) from provisioning resources by allowing infrastructure configurations to be automatically tested before or during the provisioning process.

Have a small Terraform configuration prepared with a few assertions, run terraform test (https://developer.hashicorp.com/terraform/language/tests) unsuccessfully, having intentionally introduced a configuration error and show the test failing, fix it, and show the test passing. Then briefly discuss how it can be utilized as a CI/CD gate.

Tests cannot guarantee that infrastructure is completely correct, and tests that provision real resources can be slow, costly, and potentially destructive. Alternatives include terraform validate, terraform plan, policy-as-code tools, static analysis, and integration testing, which catch different classes of problems. We intend to discuss the differences between these approaches, and what each achieves in terms of validation of IaC configurations.

Relevance

This demo is relevant to infrastructure as code as it shows how we can provision infrastructure with higher confidence. We apply common software engineering practices of automating testing to infrastructure itself. This generates fast feedback and prevents reliability challenges. Furthermore, faulty IaC configurations naturally affect the entire DevOps pipeline, as a consequence from being the underlying infrastructure and the foundation to the entire service/product itself.

@github-actions github-actions Bot added the demo One of the task categories listed in README.md label Sep 3, 2026
@algomaster99

Copy link
Copy Markdown
Collaborator

Readme is not correctly formatted
Need exactly: ['Assignment Proposal', 'Title', 'Names and KTH ID', 'Deadline', 'Category', 'Description']

Got: ['Assignment Proposal', 'Title', 'Names and KTH IDs', 'Deadline', 'Category', 'Description']

@ericcornelissen ericcornelissen self-assigned this Sep 3, 2026

@ericcornelissen ericcornelissen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposal is good and accepted 👍

I had a bit of hard time understanding your description due to the way you phrased it. For future proposals, please have a look at some other accepted proposals (e.g. #2977) and try to follow a similar "style".

@ericcornelissen
ericcornelissen merged commit 07ee992 into KTH:2026 Sep 3, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

demo One of the task categories listed in README.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants