hashicorp/provider-test-patterns

Patrones de pruebas de aceptación para proveedores Terraform usando terraform-plugin-testing con el Plugin Framework. Cubre estructura de pruebas, campos TestCase/TestStep, ConfigStateChecks con implementaciones personalizadas de statecheck.StateCheck, comprobaciones de plan, CompareValue para aserciones entre pasos, asistentes de configuración, pruebas de importación con ImportStateKind, sweepers y patrones de escenario (básico, actualización, desaparición, validación, regresión), así como pruebas de recursos efímeros con el paquete echoprovider. Úselo al escribir, revisar o depurar pruebas de aceptación de proveedores, incluyendo preguntas sobre statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, verificación de estado de importación, recursos efímeros o cómo estructurar archivos de prueba.

¿Qué es provider-test-patterns?

Esta habilidad proporciona una guía completa de patrones y prácticas recomendadas para escribir pruebas de aceptación de proveedores Terraform utilizando el marco `terraform-plugin-testing` y el Plugin Framework. Es útil para desarrolladores de proveedores Terraform que necesitan estructurar, depurar o revisar pruebas de aceptación de manera eficiente. La habilidad cubre desde la estructura básica de pruebas (TestCase/TestStep) hasta técnicas avanzadas como `ConfigStateChecks` con implementaciones personalizadas de `statecheck.StateCheck`, comprobaciones de plan con `plancheck`, aserciones entre pasos con `CompareValue`, y pruebas de importación con `ImportStateKind`. También incluye patrones de escenarios comunes (básico, actualización, desaparición, validación y regresión), soporte para sweepers y pruebas de recursos efímeros mediante el paquete `echoprovider`. Está diseñada para ser utilizada como referencia al escribir, revisar o depurar pruebas de aceptación, respondiendo preguntas específicas sobre statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, verificación de estado de importación, recursos efímeros y estructura de archivos de prueba.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/hashicorp/agent-skills/tree/main/skills/provider-test-patterns

Installed? Explore more Productividad y colaboración skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

¿Qué hace provider-test-patterns?

Patrones de pruebas de aceptación para proveedores Terraform usando terraform-plugin-testing con el Plugin Framework. Cubre la estructura de pruebas, campos TestCase/TestStep, ConfigStateChecks con implementaciones personalizadas de statecheck.StateCheck, comprobaciones de plan, CompareValue para aserciones entre pasos, asistentes de configuración, pruebas de importación con ImportStateKind, sweepers y patrones de escenario (básico, actualización, desaparición, validación y regresión), así como pruebas de recursos efímeros con el paquete echoprovider. Úselo al escribir, revisar o depurar pruebas de aceptación de proveedores, incluyendo preguntas sobre statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, verificación de estado de importación, recursos efímeros o cómo estructurar archivos de prueba.

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

hashicorp/aws-ami-builder

Build Amazon Machine Images (AMIs) with Packer using the amazon-ebs builder. Use when creating custom AMIs for EC2 instances.

hashicorp/azure-image-builder

Build Azure managed images and Azure Compute Gallery images with Packer. Use when creating custom images for Azure VMs.

hashicorp/azure-verified-modules

Azure Verified Modules (AVM) requirements and best practices for developing certified Azure Terraform modules. Use when creating or reviewing Azure modules that need AVM certification.

hashicorp/new-terraform-provider

Use this when scaffolding a new Terraform provider.

hashicorp/provider-actions

Implement Terraform Provider actions using the Plugin Framework. Use when developing imperative operations that execute at lifecycle events (before/after create, update, destroy).

hashicorp/provider-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.

hashicorp/provider-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.

hashicorp/push-to-registry

Push Packer build metadata to HCP Packer registry for tracking and managing image lifecycle. Use when integrating Packer builds with HCP Packer for version control and governance.

hashicorp/refactor-module

Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.

hashicorp/run-acceptance-tests

Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`.

hashicorp/terraform-search-import

Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating to IaC.

hashicorp/terraform-stacks

Comprehensive guide for working with HashiCorp Terraform Stacks. Use when creating, modifying, or validating Terraform Stack configurations (.tfcomponent.hcl, .tfdeploy.hcl files), working with stack components and deployments from local modules, public registry, or private registry sources, managing multi-region or multi-environment infrastructure, or troubleshooting Terraform Stacks syntax and structure.

hashicorp/terraform-style-guide

Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.

hashicorp/terraform-test

Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.

hashicorp/windows-builder

Build Windows images with Packer using WinRM communicator and PowerShell provisioners. Use when creating Windows AMIs, Azure images, or VMware templates.

Skills relacionados