Skip to content

Add docs for best practices of configuring a provider during testingΒ #567

@zliang-akamai

Description

@zliang-akamai

Does this documentation exist?

  • This is new documentation
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions