Amazon OpenSearchServerless collection resource
# Create a Collection
resource "awscc_opensearchserverless_collection" "simple_collection" {
name = "awscc-collection"
depends_on = [
awscc_opensearchserverless_security_policy.security_policy
]
}
# Encryption SecurityPolicy
resource "awscc_opensearchserverless_security_policy" "security_policy" {
name = "awscc-security-policy"
description = "created via awscc"
type = "encryption"
policy = jsonencode({
"Rules" = [
{
"ResourceType" = "collection",
"Resource" = [
"collection/awscc-collection"
]
}
],
"AWSOwnedKey" = true
})
}
name
(String) The name of the collection.The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters
description
(String) The description of the collectionstandby_replicas
(String) The possible standby replicas for the collectiontags
(Attributes List) List of tags to be added to the resource (see below for nested schema)type
(String) The possible types for the collectionarn
(String) The Amazon Resource Name (ARN) of the collection.collection_endpoint
(String) The endpoint for the collection.collection_id
(String) The identifier of the collectiondashboard_endpoint
(String) The OpenSearch Dashboards endpoint for the collection.id
(String) Uniquely identifies the resource.tags
Required:
key
(String) The key in the key-value pairvalue
(String) The value in the key-value pairImport is supported using the following syntax:
$ terraform import awscc_opensearchserverless_collection.example <resource ID>