https://pulumi.com logo
#azure
Title
# azure
i

incalculable-telephone-86016

08/07/2023, 10:31 PM
Hi all, I want Pulumi to create a blob in a storage container only if a blob with that name doesn't already exist in that container. If it does exist, I don't want Pulumi to do anything with it. Basically I'm hoping pulumi will only create the file upon first creating the container resource, and after that leave it alone. Is this possible? It doesn't look like azure-native has a function to get existing blobs, so I was looking into StackReference.
b

brave-planet-10645

08/08/2023, 9:08 AM
Is there any reason that you can’t just create the resource? If it’s not there, Pulumi will create it, but if Pulumi detects that it’s there and no change has been made then it’ll ignore it. You can also set extra inputs to ignore using
ignoreChanges
: https://www.pulumi.com/docs/concepts/options/ignorechanges/