Registry / testing / hashicorp-terraform-plugin-testing

hashicorp-terraform-plugin-testing

JSON →
library1.16.0gogounverified

Testing utilities for Terraform providers, including acceptance testing helpers and mock infrastructure.

go get github.com/hashicorp/terraform-plugin-testing
INSTALL
IMPORT
SIG · HASHICORP-TERRAFOR
H
hashicorp-terraform-plugin-testing
testinggov1.16.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

testing
github.com/hashicorp/terraform-plugin-testing

Basic acceptance test for a Terraform resource.

package provider import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) func TestAccExampleResource(t *testing.T) { resource.Test(t, resource.TestCase{ Providers: testAccProviders, Steps: []resource.TestStep{ { Config: `resource "example_resource" "test" {}`, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("example_resource.test", "id", "123"), ), }, }, }) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.16.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
hashicorp-terraform-plugin-testing — go get hashicorp-terraform-plugin-testing · libregistry