Relax the type check to accomodate what YAML parser returns (#4023)

Relax the type check to accomodate what YAML parser returns
This commit is contained in:
Mikhail Shilkov 2020-03-05 16:41:31 +01:00 committed by GitHub
parent dbb5b04d2f
commit 8e87b2b893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View file

@ -1,6 +1,12 @@
CHANGELOG
=========
## HEAD (Unreleased)
* Fix Kubernetes YAML parsing error in .NET.
[#4023](https://github.com/pulumi/pulumi/pull/4023)
---
## 1.12.0 (2020-03-04)
- Avoid Configuring providers which are not used during preview.
[#4004](https://github.com/pulumi/pulumi/pull/4004)

View file

@ -324,8 +324,17 @@ namespace Pulumi.Serialization
if (targetType == typeof(ImmutableDictionary<string, object>))
{
// This type is what is generated for things like azure/aws tags. It's an untyped
// map in our original schema. This is the only place that `object` should appear
// as a legal value.
// map in our original schema. This is the 1st out of 2 places that `object` should
// appear as a legal value.
return;
}
if (targetType == typeof(ImmutableArray<object>))
{
// This type is what is generated for things like YAML decode invocation response
// in the Kubernetes provider. The elements of the array would typically be
// immutable dictionaries. This is the 2nd out of 2 places that `object` should
// appear as a legal value.
return;
}