Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESC Environments reference #14634

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Apr 1, 2025

These changes add a more complete reference section to the ESC documentation.

This reference content covers the contents of ESC environment definitions, including:

  • Document structure
  • Value reference syntax
  • Built-in functions
  • Built-in values
  • Providers
  • Rotators
  • Well-known properties
  • Sample environment definitions

Fixes #14289

@pgavlin pgavlin requested a review from a team as a code owner April 1, 2025 00:36
@pulumi-bot
Copy link
Collaborator

Copy link
Collaborator

@interurban interurban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor suggestions. thanks Pat!

@pulumi-bot
Copy link
Collaborator


## Properties

- [`environmentVariables`](/docs/esc/reference/well-known-properties/environment-variables)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about pulumiConfig?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulumiConfig is not interpreted by the esc CLI, so I opted to leave it out. It's also already documented in the Pulumi IaC integration reference. I don't feel super strongly about this one, though, so if folks think it should be in here I'll add it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be expected here, they may not have seen the Pulumi IaC reference. You also mentioned "other consumers" like IaC at the top of the file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be expected here, they may not have seen the Pulumi IaC reference.

SG. I'll add some headers to differentiate "always expected" vs. "only expected when integrating with tool x".

You also mentioned "other consumers" like IaC at the top of the file.

Yeah--what I was trying to communicate is that any consumer of an evaluated environment that deals with envvars, etc. should probably interpret these properties.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulumiConfig is not interpreted by the esc CLI, so I opted to leave it out. It's also already documented in the Pulumi IaC integration reference. I don't feel super strongly about this one, though, so if folks think it should be in here I'll add it.

I would mention it and say exactly that (in so many words) in the docs!

@pulumi-bot
Copy link
Collaborator

weight: 7
---

The [`esc` CLI](/docs/install/esc/) and other ESC consumers (e.g. the [`pulumi` CLI](/docs/install/)) conventially assign specific semantics to certain top-level properties of evaluated ESC environments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a slightly subtle point that may be worth elaborating on a bit further, since we're using "top-level properties" in two different slightly ways. We have top level document properties (imports/values) as described in the dedicated top-level-properties section, but here we're referring to top level properties of the evaluated environment, which are the properties under values. I know that's what you said, but it may be worth explicitly telling the user we're talking about top-level values here?

@jkodroff
Copy link
Member

jkodroff commented Apr 1, 2025

@pgavlin Might want to add:

Fixes #14289

Copy link
Contributor

@nyobe nyobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is really great, thank you for putting this together!

I think one useful addition might be a vocabulary/glossary page where we define some of the terms we use

weight: 6
---

The `fn::secret` built-in function decrypts a ciphertext literal into a secret string value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we define what secret means anywhere? maybe we need a vocabulary page?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, doesn't it encrypt it, not decrypt it?

weight: 6
---

ESC rotators allow users to rotate credentials and secrets using ESC. These providers are accessed via the `fn::rotate` built-in function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we mention they remain static until they are triggered by the rotate verb?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@@ -0,0 +1,30 @@
---
title: Environment Reference
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Environment is a very overloaded term, I wonder if calling this Environment Definition Reference might be clearer? It's kind of long though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest "ESC Syntax Reference" or "Environment Syntax Reference" (longer version), "Syntax Reference" for the doc tree since the context is clear

@@ -0,0 +1,18 @@
---
title: Well-Known Properties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that it's more technically correct, but I don't think "well-known" communicates the concept to a practitioner as well as "reserved" (which, if it's technically incorrect, I don't think we should use) or "special" (not very technical, but easy to conceptualize).

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

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.

ESC: Break out the Syntax Reference into individual pages
6 participants