Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add VECTORSEARCH collection type to aws_opensearchserverless_collection documentation #32749

Conversation

joshjluo
Copy link
Contributor

Description

With the Go SDK update to aws/aws-sdk-go-v2/service/opensearchserverless v1.3.1, a new collection type of VECTORSEARCH was introduced. This updates the documentation for the aws_opensearchserverless_collection resource to include the new collection type.

Relations

Relates #32729

References

Output from Acceptance Testing

N/A

Output from Additional Testing

Created a VECTORSEARCH collection to verify functionality

# Require Terraform 0.12 or greater
terraform {
  required_version = ">= 0.12"
}

# Set AWS provider region
provider "aws" {
  region = "us-east-1"
}

# Creates an encryption security policy
resource "aws_opensearchserverless_security_policy" "encryption_policy" {
  name        = "vectorsearch-encryption-policy"
  type        = "encryption"
  description = "encryption policy"
  policy = jsonencode({
    Rules = [
      {
        Resource = [
          "collection/vectorsearch-collection"
        ],
        ResourceType = "collection"
      }
    ],
    AWSOwnedKey = true
  })
}

# Creates a collection
resource "aws_opensearchserverless_collection" "collection" {
  name = "vectorsearch-collection"
  type = "VECTORSEARCH"

  depends_on = [aws_opensearchserverless_security_policy.encryption_policy]
}
terraform apply

│ Warning: Provider development overrides are in effect

│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp/aws in ...

│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with
│ published releases.


Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_opensearchserverless_collection.collection will be created
  + resource "aws_opensearchserverless_collection" "collection" {
      + arn                 = (known after apply)
      + collection_endpoint = (known after apply)
      + dashboard_endpoint  = (known after apply)
      + id                  = (known after apply)
      + kms_key_arn         = (known after apply)
      + name                = "vectorsearch-collection"
      + tags_all            = {}
      + type                = "VECTORSEARCH"
    }

  # aws_opensearchserverless_security_policy.encryption_policy will be created
  + resource "aws_opensearchserverless_security_policy" "encryption_policy" {
      + description    = "encryption policy"
      + id             = (known after apply)
      + name           = "vectorsearch-encryption-policy"
      + policy         = jsonencode(
            {
              + AWSOwnedKey = true
              + Rules       = [
                  + {
                      + Resource     = [
                          + "collection/vectorsearch-collection",
                        ]
                      + ResourceType = "collection"
                    },
                ]
            }
        )
      + policy_version = (known after apply)
      + type           = "encryption"
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_opensearchserverless_security_policy.encryption_policy: Creating...
aws_opensearchserverless_security_policy.encryption_policy: Creation complete after 1s [id=vectorsearch-encryption-policy]
aws_opensearchserverless_collection.collection: Creating...
...
aws_opensearchserverless_collection.collection: Creation complete after 10m58s [id=...]

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service. needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. and removed size/XS Managed by automation to categorize the size of a PR. labels Jul 28, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jul 28, 2023
@ewbankkit
Copy link
Contributor

@joshjluo Thanks for the contribution 🎉 👏.

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

This functionality has been released in v5.11.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. partner Contribution from a partner. service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants