Terraform module which creates AWS OpenSearch collection resources.
See examples directory for working examples to reference:
module "opensearch_serverless" {
source = "terraform-aws-modules/opensearch/aws//modules/collection"
name = "example"
description = "Example OpenSearch Serverless collection"
type = "SEARCH"
create_access_policy = true
create_network_policy = true
network_policy = {
AllowFromPublic = false
SourceVPCEs = [
"vpce-050f79086ee71ac05"
]
}
tags = {
Terraform = "true"
Environment = "dev"
}
}Examples codified under the examples are intended to give users references for how to use the module(s) as well as testing/validating changes to the source code of the module. If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow maintainers to test your changes and to keep the examples up to date for users. Thank you!
| Name | Version |
|---|---|
| terraform | >= 1.10 |
| aws | >= 6.0 |
| Name | Version |
|---|---|
| aws | >= 6.0 |
No modules.
| Name | Type |
|---|---|
| aws_opensearchserverless_access_policy.this | resource |
| aws_opensearchserverless_collection.this | resource |
| aws_opensearchserverless_lifecycle_policy.this | resource |
| aws_opensearchserverless_security_policy.encryption | resource |
| aws_opensearchserverless_security_policy.network | resource |
| aws_caller_identity.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| access_policy | Access policy to apply to the collection | any |
{} |
no |
| access_policy_collection_permissions | Access policy permissions for the collection | list(string) |
[ |
no |
| access_policy_description | Description of the access policy | string |
null |
no |
| access_policy_index_permissions | Access policy permissions for the collection index | list(string) |
[ |
no |
| access_policy_name | Name of the access policy | string |
null |
no |
| access_policy_principals | Access policy principals | list(string) |
[] |
no |
| create | Determines whether resources will be created (affects all resources) | bool |
true |
no |
| create_access_policy | Determines whether an access policy will be created | bool |
false |
no |
| create_encryption_policy | Determines whether an encryption policy will be created | bool |
true |
no |
| create_lifecycle_policy | Determines whether an lifecycle policy will be created | bool |
false |
no |
| create_network_policy | Determines whether an network policy will be created | bool |
false |
no |
| description | Description of the collection | string |
null |
no |
| encryption_policy | Encryption policy to apply to the collection | any |
{} |
no |
| encryption_policy_description | Description of the encryption policy | string |
null |
no |
| encryption_policy_name | Name of the encryption policy | string |
null |
no |
| lifecycle_policy_description | Description of the lifecycle policy | string |
null |
no |
| lifecycle_policy_min_index_retention | The minimum period, in days (d) or hours (h), to retain the document in the index. The lower bound is 24h and the upper bound is 3650d |
string |
null |
no |
| lifecycle_policy_name | Name of the lifecycle policy | string |
null |
no |
| lifecycle_policy_no_min_index_retention | If true, OpenSearch Serverless retains documents indefinitely | bool |
null |
no |
| name | Name of the collection | string |
"" |
no |
| network_policy | Network policy to apply to the collection | any |
{} |
no |
| network_policy_description | Description of the network policy | string |
null |
no |
| network_policy_name | Name of the network policy | string |
null |
no |
| region | Region where this resource will be managed. Defaults to the Region set in the provider configuration | string |
null |
no |
| standby_replicas | Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED. | string |
null |
no |
| tags | A map of tags to add to all resources | map(string) |
{} |
no |
| timeouts | Create and delete timeout configurations for the collection | map(string) |
{} |
no |
| type | Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES |
string |
null |
no |
| Name | Description |
|---|---|
| access_policy | The JSON policy document of the access policy |
| access_policy_version | The version of the access policy |
| arn | Amazon Resource Name (ARN) of the collection |
| dashboard_endpoint | Collection-specific endpoint used to access OpenSearch Dashboards |
| encryption_policy | The JSON policy document of the encryption policy |
| encryption_policy_version | The version of the encryption policy |
| endpoint | Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection |
| id | Unique identifier for the collection |
| kms_key_arn | The ARN of the Amazon Web Services KMS key used to encrypt the collection |
| lifecycle_policy | The JSON policy document of the lifecycle policy |
| lifecycle_policy_version | The version of the lifecycle policy |
| name | Name of the collection |
| network_policy | The JSON policy document of the network policy |
| network_policy_version | The version of the network policy |
Apache-2.0 Licensed. See LICENSE.