Demo Proposal: Testing Infrastructure is Provisioned Correctly in Terraform, week 5 - #2973
Merged
Merged
Conversation
Collaborator
|
Readme is not correctly formatted Got: ['Assignment Proposal', 'Title', 'Names and KTH IDs', 'Deadline', 'Category', 'Description'] |
ericcornelissen
approved these changes
Sep 3, 2026
ericcornelissen
left a comment
Collaborator
There was a problem hiding this comment.
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.