-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core_route_table_default_resource should use CreatedPending instead of CreatedTarget. #2094
Comments
Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. If it's not related to any particular resource then mention affected resource as terraform. As this works through automation, request you to follow exact syntax. |
affected_resources = core_route_table_default |
This is the required change.
|
The core_route_table_default resource sets the DeletedPending lifecycle target to be the same as the CreatedActual target. This works fine on OCI, because OCI never transitions the RouteTable's lifecycleState to anything when the RouteRules are modified. But on PCA that RouteTable will change to PROVISIONING state (by design to prevent multiple UpdateRouteTable operations), and on destroy the terraform script fails because it detects that the RouteTable is in an unexpected lifecycle state.
The fix would be for DeletedPending setting to be the same as the CreatedPending() setting instead of CreateTarget().
Community Note
Terraform Version and Provider Version
terraform -v
Terraform v1.5.7
on linux_amd64
Affected Resource(s)
affected_resources = core_route_table_default
Terraform Configuration Files
provider.tf
variable.tf
drgsetup.tf
Debug Output
Panic Output
Expected Behavior
terraform destroy --auto-approve
Actual Behavior
Terraform destroy reports the following error when first run. A rerun works since all the RouteRules have already been deleted.
2024-02-29T11:33:41.145Z [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
╷
│ Error: During deletion, Terraform expected the resource to reach state(s): AVAILABLE, but the service reported unexpected state: PROVISIONING.
│
│
╵
╷
│ Error: During deletion, Terraform expected the resource to reach state(s): AVAILABLE, but the service reported unexpected state: PROVISIONING.
│
│
╵
Steps to Reproduce
Important Factoids
This was run on a PCA Rack. It will only show up when Terraform is run on a PCA or CCC appliance. It will always happen if a Drg RouteRule is created in the Default RouteTable. It will sometimes happen on other Route Rules.
References
The text was updated successfully, but these errors were encountered: