mirror of https://github.com/pulumi/pulumi.git
1515db22f1
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 |
||
---|---|---|
.. | ||
benchmarks/go-alias-norm | ||
examples | ||
integration | ||
testdata | ||
testprovider | ||
.gitignore | ||
README.md | ||
about_test.go | ||
config_test.go | ||
go.mod | ||
go.sum | ||
history_test.go | ||
login_test.go | ||
main_test.go | ||
policy_new_test.go | ||
preview_only_test.go | ||
remote_test.go | ||
roundtrip_test.go | ||
smoke_test.go | ||
stack_test.go |
README.md
Integration Tests
This module provides integration tests for the Pulumi CLI.
The tests can be run via:
make test_all
Usage of Go build tags
In order to speed up integration tests in GitHub actions, Go build tags are used to conditionally compile the desired test cases.
// integration_nodejs_test.go
//go:build (nodejs || all) && !xplatform-acceptance
// integration_nodejs_acceptance_test.go
//go:build nodejs || all