This message was deleted.
s
This message was deleted.
l
I can't see the S3 backend config in there. I expect to see a couple of lines like this in your Pulumi.yaml files?
Copy code
backend:
  url: <s3://your-bucket/your/s3/key/to/your/state>
a
I set it via
pulumi login
But, I suppose I should be setting different paths for the different "projects" contained by the different modules? Or would that prevent me from being able to use the stack references between them?
l
I've asked this before, and @billowy-army-68599 has said that once you use different buckets or keys, you can't use stack references. I know I can't use them. You have to use one big state file with all the stacks in it, in order to use stack references. And the S3 backend has no locking built in. Unless you implement that yourself, the risk of corruption goes up quickly...
In my case, we've decided that multiple small state files is safest. We use config vars for sharing info between stacks. It's a small project right now: we'll splash out the big cash once we have more resources and can justify paying for the Pulumi backend.
We don't want to use
pulumi login
for this: we have a single set of creds and use assumable roles for all the accounts and environments, and we want to be able to deploy to all of them from a single
pulumi up
. So re-logging in doesn't fit that.
a
Yeah, I'm using a single bucket with namespaced stacks to be able to do stack references. In terms of the lack of locking, right now we're very early in our adoption but the intent is to only allow execution via a pipeline executor.
l
I would use the backend: url: settings in your Pulumi.yaml files. However, unless all the URLs are the same, you won't be able to use StackReferences, and you'll have to pass values via normal Pulumi config.