Skip to content

[Docs]: Terraform Import for OpenSearch VPC Endpoint Access #40671

@aiell0

Description

@aiell0

Documentation Link

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/opensearch_authorize_vpc_endpoint_access#import

Description

I am attempting to import some VPC authorizations for Opensearch and am confused on how to find the resource ID. The documentation says it is in the form authorize_vpc_endpoint_access-id-12345678. I do not know where to find the ID at the end. I assumed it was the account ID and when I try that I get the following error in my Terraform:

│ Error: setting AWS OpenSearch Authorize Vpc Endpoint Access ("authorize_vpc_endpoint_access-id-<account_id>"): operation error OpenSearch: ListVpcEndpointAccess, https response error StatusCode: 400, RequestID: 3348ce8d-3ee2-4997-a3b4-78403972c00f, api error ValidationException: 2 validation errors detected: Value 'authorize_vpc_endpoint_access-id-<account_id>' at 'domainName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-z][a-z0-9\-]+; Value 'authorize_vpc_endpoint_access-id-<account_id>' at 'domainName' failed to satisfy constraint: Member must have length less than or equal to 28
│ 
│ operation error OpenSearch: ListVpcEndpointAccess, https response error
│ StatusCode: 400, RequestID: 3348ce8d-3ee2-4997-a3b4-78403972c00f, api error
│ ValidationException: 2 validation errors detected: Value
│ 'authorize_vpc_endpoint_access-id-<account_id>' at 'domainName' failed to
│ satisfy constraint: Member must satisfy regular expression pattern:
│ [a-z][a-z0-9\-]+; Value 'authorize_vpc_endpoint_access-id-<account_id>' at
│ 'domainName' failed to satisfy constraint: Member must have length less
│ than or equal to 28
╵
Operation failed: failed running terraform plan (exit 1)

What is this ID supposed to be? And can that be referenced correctly in the docs?

References

Maybe related to #40614?

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.documentationIntroduces or discusses updates to documentation.resource-importPertains to issues importing resources.service/opensearchIssues and PRs that pertain to the opensearch service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions