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.

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/hashicorp/agent-skills --skill new-terraform-provider

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

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).

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
hashicorp
Oficjalne

terraform-style-guide

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

Instalacje / 1h
2
GitHub Stars
936
Aktualizacja
4 lis
hashicorp
Oficjalne

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.

Instalacje / 1h
2
GitHub Stars
936
Aktualizacja
4 lis
hashicorp
Oficjalne

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.

Instalacje / 1h
1
GitHub Stars
922
Aktualizacja
4 lis
hashicorp
Oficjalne

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

Instalacje / 1h
1
GitHub Stars
922
Aktualizacja
4 lis