https://pulumi.com logo
#automation-api
Title
# automation-api
a

aloof-doctor-77911

01/19/2024, 2:37 PM
Hi how we use
pulumi login s3://
command in the code ?
i need to set the backend in the code
s

salmon-account-74572

01/19/2024, 4:21 PM
Because the code relies on the backend, you have to set the backend before you can run the code. You can't set it in the code without using something like Automation API (in which case you'd set up the stack, including the backend, and execute the various stack operations like preview, up, destroy, etc. from the Automation API code).
a

aloof-doctor-77911

01/19/2024, 4:28 PM
yes i'm using automation api but how to set this backend login ?
s

salmon-account-74572

01/19/2024, 4:36 PM
Have a look here: https://www.pulumi.com/docs/concepts/state/ I haven't tested/tried this, but it looks like specifying it using the
PULUMI_BACKEND_URL
environment variable or putting it in the stack configuration might work for you.
m

millions-furniture-75402

01/19/2024, 6:06 PM
Example
Copy code
PULUMI_BACKEND_URL="s3://<bucket>/<path>/?region=us-east-1&awssdk=v2"
2 Views