Terraspace supports testing with real-resources. It is recommended to use a separate AWS account, Azure subscription, GCP project, or cloud provider equivalent that is dedicated for testing purposes.
The usual testing process will:
- Build a test harness. The test harness is a generated terraspace project with the specified modules and stacks.
- Runs a
terraform apply) to create real resources.
- Check the resources. In this case, it simply checks for the terraform output.
- Runs a
terraform destroy) to clean up the real resources.
Module-Level and Project-Level Tests
Tests for both module-level and project-level tests are supported:
- Test Harness: Test Harness Concept
- Module-Level Testing: Testing reusable modules.
- Stack-Level Testing: Testing your stack code.
- Project-Level Testing: Testing your project code.