You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing an object value to the program, e.g. to be retrieved at runtime with RequireObject.
Setting the value of a specific path into a merged configuration.
The value would assumedly come from any of the supported sources, mainly:
a literal YAML-encoded (or JSON-encoded) string
a Secret with a key containing a YAML-encoded string
Ideally this feature would be orthogonal to whether or not the value is Pulumi secret.
There may be need for a new configuration block to allow for non-secret structured configuration. Note that secretsRef defines Pulumi secrets from a secret or from a literal value, while non-secrets are simply typed as map[string]string.
Note that the Automation API recently added support for structured configuration: pulumi/pulumi#12265
Config values are currently typed as string as opposed to apiextensionsv1.JSON. If we were to change the API to use JSON, then the values would be interpreted as JSON values (e.g. true would become a bool). Is that an acceptable (breaking) change? Or should a jsonValue field be introduced? Or should literals be string-encoded? Note that Program.spec.configuration.default is a JSON value (not encoded).
Should the API types use json.RawMessage rather than apiextensionsv1.JSON? See Grafana and Tanzu for examples.
The text was updated successfully, but these errors were encountered:
Hello!
Issue details
Add support for structured configuration to be passed to the Pulumi program. The use cases are:
RequireObject
.The value would assumedly come from any of the supported sources, mainly:
Secret
with a key containing a YAML-encoded stringIdeally this feature would be orthogonal to whether or not the value is Pulumi secret.
There may be need for a new configuration block to allow for non-secret structured configuration. Note that
secretsRef
defines Pulumi secrets from a secret or from a literal value, while non-secrets are simply typed asmap[string]string
.Note that the Automation API recently added support for structured configuration: pulumi/pulumi#12265
Examples
Some examples for illustration purposes.
These examples assume the following program:
And intend to generate the following stack configuration:
Using a YAML value from a Kubernetes
Secret
as a Pulumi secret:Using an inline YAML value as a Pulumi secret:
Using inline YAML as a non-secret (via a hypothetical
config2
block):Open Questions
string
as opposed toapiextensionsv1.JSON
. If we were to change the API to useJSON
, then the values would be interpreted as JSON values (e.g.true
would become a bool). Is that an acceptable (breaking) change? Or should ajsonValue
field be introduced? Or should literals be string-encoded? Note thatProgram.spec.configuration.default
is a JSON value (not encoded).json.RawMessage
rather thanapiextensionsv1.JSON
? See Grafana and Tanzu for examples.The text was updated successfully, but these errors were encountered: