pulumi/sdk/go/pulumi
Abhinav Gupta a92b877e5f
sdk/go: Propagate more resource options from provider.Construct
`provider.Construct` is used to build MLCs in Go.
It receives a pulumirpc.ConstructRequest
and turns that into a standard Go SDK ResourceOption.

In #12682, we added a few new fields to pulumirpc.ConstructRequest.
This updates the Go SDK to pick up these new options
and pass them on for the resource to pick up
(and eventually send back to the engine as a RegisterResource call).

Testing:
This change includes unit tests to verify mapping of ConstructRequests
to options, which are then interpreted with NewResourceOptions.

On top of that, it builds upon the integration test added in #12699
to verify options that are saved in snapshots.
Note that this integration test does not test for the following options:
IgnoreChanges, ReplaceOnChanges, and DeleteBeforeReplace.
These options are not stored in state snapshots,
so we can't validate them just by looking at that.

Refs #12154
2023-04-21 10:58:59 -07:00
..
config all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
generate all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
internals sdk/internal: pulumi.NewOutput => ctx.NewOutput 2023-01-13 13:31:28 -08:00
provider all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
alias.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
alias_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
asset.go [sdk/{go,dotnet] Unmarshal invalid assets. (#7579) 2021-07-21 13:40:36 -07:00
context.go [sdk/go] Fix hang due to component children cycles 2023-03-26 23:46:54 -07:00
context_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
internals.go Update sdk/go/pulumi/internals.go 2022-10-05 11:07:35 -07:00
log.go chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
mocks.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
printf.go Redesign the Go SDK resource/input/output system. (#3506) 2020-01-18 10:08:37 -05:00
printf_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
provider.go sdk/go: Propagate more resource options from provider.Construct 2023-04-21 10:58:59 -07:00
provider_linked.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
provider_test.go sdk/go: Propagate more resource options from provider.Construct 2023-04-21 10:58:59 -07:00
resource.go sdk/go: Don't drop Dependencies in ResourceOptions snapshot for MLCs 2023-04-18 12:18:00 -07:00
resource_set.go unused: Remove unused functions and types 2023-01-12 09:55:34 -08:00
resource_test.go [sdk/go] Fix hang due to component children cycles 2023-03-26 23:46:54 -07:00
rpc.go [sdk/go] Fix hang due to component children cycles 2023-03-26 23:46:54 -07:00
rpc_test.go Revert "[go/sdk] Delegate alias computation to the engine" 2023-01-26 19:53:26 +01:00
run.go sdk/go: Prefer contract.Assertf over Assert 2023-02-15 10:22:43 -08:00
run_test.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
stack_reference.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
stack_reference_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
transformation.go Support transformations in Go (#3978) 2020-03-02 13:59:11 -08:00
type_conversions.go [codegen/go] Improve optional params in invoke 2022-02-01 11:44:40 -08:00
types.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
types_builtins.go Support subdirectories in proto 2023-03-05 16:05:58 +00:00
types_builtins_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
types_contravariance_test.go sdk/go: Implement array contravariance in As*ArrayOutput types 2022-10-10 21:04:34 -07:00
types_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
urnset.go [sdk/go] Unmarshal output values in component provider (#7975) 2021-09-17 19:46:06 -07:00
workgroup.go Fixing WaitGroup related panics in the Go SDK (#7661) 2021-07-29 12:39:28 -04:00
workgroup_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00