This looks awesome. But being someone who build terraform modules regularly, I doubt this will replace the current unit and integration testing methods that consist in deploying resources and validate them to ensure a module does what it is intended for.
Thanks for this informative video. I have a few queries about 'terraform test': Since it doesn't have a persistent state file, how does it maintain a temporary state to track resources? What happens if the test is interrupted? How does recovery from interrupted tests work, and how are orphaned resources handled?
Thanks for your interest in `terraform test`, to scratch the surface on your questions: - `terraform test` stores state file(s) in memory during the period the test is running - an interrupted `terraform test` operation will behave in the same way a standard `terraform apply` does, where any resources created will need to be cleaned up - Any resources leftover from a `terraform test` operation will be listed as and the diagnostics will provide additional details Additional information can be found in the test documentation: developer.hashicorp.com/terraform/cli/commands/test#state-management and we're happy to have more in-depth conversations on our community forum: discuss.hashicorp.com/c/terraform-core/27
This looks awesome. But being someone who build terraform modules regularly, I doubt this will replace the current unit and integration testing methods that consist in deploying resources and validate them to ensure a module does what it is intended for.
Thanks for this informative video. I have a few queries about 'terraform test':
Since it doesn't have a persistent state file, how does it maintain a temporary state to track resources?
What happens if the test is interrupted? How does recovery from interrupted tests work, and how are orphaned resources handled?
Thanks for your interest in `terraform test`, to scratch the surface on your questions:
- `terraform test` stores state file(s) in memory during the period the test is running
- an interrupted `terraform test` operation will behave in the same way a standard `terraform apply` does, where any resources created will need to be cleaned up
- Any resources leftover from a `terraform test` operation will be listed as and the diagnostics will provide additional details
Additional information can be found in the test documentation: developer.hashicorp.com/terraform/cli/commands/test#state-management and we're happy to have more in-depth conversations on our community forum: discuss.hashicorp.com/c/terraform-core/27
@@HashiCorp Thanks a lot for the clarification 👌
Looks promising, native test framework.
atta boy KZ!