# Functions
AddTestSweepers function adds a given name and Sweeper configuration pair to the internal sweeperFuncs map.
ComposeAggregateTestCheckFunc lets you compose multiple TestCheckFuncs into a single TestCheckFunc.
ComposeTestCheckFunc lets you compose multiple TestCheckFuncs into a single TestCheckFunc.
NonRetryableError is a helper to create a RetryError that's _not_ retryable from a given error.
ParallelTest performs an acceptance test on a resource, allowing concurrency with other ParallelTest.
Helper for a resource to generate a unique identifier w/ given prefix
After the prefix, the ID consists of an incrementing 26 digit value (to match previous timestamp output).
Retry is a basic wrapper around StateChangeConf that will just retry a function until it no longer returns an error.
RetryableError is a helper to create a RetryError that's retryable from a given error.
RetryContext is a basic wrapper around StateChangeConf that will just retry a function until it no longer returns an error.
Test performs an acceptance test on a resource.
TestCheckModuleNoResourceAttr - as per TestCheckNoResourceAttr but with support for non-root modules
Deprecated: This functionality is deprecated without replacement.
TestCheckModuleResourceAttr - as per TestCheckResourceAttr but with support for non-root modules
Deprecated: This functionality is deprecated without replacement.
TestCheckModuleResourceAttrPair - as per TestCheckResourceAttrPair but with support for non-root modules
Deprecated: This functionality is deprecated without replacement.
TestCheckModuleResourceAttrPtr - as per TestCheckResourceAttrPtr but with support for non-root modules
Deprecated: This functionality is deprecated without replacement.
TestCheckModuleResourceAttrSet - as per TestCheckResourceAttrSet but with support for non-root modules
Deprecated: This functionality is deprecated without replacement.
TestCheckNoResourceAttr ensures no value exists in the state for the given name and key combination.
TestCheckOutput checks an output in the Terraform configuration
An experimental interface exists to potentially replace the TestCheckOutput functionality in the future and feedback would be appreciated.
TestCheckResourceAttr ensures a specific value is stored in state for the given name and key combination.
TestCheckResourceAttrPair ensures value equality in state between the first given name and key combination and the second name and key combination.
TestCheckResourceAttrPtr is like TestCheckResourceAttr except the value is a pointer so that it can be updated while the test is running.
TestCheckResourceAttrSet ensures any value exists in the state for the given name and key combination.
TestCheckResourceAttrWith ensures a value stored in state for the given name and key combination, is checked against a custom logic.
TestCheckTypeSetElemAttr ensures a specific value is stored in state for the given name and key combination under a list or set.
TestCheckTypeSetElemAttrPair ensures value equality in state between the first given name and key combination and the second name and key combination.
TestCheckTypeSetElemNestedAttrs ensures a subset map of values is stored in state for the given name and key combination of attributes nested under a list or set block.
TestMain adds sweeper functionality to the "go test" command, otherwise tests are executed as normal.
TestMatchOutput ensures a value matching a regular expression is stored in state for the given name.
TestMatchResourceAttr ensures a value matching a regular expression is stored in state for the given name and key combination.
TestMatchTypeSetElemNestedAttrs ensures a subset map of values, compared by regular expressions, is stored in state for the given name and key combination of attributes nested under a list or set block.
TestModuleMatchResourceAttr - as per TestMatchResourceAttr but with support for non-root modules
Deprecated: This functionality is deprecated without replacement.
Helper for a resource to generate a unique identifier w/ default prefix
Deprecated: Copy this function to the provider codebase or use github.com/hashicorp/terraform-plugin-sdk/v2/helper/id.Unique.
UnitTest is a helper to force the acceptance testing harness to run in the normal unit test suite.
# Constants
Environment variable to enable acceptance tests using this package's ParallelTest and Test functions whose TestCase does not enable the IsUnitTest field.
Environment variable with hostname for the provider under acceptance test.
Environment variable with namespace for the provider under acceptance test.
Deprecated: Use EnvTfAcc instead.
UniqueIdPrefix is a string prefix automatically added to return values of the UniqueId function.
UniqueIDSuffixLength is the string length of the suffix generated by PrefixedUniqueId.
# Structs
AdditionalCLIOptions allows an intentionally limited set of options to be passed to the Terraform CLI when executing test steps.
ApplyOptions represents options to be passed to the `terraform apply` command.
ConfigPlanChecks defines the different points in a Config TestStep when plan checks can be run.
ExternalProvider holds information about third-party providers that should be downloaded by Terraform as part of running the test step.
NotFoundError represents when a StateRefreshFunc returns a nil result during a StateChangeConf waiter method and that StateChangeConf is configured for specific targets.
PlanOptions represents options to be passed to the `terraform plan` command.
RefreshPlanChecks defines the different points in a Refresh TestStep when plan checks can be run.
RetryError is the required return type of RetryFunc.
StateChangeConf is the configuration struct used for `WaitForState`.
No description provided by the author
TestCase is a single acceptance test case used to test the apply/destroy lifecycle of a resource in a specific configuration.
TestStep is a single apply sequence of a test, done within the context of a state.
TimeoutError is returned when WaitForState times out
Deprecated: Copy this type to the provider codebase or use github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry.TimeoutError.
UnexpectedStateError is returned when Refresh returns a state that's neither in Target nor Pending
Deprecated: Copy this type to the provider codebase or use github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry.UnexpectedStateError.
# Type aliases
CheckResourceAttrWithFunc is the callback type used to apply a custom checking logic when using TestCheckResourceAttrWith and a value is found for the given name and key.
ErrorCheckFunc is a function providers can use to handle errors.
ImportStateCheckFunc is the check function for ImportState tests.
ImportStateIdFunc is an ID generation function to help with complex ID generation for ImportState tests.
RetryFunc is the function retried until it succeeds.
StateRefreshFunc is a function type used for StateChangeConf that is responsible for refreshing the item being watched for a state change.
SweeperFunc is a signature for a function that acts as a sweeper.
TestCheckFunc is the callback type used with acceptance tests to check the state of a resource.