pulumi/sdk/go/common
Will Jones 1515db22f1 Support `pulumi.Config` in dynamic providers
As well as responding to `Configure` gRPC calls, a resource provider
binary can also accept configuration from the engine via the
`PULUMI_CONFIG` environment variable. Presently, the engine will only
send configuration namespaced to the provider in question, and will
strip namespaces when doing so. So, given an example host configuration
of:

```
config:
  aws:region: eu-west-1
  foo:bar: baz
```

an `aws` provider will be provided with
`PULUMI_CONFIG='{"region":"eu-west-1"}'`, whereas a `gcp` provider will
receive `PULUMI_CONFIG='{}'`, matching neither `aws:region` nor
`foo:bar`.

This is problematic for dynamic providers, since they are authored in
and typically considered part of the user's program, and not as a
separate entity. Consequently it is not unreasonable for a dynamic
provider author to expect to have access to the entirety of the Pulumi
configuration through e.g. `pulumi.Config`, just like any other code in
their program -- #17050 and #4512 are two examples.

This commit makes us live up to this expectation. Dynamic providers now
receive all configuration values, with the namespaces preserved so that
existing `pulumi.Config` code can work in a dynamic provider like it
works everywhere else.

Fixes #17050
2024-09-10 17:21:20 +01:00
..
apitype Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
channel Send all events to the engine event stream (#14607) 2023-11-20 21:55:59 +00:00
constant Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
diag turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
encoding all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
env Support PULUMI_SHOW_COPILOT_LINK to enable 'explainFailure' link (#17109) 2024-08-29 20:43:29 +00:00
promise Add tests to sdk/go/common/promise for coverage (#17197) 2024-09-08 21:07:08 +00:00
resource Support `pulumi.Config` in dynamic providers 2024-09-10 17:21:20 +01:00
slice Engine support for remote transforms (#15290) 2024-02-21 16:30:46 +00:00
testing Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
tokens Move resource.URN to urn.URN (#15689) 2024-03-14 15:28:32 +00:00
tools Switch back to `os/user` to get the current user (#17125) 2024-08-31 18:54:35 +00:00
util Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00