I just started experimenting with Pulumi after working for sometime with Terraform. The fact that using code feels a lot more comfortable than doing HCL. For state, I use S3 which I was able to connect to using the pulumi login command. However, I was wondering if there is a codified way either using the pulumi.<stack>.yaml file or directly by creating a backend directly in the code similar to creating a provider in the code. I googled for solutions on the same and do see some examples of the backend being embedded in the yaml file but It no longer seems to work in the current 3.7 version which I am working on.
The goal I am trying to achieve is to hit pulumi up without having to login every time and be able to commit the backend to the git repo for people to share. Wondering if this is possible?