Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check blocks, pre/post-conditions, and E2E test framework #28

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

enekui
Copy link
Contributor

@enekui enekui commented Nov 27, 2023

Description

Terraform tests let authors validate that module configuration updates do not introduce breaking changes. Tests run against test-specific, short-lived resources, preventing any risk to your existing infrastructure or state.

By default, tests within Terraform create real infrastructure and can run assertions and validations against that infrastructure. This is analogous to integration testing because you are testing Terraform's core functionality by executing operations and validating the infrastructure Terraform creates.

The check block can validate your infrastructure outside the usual resource lifecycle. Check blocks address a gap between post-apply and functional validation of infrastructure.

@enekui enekui linked an issue Nov 27, 2023 that may be closed by this pull request
@pditommaso
Copy link
Contributor

This would be very usuful. Do you know Localstack? maybe it could be possible to validate changes testing against localstack deployment

@enekui
Copy link
Contributor Author

enekui commented Nov 27, 2023

Localstack

Unsefull?
LocalStack is a third party product. Terraform Test Framework is a built-in Terraform framework that we have been waiting for years.
Before this was released, we were using Go test framework for Terraform.
What I am implementing is defensive programming to ensure our code is flawless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement E2E test framework to validate full deployment on every PR
2 participants