pulumi/sdk/go/common/resource
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
..
archive Prepare golangci-lint upgrade (#17065) 2024-08-28 07:57:38 +00:00
asset Add asset/archive to conformance tests and fix engine working dir issues (#16100) 2024-05-02 11:32:54 +00:00
config Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
plugin Support `pulumi.Config` in dynamic providers 2024-09-10 17:21:20 +01:00
sig Move assets and archives to their own package (#15157) 2024-01-25 20:39:31 +00:00
testing Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
urn rewrite the URN when resources are being moved between projects (#16523) 2024-07-01 17:36:11 +00:00
alias.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
asset.go Add asset archive test to conformance tests (#16455) 2024-06-24 14:23:18 +00:00
asset_test.go Deserialize Assets with their Sig (#16073) 2024-04-26 19:05:50 +00:00
custom_timeouts.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
errors.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
mapper_test.go Move assets and archives to their own package (#15157) 2024-01-25 20:39:31 +00:00
properties.go Flow PropertyValues through NewPropertyMapFromMap (#16894) 2024-08-07 06:50:58 +00:00
properties_diff.go A property.Value implementation to replace resource.PropertyValue (#15145) 2024-03-14 19:58:59 +00:00
properties_diff_test.go Move assets and archives to their own package (#15157) 2024-01-25 20:39:31 +00:00
properties_path.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
properties_path_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
properties_test.go Flow PropertyValues through NewPropertyMapFromMap (#16894) 2024-08-07 06:50:58 +00:00
property_compatibility.go Property map keys are just strings (#15767) 2024-03-25 17:26:41 +00:00
property_compatibility_test.go A property.Value implementation to replace resource.PropertyValue (#15145) 2024-03-14 19:58:59 +00:00
resource_goal.go Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
resource_id.go Remove unused resource.NewUniqueHexV2 (#17067) 2024-08-26 10:48:25 +00:00
resource_id_test.go Remove unused resource.NewUniqueHexV2 (#17067) 2024-08-26 10:48:25 +00:00
resource_operation.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
resource_state.go Change `pulumi refresh` to report diff relative to desired state instead of relative to only output changes (#16146) 2024-06-12 16:17:05 +00:00
stack.go Move resource.URN to urn.URN (#15689) 2024-03-14 15:28:32 +00:00
status.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
urn.go Move resource.URN to urn.URN (#15689) 2024-03-14 15:28:32 +00:00