Skip to content

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

@remyleone

Description

@remyleone

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions