run-acceptance-tests
An acceptance test is a Go test function with the prefix TestAcc.
To run a focussed acceptance test named TestAccFeatureHappyPath:
-
Run
go test -run=TestAccFeatureHappyPathwith the following environment variables:TF_ACC=1
Default to non-verbose test output.
-
The acceptance tests may require additional environment variables for specific providers. If the test output indicates missing environment variables, then suggest how to set up these environment variables securely.
To diagnose a failing acceptance test, use these options, in order. These options are cumulative: each option includes all the options above it.
- Run the test again. Use the
-count=1option to ensure thatgo testdoes not use a cached result. - Offer verbose
go testoutput. Use the-voption.
More from hashicorp/terraform-agent-kit
terraform-style-guide
Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.
23provider-docs
Create, update, and review Terraform provider documentation for Terraform Registry using HashiCorp-recommended patterns, tfplugindocs templates, and schema descriptions. Use when adding or changing provider configuration, resources, data sources, ephemeral resources, list resources, functions, or guides; when validating generated docs; and when troubleshooting missing or incorrect Registry documentation.
14provider-resources
Implement Terraform Provider resources and data sources using the Plugin Framework. Use when developing CRUD operations, schema design, state management, and acceptance testing for provider resources.
14provider-actions
Implement Terraform Provider actions using the Plugin Framework. Use when developing imperative operations that execute at lifecycle events (before/after create, update, destroy).
12refactor-module
Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.
12new-terraform-provider
Use this when scaffolding a new Terraform provider.
12