Resource: aws_cloudsearch_domain

Provides an CloudSearch domain resource.

Terraform waits for the domain to become Active when applying a configuration.

Example Usage

resource "aws_cloudsearch_domain" "example" {
  name = "example-domain"

  scaling_parameters {
    desired_instance_type = "search.medium"
  }

  index_field {
    name            = "headline"
    type            = "text"
    search          = true
    return          = true
    sort            = true
    highlight       = false
    analysis_scheme = "_en_default_"
  }

  index_field {
    name   = "price"
    type   = "double"
    search = true
    facet  = true
    return = true
    sort   = true

    source_fields = "headline"
  }
}

Argument Reference

This resource supports the following arguments:

endpoint_options

This configuration block supports the following attributes:

scaling_parameters

This configuration block supports the following attributes:

index_field

This configuration block supports the following attributes:

Attribute Reference

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

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import CloudSearch Domains using the name. For example:

import {
  to = aws_cloudsearch_domain.example
  id = "example-domain"
}

Using terraform import, import CloudSearch Domains using the name. For example:

% terraform import aws_cloudsearch_domain.example example-domain