pulumi/CHANGELOG_PENDING.md

6 lines
34 B
Markdown
Raw Normal View History

2021-05-06 20:27:21 +02:00
### Improvements
[sdk/{go,dotnet] Unmarshal invalid assets. (#7579) The two more strongly-typed Pulumi SDKs curently fail with an error during unmarshaling when attempting to marshal a value that is not an asset into an asset-typed location (e.g. an asset-typed resource output property). While this behavior is reasonable on its face, it gives rise to practical challenges when dealing with TF-provider-backed resources that have asset-typed properties. When such a resource is refreshed, the values of its asset-typed properties are replaced with non-asset values, as the TF bridge can't currently create a resonable stand-in asset value. For example, consider an S3 bucket object: ``` import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws"; const bucket = new aws.s3.Bucket("my-bucket"); new aws.s3.BucketObject("my-object", { source: new pulumi.FileAsset("some/file"), }); ``` Upon creation, the value of the input property `source` will be a file asset backed by the path `some/file`. The bridge will propagate this value to the `source` output property; this propagation is safe because the resource was just created and so the output property must have the value that was passed by the program. Now, let some actor apply out-of-band changes to the contents of the bucket object s.t. the `source` property changes when the object is refreshed. In that case, the `source` property will be a string value which the bridge is unable to interpret as an asset. The next time the Pulumi program is run, the Go or .NET SDK will attempt to deserialize the string into an asset-typed property and will fail. With these changes, the deserialization would not fail, and would instead create an asset or archive value that will fail to marshal if passed to another resource. Users can avoid these errors by not passing asset or archive outputs to other resources/stack outputs. These changes unblock users who are hitting https://github.com/pulumi/pulumi-aws/issues/1521.
2021-07-21 22:40:36 +02:00
### Bug Fixes
2021-07-07 13:36:12 +02:00