Skip to content

new-terraform-provider: add provider.go scaffold with Configure and auth guidance - #81

Open
AdamTylerLynch wants to merge 1 commit into
hashicorp:mainfrom
AdamTylerLynch:feat/new-terraform-provider-configure-scaffold
Open

new-terraform-provider: add provider.go scaffold with Configure and auth guidance#81
AdamTylerLynch wants to merge 1 commit into
hashicorp:mainfrom
AdamTylerLynch:feat/new-terraform-provider-configure-scaffold

Conversation

@AdamTylerLynch

Copy link
Copy Markdown
Contributor

The scaffolding skill stopped at main.go — which imports internal/provider and
calls provider.New(version), a package the skill never helped create. This adds the
missing half.

Changes

  • New assets/provider.go: provider struct and New(version) factory; Metadata;
    Schema with endpoint (Optional) and api_key (Optional + Sensitive,
    description naming the DEMO_API_KEY env fallback); Configure with unknown-value
    guards, env-var fallback, and actionable missing-value diagnostics naming both the
    attribute and its env var; empty Resources/DataSources registries — all with
    TODO comments in the same style as the existing assets/main.go
  • SKILL.md gains the provider.go step and a sharper trigger description, and closes
    with soft pointers to the provider-configuration skill (growing the env fallback
    into a full credential provider chain) and provider-resources (first resource)

Verification: followed the skill's own steps in a scratch module —
go mod initgo get terraform-plugin-frameworkgo mod tidy
go build -o /dev/nullgo vetgo test ./... — all pass with the two assets
as written. scripts/validate-structure.sh passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant