github-as-code
github-as-code copied to clipboard
Check if all state entries still have the same name as the first step of the sync workflow
When we transfer a repository, sync workflow fails in the source organisation. A run of clean workflow which removes the transferred repository from terraform state is required to fix that.
The failure happens when we do terraform refresh call because the repo still exists so a part of refresh works but since it's in a different org already we do not have access to all API endpoints so it fails when we try to retrieve info about vulnerability alerts.
I propose that we remove all the entries from terraform state for which the names have changed as the first step of the sync workflow.