Skip to content

Resource: awsOpensearchOutboundConnection

Manages an AWS Opensearch Outbound Connection.

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");
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,
  },
});

Argument Reference

The following arguments are supported:

  • connectionAlias - (Required, Forces new resource) Specifies the connection alias that will be used by the customer for this connection.
  • localDomainInfo - (Required, Forces new resource) Configuration block for the local Opensearch domain.
  • remoteDomainInfo - (Required, Forces new resource) Configuration block for the remote Opensearch domain.

localDomainInfo

  • ownerId - (Required, Forces new resource) The Account ID of the owner of the local domain.
  • domainName - (Required, Forces new resource) The name of the local domain.
  • region - (Required, Forces new resource) The region of the local domain.

remoteDomainInfo

  • ownerId - (Required, Forces new resource) The Account ID of the owner of the remote domain.
  • domainName - (Required, Forces new resource) The name of the remote domain.
  • region - (Required, Forces new resource) The region of the remote domain.

Attributes Reference

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

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

Import

AWS Opensearch Outbound Connections can be imported by using the Outbound Connection ID, e.g.,

$ terraform import aws_opensearch_outbound_connection.foo connection-id