Forge env vars require redeploy?

I’m trying to utilize env vars in forge but they are not lining up with my current understanding of them. I deployed my app but when I try to update my env var it seems that those changes are not picked up unless the app is re-deployed.

I would’ve thought these variables get picked up as I set them from the cli and not involving a redeploy. Would appreciate a clarification to make sure my understanding is correct.

Thanks!

1 Like

By default the CLI will run commands in the development environment. It’s possible you have set the env vars in development environment but are trying to access the production one.

In that case you can try the --environment flag as shown here https://developer.atlassian.com/platform/forge/environments-and-versions/

Hopefully that answers your question!

@BeauWilliams I assumed that this is the intended behavior (although it’s not documented). Changes to environment variables only take effect after forge deploy.

No it’s not a question of environment. @klaussner is confirming what my understanding is.