Hello! I am hoping someone here might help. We ha...
# getting-started
c
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
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.
You can use
pulumi refresh --stack org/proj/stack
from anywhere to achieve this.
c
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.
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
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.