terraform-plugin-testing version
Use cases
As a provider maintainer, I have to write my HCL configuration for testing my provider and performing the checks in two different languages.
HCL config is written either inline in the go test or as a result of a function or coming from a file on disk.
While the checks are performed as go code using for instance resource.TestCheckResourceAttr
It would be helpful to be able to read the checks, input variables and configuration file as a single file.
It would also help to build up a corpus a code that include testing as hcl.
Attempted solutions
Using regular acceptance testing.
Proposal
Could it be possible to have terraform-plugin-testing supporting config files that contains assert, or either native testing features of terraform https://developer.hashicorp.com/terraform/language/tests
Could it also be possible to have examples in the documentation that would show it.
References
terraform-plugin-testing version
Use cases
As a provider maintainer, I have to write my HCL configuration for testing my provider and performing the checks in two different languages.
HCL config is written either inline in the go test or as a result of a function or coming from a file on disk.
While the checks are performed as go code using for instance
resource.TestCheckResourceAttrIt would be helpful to be able to read the checks, input variables and configuration file as a single file.
It would also help to build up a corpus a code that include testing as hcl.
Attempted solutions
Using regular acceptance testing.
Proposal
Could it be possible to have terraform-plugin-testing supporting config files that contains assert, or either native testing features of terraform https://developer.hashicorp.com/terraform/language/tests
Could it also be possible to have examples in the documentation that would show it.
References