hashicorp / hashicorp/terraform-plugin-testing

Add a way to to have acceptance testing performed as HCL files

Open
#636 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
68
Forks
22
Avg merge
2d 12h
Merged PRs (30d)
1

Description

### terraform-plugin-testing version

```
insert version here
```

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.