pulumi/sdk/go/common/resource
Pat Gavlin 2f0dba23ab
Fix resource-ref-as-ID marshaling. (#6125)
When marshaling a resource reference as its ID (i.e. when
opts.KeepResources is false, as it will be in the case of downlevel SDKs
and resource providers), we must take care to marshal/unmarshal an empty
ID as the unknown property value.

This includes the following changes to the resource ref APIs:

- Bifurcate resource reference creation into two methods: one for
  creating references to custom resources and one for creating
  references to component resources.
- Store the ID in a resource reference as a PropertyValue s.t. it can be
  computed.
- Add a helper method for retrieving the ID as a string + an indicator of
  whether or not the reference has an ID.

Fixes #5939.
2021-01-15 16:06:57 -08:00
..
config Add the ability to copy configs between stacks (#4971) 2020-07-17 11:14:10 +01:00
plugin Fix resource-ref-as-ID marshaling. (#6125) 2021-01-15 16:06:57 -08:00
asset.go support jar files 2020-08-10 14:15:35 -07:00
asset_test.go add initial pull-request workflow (#5276) 2020-09-09 13:37:03 -07:00
custom_timeouts.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
errors.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
properties.go Fix resource-ref-as-ID marshaling. (#6125) 2021-01-15 16:06:57 -08:00
properties_diff.go Fix resource-ref-as-ID marshaling. (#6125) 2021-01-15 16:06:57 -08:00
properties_diff_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
properties_path.go Properly resize arrays when adding (#5872) 2020-12-06 21:23:50 +00:00
properties_path_test.go Properly resize arrays when adding (#5872) 2020-12-06 21:23:50 +00:00
properties_test.go fix unknown status for secrets wrapping unknowns (#4377) 2020-04-13 22:47:08 +01:00
resource_goal.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
resource_id.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
resource_id_test.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07: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 Avoid replace on second update with import applied (#4403) 2020-04-15 18:52:40 -07:00
stack.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01: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 Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
urn_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00