phillbaker / terraform-provider-elasticsearch

An elasticsearch provider for terraform
https://registry.terraform.io/providers/phillbaker/elasticsearch
Mozilla Public License 2.0
303 stars 133 forks source link

Using elasticsearch_opensearch_destination for sns generate error #334

Closed behnm closed 1 year ago

behnm commented 1 year ago

I want to create a sns notification channel by terraform . My resource is

resource "elasticsearch_opensearch_destination" "alert_sns" {
  body = jsonencode({
    type = "sns"
    name = "alert-sns"
    sns = {
        topic_arn = "my_topic_arn"
        role_arn = "my_role_arn"
    }
  })
}

But it gives me the error. Error: elastic: Error 405 (Method Not Allowed). My question is, All the paramters that are used are correct or I should use config_type, instead of using type for sns for instance.

The version of things that I use: Terraform: v1.1.1 opensearch: v2.3 provider elasticsearch: V2.0.4

MindAwakeBodyAsleep commented 1 year ago

Not only for SNS. I have that kind of error for type: slack also. I am using opensearch v2.4.1 and provider v2.0.7

JPLachance commented 1 year ago

👋🏼

OpenSearch made breaking changes. This provider does not support OpenSearch 2.0

See https://github.com/phillbaker/terraform-provider-elasticsearch/issues/298#issuecomment-1327909365.

phillbaker commented 1 year ago

Please see above, as this sounds like a version compatibility issue.