Skip to content

[Bug] elasticstack_kibana_action_connector resource of type .webhook does not respect ca related settings #1135

@breml

Description

@breml

Describe the bug

According to https://www.elastic.co/docs/api/doc/kibana/v8/operation/operation-put-actions-connector-id#operation-put-actions-connector-id-body-application-json-webhook_config-config-object, elasticstack_kibana_action_connector resources of type .webhook support adding certificate authority.

The attributes config.authType, config.ca and config.verificationMode are not properly handled by the Terraform provider. Changes are not applied nor checked correctly during plan.

To Reproduce
Steps to reproduce the behavior:

  1. TF configuration used
resource "elasticstack_kibana_action_connector" "example" {
  name = "example"
  config = jsonencode({
    "hasAuth"  = true
    "authType" = "webhook-authentication-basic"
    "ca"       = filebase64("cacert.ca")
    "headers" = {
      "Content-type" = "application/json"
    }
    "method"           = "post"
    "url"              = "https://some.url.com/"
    "verificationMode" = "full"
  })
  secrets = jsonencode({
    user     = "username"
    password = "password"
  })
  connector_type_id = ".webhook"
}
  1. TF operations to execute terraform apply followed by terraform plan

Expected behavior
The execution of terraform plan after terraform apply should not show any changes.
The settings for authType, ca and verificationMode should be persisted in .kibana_alerting_cases* index in Elasticsearch.

Versions (please complete the following information):

  • OS: Linux
  • Terraform Version: v1.10.0
  • Provider version: v0.11.15
  • Elasticsearch Version: 8.17.5

Additional context

If the same change is done through Kibana (creation of the webhook connector), the settings are present when the connector is re-opened in Kibana as well as in the .kibana_alerting_cases*.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:ResponseOpsIssues related to the Alerting and Connectors APIsbugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions