hashicorp/agent-skills

new-terraform-provider

Use this when scaffolding a new Terraform provider with the Plugin Framework: workspace layout, go module setup, provider server main.go, and a provider.go with schema and Configure.

Ver código-fonte

Como usar

  1. Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
  2. Consulte no original as ferramentas, credenciais e ambientes necessários.
  3. Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/hashicorp/agent-skills --skill new-terraform-provider

Antes de começar

  • A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
  • Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

To scaffold a new Terraform provider with Plugin Framework:

  1. If I am already in a Terraform provider workspace, then confirm that I want

to create a new workspace. If I do not want to create a new workspace, then skip all remaining steps.

  1. Create a new workspace root directory. The root directory name should be

prefixed with "terraform-provider-". Perform all subsequent steps in this new workspace.

  1. Initialize a new Go module.
  2. Run go get -u github.com/hashicorp/terraform-plugin-framework@latest.
  3. Write a main.go file that follows the example.
  4. Write an internal/provider/provider.go file that follows

the example. Rename the demo provider, the DEMO_* environment variables, and the authentication attributes to match the target API.

  1. Remove TODO comments from main.go and provider.go.
  2. Run go mod tidy
  3. Run go build -o /dev/null
  4. Run go test ./...

The scaffold resolves credentials as explicit config with environment variable fallback. To grow that into a full credential provider chain (shared credentials files, profiles, platform identity, configure-time validation), use the provider-configuration skill (if available). To add the first resource or data source, use the provider-resources skill (if available).

do mesmo repositório

Mais Skills

Todos os Skills
hashicorp
Oficial

terraform-style-guide

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

Instalações / 1h
2
GitHub Stars
936
Atualizado
4 de nov.
hashicorp
Oficial

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.

Instalações / 1h
2
GitHub Stars
936
Atualizado
4 de nov.
hashicorp
Oficial

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, actions, or guides; when validating generated docs; and when troubleshooting missing or incorrect Registry documentation.

Instalações / 1h
1
GitHub Stars
922
Atualizado
4 de nov.
hashicorp
Oficial

provider-resources

Implement Terraform Provider resources and data sources using the Plugin Framework: CRUD operations, schema design, plan modifiers and validators, not-found handling, waiters for eventually consistent APIs, import support, resource design principles, and required acceptance test coverage. Use when adding or changing a resource or data source, deciding whether an API concept should be a resource, wiring a resource to the provider's configured client, handling drift or resource-not-found, or revie

Instalações / 1h
1
GitHub Stars
922
Atualizado
4 de nov.