Heya, so we build our stacks with automation in gi...
# general
a
Heya, so we build our stacks with automation in gitlab CI. When we do this, obviously the files for the stack do not get "saved" back into the branch when this happens. They are created on the builder and deleted seconds after the build is complete. Do any of you have this problem? How have you solved it? What I have been doing is pulling the code and doing a pulumi refresh to bring it in when I need it. I have thought about letting the builder commit the new files, but that feels like a really bad idea in most cases.
b
I sync the state files with an S3 Bucket (AWS as cloud provider) before and after the deployment
a
Yeah, we are using S3 for the state files as well. I am mostly talking about the YAML files that are generated from the pulumi creation.
b
do you mean the stack settings file (like Pulumi.dev.yaml)? I don't save them
a
Yeah those files. We add values to the settings files. Thank you for responding. I am coming to Pulumi from Terraform, so I am still trying to learn all the lingo.
b
It's not a "problem" per se if you are setting your project settings and configuration every run. For instance Automation API relies on those files still being present because under the hood Automation API is still invoking the Pulumi CLI in whatever directory contains those files. But Automation API was designed with the idea that eventually it would no longer rely on the CLI, and would be able to invoke the Pulumi engine directly. Once that is possible it will no longer be necessary for those files to even be created on the file system. So like I said, if your build is setting your settings & config each run it isn't necessary that you preserve those files.