Hello! I am hoping someone here might help.
We have a Pulumi TypeScript program that uses the Automation API and is inline. It runs in a job and deploys infra for us.
One of the jobs failed and has entered a state where it requires an interactive refresh to confirm whether creates were successful for resources.
How can we resolve this state?
The TypeScript
stack.refresh
method does not have any options for interactivity, or to resolve this issue.
Since this is an inline program I am not sure how I can run it with the usual Pulumi CLI commands.
Please help!
Edit: SOLVED! Able to run pulumi refresh via CLI without needing the infra code.
l
little-cartoon-10569
11/21/2024, 1:21 AM
You aren't required to use the original "format" of the project. You can use different code, the CLI, the app or the API for any project. In this case, you want to use the CLI.
little-cartoon-10569
11/21/2024, 1:22 AM
You can use
pulumi refresh --stack org/proj/stack
from anywhere to achieve this.
c
cool-night-47229
11/21/2024, 1:30 AM
Beautiful, thank you.
Makes sense you don't need the actual infra code to do a state refresh. Just had to do some manual setting up of config but I was able to repair the state.
cool-night-47229
11/21/2024, 1:36 AM
Automated job is now succeeding with no errors. Thank you @little-cartoon-10569.
Not the most ideal solution, since it requires manual effort from a dev. However it should be an edge case, I wonder if we can improve our setup to avoid this situation by listening to signals 🤔
l
little-cartoon-10569
11/21/2024, 1:54 AM
I think you'd want a quality gate in front of it; this way is good enough imo. Sometimes the solution is to push forwards instead of roll back.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.