Registry /
testing / hashicorp-terraform-plugin-testing
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.