feat: add provider-configuration skill for provider auth and credential chains - #78
Open
AdamTylerLynch wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
provider-configurationskill toterraform-provider-development, fillingthe plugin's largest gap: nothing currently covers a provider's
Configure()method,provider schema for authentication, or credential resolution — the first thing every
provider author has to build and the first thing every provider user hits.
What the skill teaches
Optional(neverRequired, so envfallback works), secrets
Sensitive: true, descriptions naming the env-var fallbackProviderinterface, asentinel
ErrNoCredentialsdistinguishing "nothing to offer, fall through" from"source misconfigured, surface it", and an aggregate
ChainErrorthat lists everysource tried — with canonical precedence static config > environment variables >
shared credentials file (profiles) > platform identity
while resolving non-secret settings field-by-field
Configure(), secret redaction viaString()/GoString(),credentials-file permission warnings, and eager configure-time validation with a
skip_credentials_validationescape hatcht.TempDir()fixtures)Files
skills/provider-configuration/SKILL.md(317 lines)skills/provider-configuration/references/credential-chain.md— a complete,self-contained implementation for a fictional
examplecloudproviderskills/provider-configuration/references/case-studies.md— thehashicorp/aws-sdk-go-basechain (static short-circuit → SDK default chain →web-identity override → assume-role wrapping,
NoValidCredentialSourcesError,GetCallerIdentityvalidation) and a generalized small-provider hand-rolled designterraform/README.md,AGENTS.md,CHANGELOG.mdVerification
references/credential-chain.mdwere extracted into a scratchmodule:
go build ./...,go vet ./..., andgo test ./...all pass (precedence,aggregation, hard-error, and redaction tests included)
scripts/validate-structure.shpasses