seqeralabs / terraform-seqera-aws

Apache License 2.0
6 stars 3 forks source link

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

Open enekui opened 1 year ago

enekui commented 1 year ago

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.

pditommaso commented 1 year ago

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

enekui commented 1 year ago

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.