https://pulumi.com logo
Title
b

bored-oyster-3147

03/22/2021, 12:57 PM
@better-shampoo-48884 I just use an S3 bucket and each pulumi project gets its own directory in the bucket
b

better-shampoo-48884

03/22/2021, 1:25 PM
Do you set up the directories yourself? With azure blob container - it just throws everything into root like normal .pulumi folder..
b

bored-oyster-3147

03/22/2021, 1:35 PM
in blob storage directories aren't really "directories" right? They're just simulated that way for the UI - it's really just pathing. So when I give my project a state backend url this is the path that I use:
s3://{bucketName}/{projectName}/
And that effectively gives it its own directory.
b

better-shampoo-48884

03/22/2021, 1:45 PM
exactly what I was wondering about - thanks 🙂
w

worried-knife-31967

03/22/2021, 1:46 PM
however, that breaks stack references.
b

bored-oyster-3147

03/22/2021, 1:46 PM
true. I don't use them
it's worth mentioning also that filestate backends do not support locking on stack updates by default. Meaning you'll get all kinds of weird issues if concurrent updates on the same stack go out. this PR was recently approved gating the locking mechanism behind an ENV var: https://github.com/pulumi/pulumi/pull/2697 and this issue is open to make it the default: https://github.com/pulumi/pulumi/issues/6536 It's fairly new parameter so not really documented yet.
b

better-shampoo-48884

03/22/2021, 1:52 PM
mm. i do like stack references though.
oh wow - was wondering if lockfile was being worked on, thats excellent
p

prehistoric-coat-10166

03/22/2021, 1:54 PM
With stack references and filestate backend the only alternative (afaik) is to utilize the naming scheme where you have for example the project name in the stack name. It's a bit clunky but it does work
w

worried-knife-31967

03/22/2021, 1:55 PM
yup, that's what I've detailed in that post.
I thought Azure Blob used the Lease for locking though
b

better-shampoo-48884

03/22/2021, 1:58 PM
I wonder.. in a stack reference with azblob backend, would stack B lock the stack A state if it referenced it?
or even with the new locking system. technically a state reference just reads the output as a one-off right?
b

bored-oyster-3147

03/22/2021, 1:59 PM
a stack reference is just going to be deserializing the state file, it shouldn't be locking anything