Skip to content

[Bug] Description not supported in the elasticstack_elasticsearch_security_role resource #822

@wandergeek

Description

@wandergeek

Describe the bug
The description field does not appear to be supported by the elasticstack_elasticsearch_security_role resource, when the API docs say it should be: https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html#security-api-put-role-request-body.

To Reproduce
Steps to reproduce the behavior:

  1. Add the following resource:
resource "elasticstack_elasticsearch_security_role" "full_access" {
  name        = "testrole"
  cluster     = ["all"]
  description = "Grants full access to all management features within the cluster."

  indices {
    names      = ["index1", "index2"]
    privileges = ["all"]
    field_security {
      grant = ["title", "body"]
    }
    query = "{\"match\": {\"title\": \"foo\"}}"
  }

  applications {
    application = "myapp"
    privileges  = ["admin", "read"]
    resources   = ["*"]
  }

  run_as = ["other_user"]

  metadata = jsonencode({
    version = 1
  })
}
  1. terraform plan
  2. error:
❯ terraform plan
╷
│ Error: Unsupported argument
│ 
│   on test.tf line 26, in resource "elasticstack_elasticsearch_security_role" "full_access":
│   26:   description = "Grants full access to all management features within the cluster."
│ 
│ An argument named "description" is not expected here.
╵

Expected behavior
Description is used and applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions