Skip to content

[Enhancement]: Manage OpenSearch index auto creation cluster setting in Terraform provider #40897

@janfreymann

Description

@janfreymann

Description

Cluster-specific settings like index auto creation can be configured via the OpenSearch API.

We could not find a way to manage the index auto creation setting in Terraform. That is why we use curl to change the setting outside of the terraform-managed data:

curl -X PUT "https://cluster-domain.example.com/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "action.auto_create_index": "false"
  }
}'

It would be great if the index auto creation setting (as well as other cluster settings?) could be managed with Terraform.

Affected Resource(s) and/or Data Source(s)

  • aws_opensearch_domain
  • aws_opensearch_domain -> cluster_config

Potential Terraform Configuration

resource "aws_opensearch_domain" "os-cluster" {
  cluster_config {
    settings {
      action_auto_create_index = false
    } 
  }
}

References

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/opensearchIssues and PRs that pertain to the opensearch service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions