pulumi-azure-native
pulumi-azure-native copied to clipboard
Creating Blob with a StringAsset throws Unmarshaling Exception
When trying to create a storage blob using a StringAsset
and passing in XML, an error is thrown. I was able to get around this for now by using a FileAsset
instead.
Expected behavior
I expected the Blob to be created with the string passed into StringAsset
to be in the contents of the blob.
Current behavior
The error is thrown: Error: Invalid asset encountered when unmarshaling resource property
Steps to reproduce
Live Preview: https://app.pulumi.com/ContessaHealth/unicode/dev/previews/3acd6512-2146-4071-879c-c941b18f66cc
- Create a BlobContainer resource
- Attempt to create a Blob resource using a
new StringAsset('<?xml version="1.0" encoding="utf-8"?><repository></repository>')
as thesource
Context (Environment)
const dataProtectionBlob = new Blob(
'dataProtectionBlob',
{
blobName: 'data-protection-key.xml',
accountName: currentStorageAccount.name,
containerName: dataProtectionContainer.name,
type: 'Block',
contentType: 'application/xml',
source: new StringAsset('<?xml version="1.0" encoding="utf-8"?><repository></repository>'),
resourceGroupName
},
{ ignoreChanges: ['source'] }
)