Giter VIP home page Giter VIP logo

Comments (4)

peterzhuamazon avatar peterzhuamazon commented on August 20, 2024

[Triage] Adding @prudhvigodithi to take a look on this.
Thanks.

from terraform-provider-opensearch.

prudhvigodithi avatar prudhvigodithi commented on August 20, 2024

Hey @arichtman-srt can you please test with the latest release? https://registry.terraform.io/providers/opensearch-project/opensearch/2.0.0-beta.1
Thank you

from terraform-provider-opensearch.

rlanore avatar rlanore commented on August 20, 2024

Tested today with 2.1.0 and no working with this example:

Example from doc opensearch_index_template resource are not working. I had to update the json.

# Create an index template
resource "opensearch_index_template" "logs_1" {
  name = "logs_1"
  body = <<EOF
{
  "index_patterns": [ "logs*" ],
  "template": {
    "settings": {
      "index": {
        "number_of_shards": "1",
        "number_of_replicas": "0",
        "refresh_interval": "5s"
      }
    }
  }
}
EOF
}

# Create a simple index
resource "opensearch_index" "logs-01" {
  name               = "logs-01"
}

as output

Terraform will perform the following actions:

  # opensearch_index.logs-01 will be updated in-place
  ~ resource "opensearch_index" "logs-01" {
        id                 = "logs-01"
        name               = "logs-01"
      - number_of_replicas = "0" -> null
      - refresh_interval   = "5s" -> null
        # (2 unchanged attributes hidden)
    }
Plan: 0 to add, 1 to change, 0 to destroy.
opensearch_index.logs-01: Modifying... [id=logs-01]
╷
│ Error: elastic: Error 400 (Bad Request): failed to parse setting [index.refresh_interval] with value [] as a time value: unit is missing or unrecognized [type=illegal_argument_exception]
│
│   with opensearch_index.logs-01,
│   on main.tf line 50, in resource "opensearch_index" "logs-01":
│   50: resource "opensearch_index" "logs-01" {

from terraform-provider-opensearch.

rlanore avatar rlanore commented on August 20, 2024

As a workaround

# Create a simple index
resource "opensearch_index" "logs-01" {
  name               = "logs-01"
  lifecycle {
    ignore_changes = [
      number_of_replicas,
      refresh_interval
    ]
  }
}

from terraform-provider-opensearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.