hashicorp / hashicorp/terraform-plugin-testing

Add docs for best practices of configuring a provider during testing

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

Description

### Does this documentation exist?

* [ ] This is new documentation
* [x] This is an enhancement to existing documentation

### Where would you expect to find this documentation?

https://developer.hashicorp.com/terraform/plugin/testing/acceptance-tests/configuration

#### Details

There isn't a doc for configuring the provider for testing. Directly put the provider configuration block in the test config would trigger the provider re-configured warning.

A documentation for the best practices of configuring a provider, including the provider being tested and external providers, seems to be needed.

There are some ways to configure the provider during testing in HashiCorp maintained providers repository, like AWS provider: https://github.com/hashicorp/terraform-provider-aws/blob/c251ae9447a116ef51715a28e0e21204bf92450c/internal/acctest/acctest.go#L312-L333

However, adding a doc to formally describe it would be much better and easier for plugin developers to understand.

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.