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
Describe the bug
When running deletes on resources, gyro still removes the resource from it's state even if it is returned an error on the delete request
To Reproduce
Create a google::compute-region-instance-group-manager with a google::compute-region-autoscaler and google::compute-backend-service. Then build out a google::compute-instance-template that uses that instance-group-manager. When gyro goes to delete the google::compute instance-template resource, it first runs the deletes on it's subresources as a prerequisite. The deletes follow this order:
When gyro sends the DELETE request to the instance-group-manager, which is a resource that is using the google::compute-instance-template resource, gyro sends that DELETE request then moves on to send a DELETE request for the instance-template resource. However, a error is sent back:
- Deleting google::compute-backend-service frontend-verify (https://www.googleapis.com/compute/v1/projects/project-id/global/backendServices/resource-name)
OK
- Deleting google::compute-region-autoscaler frontend (https://www.googleapis.com/compute/v1/projects/project-id/regions/region/autoscalers/resource-name)
OK
- Deleting google::compute-region-instance-group-manager frontend (https://www.googleapis.com/compute/v1/projects/project-id/regions/region/instanceGroupManagers/resource-name)
OK
- Deleting google::compute-instance-template frontend (https://www.googleapis.com/compute/v1/projects/project-id/global/instanceTemplates/resource-name)
Error: Can't replace google::compute-instance-template frontend resource!
Caused by: Error: Can't delete google::compute-instance-template frontend resource!
Caused by: Error: The instance_template resource 'projects/project-id/global/instanceTemplates/resource-name' is already being used by 'projects/project-id/regions/region/instanceGroupManagers/resource-name'
The reason gyro fails to delete the instance-template is because the instance-group is still being deleted by GCP. Until the instance-group is completely deleted, you won't be able to delete the instance-template. This is not an issue on gyro's part. Our workflow should add a wait directive to compensate, the problem with gyro is that it still removes the instance-template resource from the state. However, the instance-template resource still exists and the gyro user either has to rebuild the state file by adding that resource's state back or manually delete the instance-template.
Expected behavior
If gyro sends a successful delete request, it should remove the resource from the state. If gyro sends an unsuccessful delete request and a error is returned, it should not remove the resource from the state.
Actual behavior
When gyro sends a successful delete request, it removes the resource from the state. When gyro sends an unsuccessful delete request and an error is returned, it incorrectly removes the resource from state.
The text was updated successfully, but these errors were encountered:
Describe the bug
When running deletes on resources, gyro still removes the resource from it's state even if it is returned an error on the delete request
To Reproduce
Create a google::compute-region-instance-group-manager with a google::compute-region-autoscaler and google::compute-backend-service. Then build out a google::compute-instance-template that uses that instance-group-manager. When gyro goes to delete the google::compute instance-template resource, it first runs the deletes on it's subresources as a prerequisite. The deletes follow this order:
When gyro sends the DELETE request to the instance-group-manager, which is a resource that is using the google::compute-instance-template resource, gyro sends that DELETE request then moves on to send a DELETE request for the instance-template resource. However, a error is sent back:
The reason gyro fails to delete the instance-template is because the instance-group is still being deleted by GCP. Until the instance-group is completely deleted, you won't be able to delete the instance-template. This is not an issue on gyro's part. Our workflow should add a wait directive to compensate, the problem with gyro is that it still removes the instance-template resource from the state. However, the instance-template resource still exists and the gyro user either has to rebuild the state file by adding that resource's state back or manually delete the instance-template.
Expected behavior
If gyro sends a successful delete request, it should remove the resource from the state. If gyro sends an unsuccessful delete request and a error is returned, it should not remove the resource from the state.
Actual behavior
When gyro sends a successful delete request, it removes the resource from the state. When gyro sends an unsuccessful delete request and an error is returned, it incorrectly removes the resource from state.
The text was updated successfully, but these errors were encountered: