Add fn::template and fn::eval ESC builtin function docs#18613
Add fn::template and fn::eval ESC builtin function docs#18613
Conversation
Documents the new late-binding feature that allows defining reusable template expressions in one environment and evaluating them with different values in consumer environments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Docs review — #18613Thanks for the new Issues1. Incorrect separator in implicit-import reference (fn-eval.md, line 25) The parameters table shows Suggested fix: 2. Hyphenated key in interpolation path (fn-template.md, lines 73 and 85) The second example defines 3. Minor: the body text (line 13) correctly describes evaluation happening in the calling environment, but the Nits (non-blocking)
Verified
Mention |
|
Your site preview for commit b78fab7 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-18613-b78fab7d.s3-website.us-west-2.amazonaws.com |
Replace slash with dot in the environment reference example to match
ESC implicit-import syntax (${environments.PROJECT.ENV.VALUEPATH}).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CamSoper
left a comment
There was a problem hiding this comment.
Docs look great — the examples match the late-binding test fixture on pulumi/esc@claire/defns byte-for-byte, and the narrative around late binding is clear.
I pushed one small fix: fn-eval.md had ${environments.org/defn.my-template} in the parameter description, which should be ${environments.org.defn.my-template} to match the implicit-import syntax documented in content/docs/esc/environments/imports.md and used by your other examples in the same file.
One thing worth double-checking before merge: the implementation is still on the claire/defns feature branch on pulumi/esc (HEAD is a WIP commit from Feb 2025, not merged to main). Are these functions shipping in an upcoming ESC release that lines up with these docs going live? If there's any gap, we may want a preview/experimental callout or to hold the merge until the ESC PR lands.
|
@tehsis Merging, LMK if more work needs to be done. |
Summary
fn::templateandfn::evalfn::templatedefines a template expression with deferred interpolationfn::evalevaluates a template in the context of the calling environment, enabling late binding across environmentsFeature dependency
Must be merged after pulumi/esc#638
🤖 Generated with Claude Code