Resource: aws_elasticsearch_domain_saml_options

Manages SAML authentication options for an AWS Elasticsearch Domain.

Example Usage

Basic Usage

resource "aws_elasticsearch_domain" "example" {
  domain_name           = "example"
  elasticsearch_version = "1.5"

  cluster_config {
    instance_type = "r4.large.elasticsearch"
  }

  snapshot_options {
    automated_snapshot_start_hour = 23
  }

  tags = {
    Domain = "TestDomain"
  }
}

resource "aws_elasticsearch_domain_saml_options" "example" {
  domain_name = aws_elasticsearch_domain.example.domain_name
  saml_options {
    enabled = true
    idp {
      entity_id        = "https://example.com"
      metadata_content = file("./saml-metadata.xml")
    }
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

saml_options

idp

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Elasticsearch domains using the domain_name. For example:

import {
  to = aws_elasticsearch_domain_saml_options.example
  id = "domain_name"
}

Using terraform import, import Elasticsearch domains using the domain_name. For example:

% terraform import aws_elasticsearch_domain_saml_options.example domain_name