Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

provider-ephemeral-resources

Skill by hashicorp

Guides AI assistants in implementing Terraform provider ephemeral resources with the Plugin Framework. It covers the Open, Renew and Close lifecycle, schema design, registration and testing. Aimed at provider developers who handle secrets and short-lived credentials.

  • Score 79
  • 942 stars
  • MPL-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install provider-ephemeral-resources

Built from the published package, never by AI.

git clone --depth 1 https://github.com/hashicorp/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/plugins/terraform/skills/provider-ephemeral-resources ~/.claude/skills/provider-ephemeral-resources

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install provider-ephemeral-resources in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill is a reference for building ephemeral resources in a Terraform provider using the Plugin Framework. It explains when an ephemeral resource fits better than a data source, and how the Open, Renew and Close methods handle a value that must never be stored in state or plan. It includes a Go example for a token resource, with a lease ID passed between methods through resp.Private and a RenewAt time set with a safety margin.

The skill also covers registration through EphemeralResources and the EphemeralResourceData setting in the provider's Configure method. It lists design rules, such as never logging the value and skipping Close when revocation is not possible. It points to testing with the echoprovider and to tfplugindocs for documentation. It is written for provider developers working on secrets, tokens, certificates and other short-lived credentials.

Written from the project's SKILL.md and checked against it.

What it can do

  • Open lifecycle methodFetches or creates the ephemeral value and sets its renewal time.
  • Renew lifecycle methodExtends or refreshes the value produced by Open when it is close to expiring.
  • Close lifecycle methodRevokes leases or deletes temporary credentials when Terraform is done with the value.
  • Ephemeral schema designShows how to mark secret attributes as sensitive and expose the API's own identifiers.
  • RegistrationExplains opting in through ProviderWithEphemeralResources and setting EphemeralResourceData in Configure.
  • Write-only and provider config flowDescribes how ephemeral values can feed provider configuration and write-only attributes.
  • Testing guidanceCovers echoprovider acceptance tests and version gating to Terraform 1.10 or later.
  • Documentation guidancePoints to tfplugindocs pages that explain lifetime, renewal and revocation behavior.

What you need

  • Terraform 1.10 or later
  • A Terraform provider built with the Plugin Framework
  • Go, as used in the code examples

Try asking

  • Add an ephemeral resource that issues a short-lived token for a role
  • Show me how to renew an expiring credential in my Terraform provider
  • Should this secret be a data source or an ephemeral resource?

Good to know

  • Renew cannot return a new result. It can only extend or refresh what Open produced.
  • Ephemeral results cannot be used in regular attributes because those persist to state.
  • Terraform renews lazily, not on a precise timer, so a safety margin is needed.
  • Close should be skipped if the upstream value cannot be revoked.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: plugins/terraform/skills/provider-ephemeral-resources/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB

Alternatives to provider-ephemeral-resources

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

provider-ephemeral-resources: common questions

What is an ephemeral resource in Terraform?

According to the source, an ephemeral resource produces values that are never persisted to state or plan. It is meant for secrets such as tokens, generated passwords and short-lived certificates.

When should I use Renew in an ephemeral resource?

The source says Renew is for credentials that expire while Terraform is still running, such as STS-style tokens or short-TTL leases. It is optional and only needed where the API supports it.

How do I test an ephemeral resource?

The source says tests echo the ephemeral value through the echoprovider into a regular resource that the test can inspect. Tests should be gated to Terraform 1.10 or later.

How do I install provider-ephemeral-resources?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is provider-ephemeral-resources free?

The code is published under the MPL-2.0 licence. The service it connects to may have its own pricing.

Is provider-ephemeral-resources safe to use?

It scores 79 of 100. Grades: maintenance B, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to provider-ephemeral-resources?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

provider-ephemeral-resources Install

Add to stack

Loading.