What problem does it solve?
Terraform providers often mishandle credential resolution, forcing users to hardcode secrets in configuration or producing confusing "no valid credentials" errors. This Skill guides you through implementing a production-grade authentication layer: an Optional/Sensitive provider schema, an ordered credential provider chain, and diagnostics that tell users exactly what was tried.
Core Features & Use Cases
- Credential Provider Chain: Resolve credentials in canonical order — static config, environment variables, shared credentials file, platform identity — with a sentinel error distinguishing "nothing supplied" from "misconfigured source".
- Configure-Time Validation: Guard against unknown values, resolve credentials eagerly in Configure(), and optionally verify them with an identity endpoint so failures surface at plan time.
- Secret Hygiene & Diagnostics: Redact secrets via String()/GoString(), warn on world-readable credentials files, and emit errors naming every source tried plus a docs URL.
- Use Case: You are building a Terraform provider for a cloud API and need users to authenticate via provider block, environment variables, or a shared credentials file with named profiles — with unit tests covering precedence, fall-through, and redaction.
Quick Start
Implement the Configure method and credential chain for my Terraform provider so it resolves API credentials from config, environment variables, and a shared credentials file.