diff --git a/website/README.md b/website/README.md index 21976cb0a..4b67a363f 100644 --- a/website/README.md +++ b/website/README.md @@ -1,5 +1,8 @@ # Terraform Documentation +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + This directory contains the portions of [the Terraform website][terraform.io] that pertain to the Terraform Plugin Testing. The files in this directory are intended to be used in conjunction with diff --git a/website/docs/plugin/testing/acceptance-tests/configuration.mdx b/website/docs/plugin/testing/acceptance-tests/configuration.mdx index f18c2a940..c0e821908 100644 --- a/website/docs/plugin/testing/acceptance-tests/configuration.mdx +++ b/website/docs/plugin/testing/acceptance-tests/configuration.mdx @@ -5,6 +5,9 @@ description: >- in conjunction with Terraform configuration. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Terraform Configuration The configuration used during the execution of an acceptance test can be specified at the [TestStep](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/helper/resource#TestStep) level by populating one of the following mutually exclusive fields: diff --git a/website/docs/plugin/testing/acceptance-tests/ephemeral-resources.mdx b/website/docs/plugin/testing/acceptance-tests/ephemeral-resources.mdx index 36c6fea29..db5d04bd4 100644 --- a/website/docs/plugin/testing/acceptance-tests/ephemeral-resources.mdx +++ b/website/docs/plugin/testing/acceptance-tests/ephemeral-resources.mdx @@ -4,6 +4,9 @@ description: >- Guidance on how to test ephemeral resources and data. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + Ephemeral resource support is in technical preview and offered without compatibility promises until Terraform 1.10 is generally available. diff --git a/website/docs/plugin/testing/acceptance-tests/index.mdx b/website/docs/plugin/testing/acceptance-tests/index.mdx index 4703a1f51..ebc038120 100644 --- a/website/docs/plugin/testing/acceptance-tests/index.mdx +++ b/website/docs/plugin/testing/acceptance-tests/index.mdx @@ -5,6 +5,9 @@ description: |- imitate applying one or more configuration files. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Acceptance Tests In order to deliver on our promise to be safe and predictable, we need to be diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/bool.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/bool.mdx index a3f8be559..59572905f 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/bool.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/bool.mdx @@ -4,6 +4,9 @@ description: >- Bool Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Bool Known Value Checks The known value checks that are available for bool values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/custom.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/custom.mdx index ef92d4e80..b0423ccd2 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/custom.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/custom.mdx @@ -4,6 +4,9 @@ description: >- Custom Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Custom Known Value Checks Custom known value checks can be created by implementing the [knownvalue.Check](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/knownvalue#Check) interface. diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/float32.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/float32.mdx index 26f5a77fc..d9b73fc4d 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/float32.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/float32.mdx @@ -4,6 +4,9 @@ description: >- Float32 Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Float32 Known Value Checks The known value checks that are available for float32 values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/float64.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/float64.mdx index af7de4d29..94232fefa 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/float64.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/float64.mdx @@ -4,6 +4,9 @@ description: >- Float64 Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Float64 Known Value Checks The known value checks that are available for float64 values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/index.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/index.mdx index 569f6b5b6..a150822c0 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/index.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/index.mdx @@ -5,6 +5,9 @@ description: >- Known values define an expected type, and value for a resource attribute, or output value in a Terraform plan or state for use in Plan Checks or State Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Known Value Checks Known Value Checks are for use in conjunction with [Plan Checks](/terraform/plugin/testing/acceptance-tests/plan-checks), and [State Checks](/terraform/plugin/testing/acceptance-tests/state-checks) which leverage the [terraform-json](https://pkg.go.dev/github.com/hashicorp/terraform-json) representation of a Terraform plan. diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/int32.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/int32.mdx index 69f1bd7ab..8b7452530 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/int32.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/int32.mdx @@ -4,6 +4,9 @@ description: >- Int32 Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Int32 Known Value Checks The known value checks that are available for int32 values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/int64.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/int64.mdx index 55cc46192..21bf94ec3 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/int64.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/int64.mdx @@ -4,6 +4,9 @@ description: >- Int64 Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Int64 Known Value Checks The known value checks that are available for int64 values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/list.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/list.mdx index 92963b91e..ce252c16d 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/list.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/list.mdx @@ -4,6 +4,9 @@ description: >- List Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # List Known Value Checks The known value checks that are available for list values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/map.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/map.mdx index 9685249c4..5a4820ab3 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/map.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/map.mdx @@ -4,6 +4,9 @@ description: >- Map Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Map Known Value Checks The known value checks that are available for map values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/not-null.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/not-null.mdx index b6e39030f..25c60cde0 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/not-null.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/not-null.mdx @@ -4,6 +4,9 @@ description: >- NotNull Value Checks for use with Plan Checks or State Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # NotNull Known Value Checks The known value checks that are available for values that are not null are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/null.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/null.mdx index 8cd4bee00..0504034aa 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/null.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/null.mdx @@ -4,6 +4,9 @@ description: >- Null Value Checks for use with Plan Checks or State Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Null Known Value Checks The known value checks that are available for null values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/number.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/number.mdx index fa4b6dcbb..79bd7c6a0 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/number.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/number.mdx @@ -4,6 +4,9 @@ description: >- Number Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Number Known Value Checks The known value checks that are available for number values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/object.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/object.mdx index 68569dcde..11cc0934a 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/object.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/object.mdx @@ -4,6 +4,9 @@ description: >- Object Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Object Known Value Checks The known value checks that are available for object values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/set.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/set.mdx index 48d906926..55f1919d0 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/set.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/set.mdx @@ -4,6 +4,9 @@ description: >- Set Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Set Known Value Checks The known value checks that are available for set values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/string.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/string.mdx index ce92df3cd..4dc2951d7 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/string.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/string.mdx @@ -4,6 +4,9 @@ description: >- String Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # String Known Value Checks The known value checks that are available for string values are: diff --git a/website/docs/plugin/testing/acceptance-tests/known-value-checks/tuple.mdx b/website/docs/plugin/testing/acceptance-tests/known-value-checks/tuple.mdx index 95129a23a..b353bcc0f 100644 --- a/website/docs/plugin/testing/acceptance-tests/known-value-checks/tuple.mdx +++ b/website/docs/plugin/testing/acceptance-tests/known-value-checks/tuple.mdx @@ -4,6 +4,9 @@ description: >- Tuple Value Checks for use with Plan Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Tuple Known Value Checks diff --git a/website/docs/plugin/testing/acceptance-tests/plan-checks/custom.mdx b/website/docs/plugin/testing/acceptance-tests/plan-checks/custom.mdx index 5e3672a51..a4e6a889d 100644 --- a/website/docs/plugin/testing/acceptance-tests/plan-checks/custom.mdx +++ b/website/docs/plugin/testing/acceptance-tests/plan-checks/custom.mdx @@ -4,6 +4,9 @@ description: >- Plan Checks are test assertions that can inspect a plan at different phases in a TestStep. Custom Plan Checks can be implemented. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Custom Plan Checks The package [`plancheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck) also provides the [`PlanCheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck#PlanCheck) interface, which can be implemented for a custom plan check. diff --git a/website/docs/plugin/testing/acceptance-tests/plan-checks/index.mdx b/website/docs/plugin/testing/acceptance-tests/plan-checks/index.mdx index 9c1960b54..cff623441 100644 --- a/website/docs/plugin/testing/acceptance-tests/plan-checks/index.mdx +++ b/website/docs/plugin/testing/acceptance-tests/plan-checks/index.mdx @@ -5,6 +5,9 @@ description: >- provides built-in Plan Checks for common use-cases, and custom Plan Checks can also be implemented. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Plan Checks During the **Lifecycle (config)** and **Refresh** [modes](/terraform/plugin/testing/acceptance-tests/teststep#test-modes) of a `TestStep`, the testing framework will run `terraform plan` before and after certain operations. For example, the **Lifecycle (config)** mode will run a plan before the `terraform apply` phase, as well as a plan before and after the `terraform refresh` phase. diff --git a/website/docs/plugin/testing/acceptance-tests/plan-checks/output.mdx b/website/docs/plugin/testing/acceptance-tests/plan-checks/output.mdx index 3f0b97bf7..e390b5d85 100644 --- a/website/docs/plugin/testing/acceptance-tests/plan-checks/output.mdx +++ b/website/docs/plugin/testing/acceptance-tests/plan-checks/output.mdx @@ -5,6 +5,9 @@ description: >- provides built-in Output Value Plan Checks for common use-cases. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Output Plan Checks The `terraform-plugin-testing` module provides a package [`plancheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck) with built-in output value plan checks for common use-cases: diff --git a/website/docs/plugin/testing/acceptance-tests/plan-checks/resource.mdx b/website/docs/plugin/testing/acceptance-tests/plan-checks/resource.mdx index b96ae68bb..1172ce855 100644 --- a/website/docs/plugin/testing/acceptance-tests/plan-checks/resource.mdx +++ b/website/docs/plugin/testing/acceptance-tests/plan-checks/resource.mdx @@ -5,6 +5,9 @@ description: >- provides built-in Managed Resource and Data Source Plan Checks for common use-cases. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Resource Plan Checks The `terraform-plugin-testing` module provides a package [`plancheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/plancheck) with built-in managed resource, and data source plan checks for common use-cases: diff --git a/website/docs/plugin/testing/acceptance-tests/state-checks/custom.mdx b/website/docs/plugin/testing/acceptance-tests/state-checks/custom.mdx index 46cd3877e..7c0751c46 100644 --- a/website/docs/plugin/testing/acceptance-tests/state-checks/custom.mdx +++ b/website/docs/plugin/testing/acceptance-tests/state-checks/custom.mdx @@ -4,6 +4,9 @@ description: >- State Checks are test assertions that can inspect state during a TestStep. Custom State Checks can be implemented. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Custom State Checks The package [`statecheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/statecheck) also provides the [`StateCheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/statecheck#StateCheck) interface, which can be implemented for a custom state check. diff --git a/website/docs/plugin/testing/acceptance-tests/state-checks/index.mdx b/website/docs/plugin/testing/acceptance-tests/state-checks/index.mdx index 36304e388..d8efb3d6a 100644 --- a/website/docs/plugin/testing/acceptance-tests/state-checks/index.mdx +++ b/website/docs/plugin/testing/acceptance-tests/state-checks/index.mdx @@ -5,6 +5,9 @@ description: >- provides built-in State Checks for common use-cases, and custom State Checks can also be implemented. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # State Checks During the **Lifecycle (config)** [mode](/terraform/plugin/testing/acceptance-tests/teststep#test-modes) of a `TestStep`, the testing framework will run `terraform apply`. diff --git a/website/docs/plugin/testing/acceptance-tests/state-checks/output.mdx b/website/docs/plugin/testing/acceptance-tests/state-checks/output.mdx index 434e7486b..b27149373 100644 --- a/website/docs/plugin/testing/acceptance-tests/state-checks/output.mdx +++ b/website/docs/plugin/testing/acceptance-tests/state-checks/output.mdx @@ -5,6 +5,9 @@ description: >- provides built-in Output Value State Checks for common use-cases. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Output State Checks The `terraform-plugin-testing` module provides a package [`statecheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/statecheck) with built-in output value state checks for common use-cases: diff --git a/website/docs/plugin/testing/acceptance-tests/state-checks/resource.mdx b/website/docs/plugin/testing/acceptance-tests/state-checks/resource.mdx index d11db8f63..5d88681c0 100644 --- a/website/docs/plugin/testing/acceptance-tests/state-checks/resource.mdx +++ b/website/docs/plugin/testing/acceptance-tests/state-checks/resource.mdx @@ -5,6 +5,9 @@ description: >- provides built-in Managed Resource and Data Source State Checks for common use-cases. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Resource State Checks The `terraform-plugin-testing` module provides a package [`statecheck`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/statecheck) with built-in managed resource, and data source state checks for common use-cases: diff --git a/website/docs/plugin/testing/acceptance-tests/sweepers.mdx b/website/docs/plugin/testing/acceptance-tests/sweepers.mdx index 2fff9834f..ef0953cf5 100644 --- a/website/docs/plugin/testing/acceptance-tests/sweepers.mdx +++ b/website/docs/plugin/testing/acceptance-tests/sweepers.mdx @@ -5,6 +5,9 @@ description: >- testing framework. Sweepers clean up leftover infrastructure. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Sweepers Acceptance tests in Terraform provision and verify real infrastructure using [Terraform's testing framework](/terraform/plugin/testing/acceptance-tests). Ideally all infrastructure created is then destroyed within the lifecycle of a test, however the reality is that there are several situations that can arise where resources created during a test are “leaked”. Leaked test resources are resources created by Terraform during a test, but Terraform either failed to destroy them as part of the test, or the test falsely reported all resources were destroyed after completing the test. Common causes are intermittent errors or failures in vendor APIs, or developer error in the resource code or test. diff --git a/website/docs/plugin/testing/acceptance-tests/testcase.mdx b/website/docs/plugin/testing/acceptance-tests/testcase.mdx index 77ba53078..9e90849cd 100644 --- a/website/docs/plugin/testing/acceptance-tests/testcase.mdx +++ b/website/docs/plugin/testing/acceptance-tests/testcase.mdx @@ -5,6 +5,9 @@ description: |- creates a set of resources then verifies the new infrastructure. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Acceptance Tests: TestCases Acceptance tests are expressed in terms of **Test Cases**, each using one or diff --git a/website/docs/plugin/testing/acceptance-tests/teststep.mdx b/website/docs/plugin/testing/acceptance-tests/teststep.mdx index 01e791999..3d08b81c4 100644 --- a/website/docs/plugin/testing/acceptance-tests/teststep.mdx +++ b/website/docs/plugin/testing/acceptance-tests/teststep.mdx @@ -5,6 +5,9 @@ description: |- file to a given state. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Acceptance Tests: TestSteps `TestStep`s represent the application of an actual Terraform configuration file diff --git a/website/docs/plugin/testing/acceptance-tests/tfjson-paths.mdx b/website/docs/plugin/testing/acceptance-tests/tfjson-paths.mdx index a40e90f52..92302e040 100644 --- a/website/docs/plugin/testing/acceptance-tests/tfjson-paths.mdx +++ b/website/docs/plugin/testing/acceptance-tests/tfjson-paths.mdx @@ -5,6 +5,9 @@ description: >- Attribute paths represent the location of an attribute within Terraform JSON data. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Terraform JSON Paths An exact location within Terraform JSON data is referred to as a Terraform JSON or tfjson path. diff --git a/website/docs/plugin/testing/acceptance-tests/tfversion-checks.mdx b/website/docs/plugin/testing/acceptance-tests/tfversion-checks.mdx index 3c8efd4f0..7fda56cf4 100644 --- a/website/docs/plugin/testing/acceptance-tests/tfversion-checks.mdx +++ b/website/docs/plugin/testing/acceptance-tests/tfversion-checks.mdx @@ -5,6 +5,9 @@ description: >- provides built-in Version Checks for common use-cases, but custom Version Checks can also be implemented. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Terraform Version Checks **Terraform Version Checks** are generic checks defined at the TestCase level that check logic against the Terraform CLI version. The checks are executed at the beginning of the TestCase before any TestStep is executed. diff --git a/website/docs/plugin/testing/acceptance-tests/value-comparers/index.mdx b/website/docs/plugin/testing/acceptance-tests/value-comparers/index.mdx index 3ef5e19d6..99d640927 100644 --- a/website/docs/plugin/testing/acceptance-tests/value-comparers/index.mdx +++ b/website/docs/plugin/testing/acceptance-tests/value-comparers/index.mdx @@ -5,6 +5,9 @@ description: >- Value comparers define a comparison for a resource attribute, or output value for use in State Checks. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Value Comparers diff --git a/website/docs/plugin/testing/index.mdx b/website/docs/plugin/testing/index.mdx index d994c3ad7..6e6a86383 100644 --- a/website/docs/plugin/testing/index.mdx +++ b/website/docs/plugin/testing/index.mdx @@ -5,6 +5,9 @@ description: |- plugins. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Testing Terraform Plugins Here we cover information needed to write successful tests for Terraform diff --git a/website/docs/plugin/testing/migrating.mdx b/website/docs/plugin/testing/migrating.mdx index 51de60610..f4a9c75e5 100644 --- a/website/docs/plugin/testing/migrating.mdx +++ b/website/docs/plugin/testing/migrating.mdx @@ -4,6 +4,9 @@ description: >- Migrate your provider's acceptance testing dependencies from SDKv2 to the testing module. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Overview This guide helps you migrate a Terraform provider's acceptance testing dependencies from SDKv2 to the plugin testing module. We recommend migrating to terraform-plugin-testing to take advantage of new features of the testing module and to avoid importing the SDKv2 for providers that are built on the plugin Framework. diff --git a/website/docs/plugin/testing/testing-patterns.mdx b/website/docs/plugin/testing/testing-patterns.mdx index 662e51d4c..93c80c11b 100644 --- a/website/docs/plugin/testing/testing-patterns.mdx +++ b/website/docs/plugin/testing/testing-patterns.mdx @@ -5,6 +5,9 @@ description: |- Terraform resources. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Testing Patterns In [Testing Terraform Plugins][1] we introduce Terraform's Testing Framework, diff --git a/website/docs/plugin/testing/unit-testing.mdx b/website/docs/plugin/testing/unit-testing.mdx index c8b8690c1..a85130071 100644 --- a/website/docs/plugin/testing/unit-testing.mdx +++ b/website/docs/plugin/testing/unit-testing.mdx @@ -5,6 +5,9 @@ description: |- flatten API responses into data structures that Terraform stores as state. --- +> [!IMPORTANT] +> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com. + # Unit Testing Testing plugin code in small, isolated units is distinct from Acceptance Tests,