Resource: awsCloudsearchDomain
Provides an CloudSearch domain resource.
Terraform waits for the domain to become active
when applying a configuration.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.cloudsearchDomain.CloudsearchDomain(this, "example", {
indexField: [
{
analysisScheme: "_en_default_",
highlight: false,
name: "headline",
return: true,
search: true,
sort: true,
type: "text",
},
{
facet: true,
name: "price",
return: true,
search: true,
sort: true,
sourceFields: "headline",
type: "double",
},
],
name: "example-domain",
scalingParameters: {
desiredInstanceType: "search.medium",
},
});
Argument Reference
The following arguments are supported:
endpointOptions
- (Optional) Domain endpoint options. Documented below.indexField
- (Optional) The index fields for documents added to the domain. Documented below.multiAz
- (Optional) Whether or not to maintain extra instances for the domain in a second Availability Zone to ensure high availability.name
- (Required) The name of the CloudSearch domain.scalingParameters
- (Optional) Domain scaling parameters. Documented below.
endpointOptions
This configuration block supports the following attributes:
enforceHttps
- (Optional) Enables or disables the requirement that all requests to the domain arrive over HTTPS.tlsSecurityPolicy
- (Optional) The minimum required TLS version. See the AWS documentation for valid values.
scalingParameters
This configuration block supports the following attributes:
desiredInstanceType
- (Optional) The instance type that you want to preconfigure for your domain. See the AWS documentation for valid values.desiredPartitionCount
- (Optional) The number of partitions you want to preconfigure for your domain. Only valid when you selectsearch2Xlarge
as the instance type.desiredReplicationCount
- (Optional) The number of replicas you want to preconfigure for each index partition.
indexField
This configuration block supports the following attributes:
name
- (Required) A unique name for the field. Field names must begin with a letter and be at least 3 and no more than 64 characters long. The allowed characters are:a
-z
(lower-case letters),0
-9
, and_
(underscore). The namescore
is reserved and cannot be used as a field name.type
- (Required) The field type. Valid values:date
,dateArray
,double
,doubleArray
,int
,intArray
,literal
,literalArray
,text
,textArray
.analysisScheme
- (Optional) The analysis scheme you want to use for atext
field. The analysis scheme specifies the language-specific text processing options that are used during indexing.defaultValue
- (Optional) The default value for the field. This value is used when no value is specified for the field in the document data.facet
- (Optional) You can get facet information by enabling this.highlight
- (Optional) You can highlight information.return
- (Optional) You can enable returning the value of all searchable fields.search
- (Optional) You can set whether this index should be searchable or not.sort
- (Optional) You can enable the property to be sortable.sourceFields
- (Optional) A comma-separated list of source fields to map to the field. Specifying a source field copies data from one field to another, enabling you to use the same source data in different ways by configuring different options for the fields.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- The domain's ARN.documentServiceEndpoint
- The service endpoint for updating documents in a search domain.domainId
- An internally generated unique identifier for the domain.searchServiceEndpoint
- The service endpoint for requesting search results from a search domain.
Timeouts
create
- (Default30M
)update
- (Default30M
)delete
- (Default20M
)
Import
CloudSearch Domains can be imported using the name
, e.g.,