- Provider v1.15.2
- Region AU1
- Terraform 1.6.4
Is it possible to force overwrite a Quality Evaluation Form with genesyscloud_quality_evaluationform without deleting the resource first? Getting 409 Conflict on apply after manual UI edits. Terraform state is stale compared to API reality. Want to avoid breaking agent history links.
Check your Terraform configuration for the lifecycle block settings, as this is the standard mechanism to handle resource replacement or force updates without manual deletion. The 409 Conflict error typically arises when the API detects a mismatch between the state file and the actual resource in Genesys Cloud, often due to manual UI edits that bypass the infrastructure-as-code pipeline. To resolve this while preserving agent history links, you must explicitly tell Terraform how to treat the conflict.
resource "genesyscloud_quality_evaluationform" "example" {
name = "Customer Satisfaction Survey"
description = "Standard CSAT form for inbound calls"
# Other configuration blocks...
lifecycle {
# Option 1: Ignore specific changes if they are managed externally
ignore_changes = [
description,
# Add other fields edited manually in UI
]
# Option 2: Force replacement if the resource is fundamentally changed
# replace_triggered_by = [some_other_resource.id]
# Option 3: Prevent accidental deletion (safety net)
prevent_destroy = false
}
}
Using ignore_changes is often the safest approach for evaluation forms where minor UI tweaks occur frequently, ensuring the Terraform state remains aligned with the critical structural elements of the form. This prevents the 409 error by acknowledging that certain attributes are intentionally managed outside of Terraform, thus allowing the apply to succeed without disrupting the underlying data integrity or agent performance metrics tied to the form.