Skip to content

Resource: awsOpensearchInboundConnectionAccepter

Manages an AWS Opensearch Inbound Connection Accepter. If connecting domains from different AWS accounts, ensure that the accepter is configured to use the AWS account where the remote opensearch domain exists.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsCallerIdentityCurrent =
  new aws.dataAwsCallerIdentity.DataAwsCallerIdentity(this, "current", {});
const dataAwsRegionCurrent = new aws.dataAwsRegion.DataAwsRegion(
  this,
  "current_1",
  {}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAwsRegionCurrent.overrideLogicalId("current");
const awsOpensearchOutboundConnectionFoo =
  new aws.opensearchOutboundConnection.OpensearchOutboundConnection(
    this,
    "foo",
    {
      connectionAlias: "outbound_connection",
      localDomainInfo: {
        domainName: "${aws_opensearch_domain.local_domain.domain_name}",
        ownerId: dataAwsCallerIdentityCurrent.accountId,
        region: dataAwsRegionCurrent.name,
      },
      remoteDomainInfo: {
        domainName: "${aws_opensearch_domain.remote_domain.domain_name}",
        ownerId: dataAwsCallerIdentityCurrent.accountId,
        region: dataAwsRegionCurrent.name,
      },
    }
  );
const awsOpensearchInboundConnectionAccepterFoo =
  new aws.opensearchInboundConnectionAccepter.OpensearchInboundConnectionAccepter(
    this,
    "foo_3",
    {
      connectionId: awsOpensearchOutboundConnectionFoo.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsOpensearchInboundConnectionAccepterFoo.overrideLogicalId("foo");

Argument Reference

The following arguments are supported:

  • connectionId - (Required, Forces new resource) Specifies the ID of the connection to accept.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The Id of the connection to accept.
  • connectionStatus - Status of the connection request.

Import

AWS Opensearch Inbound Connection Accepters can be imported by using the Inbound Connection ID, e.g.,

$ terraform import aws_opensearch_inbound_connection_accepter.foo connection-id