opensearch-project / terraform-provider-opensearch

https://registry.terraform.io/providers/opensearch-project/opensearch
Apache License 2.0
74 stars 57 forks source link

[BUG] opensearch_channel_configuration config_id field change detected in TF plans #88

Open akennealy opened 11 months ago

akennealy commented 11 months ago

What is the bug?

Persistent Terraform plan change detected with field config_id

How can one reproduce the bug?

1) Create a new opensearch_channel_configuration resource

resource "opensearch_channel_configuration" "escalations" {
  body = <<EOF
{
  "config": {
    "name": "name",
    "description": "description",
    "config_type": "slack",
    "is_enabled": true,
    "slack": {
      "url": "${var.slack_escalations_channel_webhook}"
    }
  }
}
EOF
}

2) Plan and apply 3) Then trigger a new plan 4) Bug: The plan will try to remove the config_id field (That was added by OpenSearch dashboard)

What is the expected behavior?

No changes detected in plan

What is your host/environment?

Operating system, version.

Do you have any screenshots?

Screenshot of TF cloud UI showing diff ![image](https://github.com/opensearch-project/terraform-provider-opensearch/assets/8302190/ca8b3c55-727e-4d0f-a099-488e26655587)

Do you have any additional context?

Add any other context about the problem.

prudhvigodithi commented 11 months ago

[Untriage] Hey @akennealy I assume you have tested with latest supported release of the provider? The opensearch_channel_configuration configuration was introduced by @alexconlin https://github.com/opensearch-project/terraform-provider-opensearch/pull/68, @alexconlin can you please a look and see whats this bug about ? Adding @rblcoder @afrodidact @premkirank Thank you

akennealy commented 11 months ago

@prudhvigodithi yes Im on the latest version.

afrodidact commented 11 months ago

Hi @prudhvigodithi, can you assign this issue to me?

prudhvigodithi commented 11 months ago

Thanks assigned to your @afrodidact.

afrodidact commented 11 months ago

Thanks!

afrodidact commented 11 months ago

I’ve implemented a fix for this in the pull request here.