https://pulumi.com logo
#general
Title
# general
n

nice-application-79035

01/24/2023, 11:26 PM
Hi everyone, I am creating an azure storage blob using python. Can someone please tell me how can I put content in the blob once blob is created? This is the code I have for creating the blob
Copy code
return storage.Blob(resource_name=resource_name,
                    resource_group_name=resource_group_name,
                    account_name=account_name,
                    container_name=container_name,
                    blob_name=resource_name)
I really appreciate your pointers. Thanks!
m

melodic-tomato-39005

01/24/2023, 11:33 PM
Hi @nice-application-79035! You would use the
source
property of the Blob class: https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/blob/#source_nodejs Here’s a complete example, although in C#: https://github.com/pulumi/examples/blob/master/azure-cs-static-website/MyStack.cs The blob can be new or already existing.
n

nice-application-79035

01/24/2023, 11:35 PM
Thank you @melodic-tomato-39005! That's a great help.