hashicorp / hashicorp/terraform-plugin-testing
New TestCheck helper `TestCheckResourceAttrPairWith`
- Dominant language
- Go
- Stars
- 68
- Forks
- 22
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
### terraform-plugin-testing version
```
% go list -m github.com/hashicorp/terraform-plugin-testing/...
github.com/hashicorp/terraform-plugin-testing v1.5.1
```
### Use cases
It would be handy to have a new _TestCheck_ helper function that combines `TestCheckResourceAttrWith` and `TestCheckResourceAttrPair`, say `TestCheckResourceAttrPairWith`:
```go
type CheckResourceAttrPairWithFunc func(valueFirst, valueSecond string) error
func TestCheckResourceAttrPairWith(nameFirst, keyFirst, nameSecond, keySecond string, checkValuesFunc CheckResourceAttrPairWithFunc) TestCheckFunc {
...
}
```
The canonical use case for the Terraform AWS Provider is to test logical equivalence (rather than byte-for-byte equivalence) of a data source's IAM policy document and a resource's IAM policy document.
Contributor guide
Assessment
This issue has not been assessed yet.