sticky-answer-6826
04/03/2024, 2:36 PMpulumiservice.Team()
?
error: Preview failed: Read construct is not yet implemented
Only seems to happen with pulumi preview
.
The main issue I am encountering, and how I got here, is I am using pulumiservice.TeamStackPermission()
executions to grant permissions for all our stacks. It hadn’t been run in a while so it’s failing with errors when running pulumi up
error: failed to remove stack permissions for team: 404 API error: Not Found: Stack ‘STACKNAME’ not found
.
It’s correct, Stacks no longer exists, so ran pulumi refresh
to try and sync state, but got the preview error I first mentioned.
So deploying fails as it can’t delete permission grants for Stacks that no longer exists, but I cant tell Pulumi to update to the correct state either so it doesn’t try to update on Stacks that no longer exist, and thus properly propagate deletion of these grants for such orphaned Stacks. I don’t want to have to “restore” hundreds of Stacks. This should be handled internally IMO.
So, how can I do this properly?
Other thoughts?
Thanks everyone =)adventurous-butcher-54166
04/03/2024, 4:25 PM• Fixfor TeamStackPermission so resources are not deleted from state on refresh. Note: TeamStackPermission resources created before v0.17.0 will now return an error if attempting a refresh, but those (re)created with the new version will supportRead
. #205refresh
sticky-answer-6826
04/04/2024, 2:19 PMadventurous-butcher-54166
04/04/2024, 2:21 PMNote: TeamStackPermission resources created before v0.17.0 will now return an error if attempting a refresh, but those (re)created with the new version will supportrefresh
sticky-answer-6826
04/04/2024, 5:20 PMpulumi refresh
in an attempt to sync state as attempting to delete these old Stack perm grants failed for projects/Stacks that no longer exists but where permission grants previously existed.
As I type this it makes me think why are these projects/Stacks still present?? Which makes me think the API call to Pulumi Cloud is returning deleted ones 🧐 ….checking. Not what I would expect from the API callsticky-answer-6826
04/04/2024, 7:55 PM