You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)
Issue details
Even though pulumi up failed with an error when applying a change to the resource, the change got recorded in the state and it didn't show up again in pulumi preview but it should.
Steps to reproduce
Create Pulumi code to create a repository
pulumi up the change so the repository is created
Set archived=True on the repository
Make sure that the Github token used to apply the change doesn't have admin permissions in the repository (e.g. remove its permissions in the repository Settings page)
pulumi preview shows that this attribute will be changed
Run pulumi up
It fails due to missing Github token permissions with:
some-github-repo (github:index:Repository)
error: 1 error occurred:
* updating urn:pulumi:prod::**masked**::github:index/repository:Repository::some-github-repo: PATCH https://api.github.com/repos/myorg/some-github-repo: 404 Not Found [] ```
You can see in Github that the repository hasn't been archived
Run pulumi preview - Pulumi doesn't detect that the repository still needs to be archived
Run pulumi refresh - Pulumi doesn't detect that the repository is not archived and it has archived=True in the state.
The text was updated successfully, but these errors were encountered:
I'm surprised the refresh doesn't detect this. It sounds like this might be an issue with the upstream provider in how it handles the 404 coming back from GitHub. As a workaround, are you able to edit the state file to remove the archived status and retry?
Hello!
Issue details
Even though
pulumi up
failed with an error when applying a change to the resource, the change got recorded in the state and it didn't show up again inpulumi preview
but it should.Steps to reproduce
pulumi up
the change so the repository is createdarchived=True
on the repositorypulumi preview
shows that this attribute will be changedpulumi up
It fails due to missing Github token permissions with:
pulumi preview
- Pulumi doesn't detect that the repository still needs to be archivedpulumi refresh
- Pulumi doesn't detect that the repository is not archived and it has archived=True in the state.The text was updated successfully, but these errors were encountered: