IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
341 stars 669 forks source link

DeleteOutgoingWebhookWithContext failed: Gateway Timeout #5516

Open Aashiq-J opened 4 months ago

Aashiq-J commented 4 months ago

Community Note

Terraform CLI and Terraform IBM Provider Version

Terraform v1.5.7 Provider 1.67.1

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "ibm_logs_outgoing_webhook" "en_integration" {
  for_each    = { for idx, en in var.existing_en_instances : idx => en }
  instance_id = ibm_resource_instance.cloud_logs[0].guid
  region      = var.region
  name        = each.value.en_instance_name == null ? "${local.instance_name}-en-integration-${each.key}" : each.value.en_instance_name
  type        = "ibm_event_notifications"

  ibm_event_notifications {
    event_notifications_instance_id = each.value.en_instance_id
    region_id                       = each.value.en_region
    source_id                       = each.value.source_id
    source_name                     = each.value.source_name
  }
}

Complete code https://github.com/terraform-ibm-modules/terraform-ibm-observability-instances/blob/2a3cafc0ab6054b1ad782aec64f9f49d5d02e5e9/modules/cloud_logs/main.tf#L97

Debug Output

│ Error: ---
│ id: terraform-400cd512
│ summary: 'DeleteOutgoingWebhookWithContext failed: Gateway Timeout'
│ severity: error
│ resource: ibm_logs_outgoing_webhook
│ operation: delete
│ component:
│   name: github.com/IBM-Cloud/terraform-provider-ibm
│   version: 1.67.1
│ ---
│ 
│ 
│ 
╵}

Panic Output

Expected Behavior

terraform destroy should be successful.

Actual Behavior

Terraform destroy fails with the above error.

Steps to Reproduce

This is an intermittent issue if we have a outgoing webhook configured for the cloud logs, then while terraform destroy the operation fails.

  1. terraform destroy

Important Factoids

References