Amazon OpenSearchServerless access policy resource
The following example specifies an OpenSearch Serverless access policy that provides full access to the resources within my-collection to the user test-user.
resource "awscc_opensearchserverless_access_policy" "os" {
name = "test-os-security-policy"
type = "data"
description = "Access for test-user"
policy = jsonencode([{
"Description" = "Access for test-user",
"Rules" = [
{
"ResourceType" = "index",
"Resource" = [
"index/*/*"
],
"Permission" = [
"aoss:*"
]
},
{
"ResourceType" = "collection",
"Resource" = [
"collection/my-collection"
],
"Permission" = [
"aoss:*"
]
}],
"Principal" = [
"arn:aws:iam::111122223333:user/test-user"
]
}])
}
name
(String) The name of the policypolicy
(String) The JSON policy document that is the content for the policytype
(String) The possible types for the access policydescription
(String) The description of the policyid
(String) Uniquely identifies the resource.Import is supported using the following syntax:
$ terraform import awscc_opensearchserverless_access_policy.example <resource ID>