1. Packages
  2. AWS
  3. API Docs
  4. opensearch
  5. VpcEndpoint
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

aws.opensearch.VpcEndpoint

Explore with Pulumi AI

aws logo
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

    Manages an AWS Opensearch VPC Endpoint. Creates an Amazon OpenSearch Service-managed VPC endpoint.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const foo = new aws.opensearch.VpcEndpoint("foo", {
        domainArn: domain1.arn,
        vpcOptions: {
            securityGroupIds: [
                test.id,
                test2.id,
            ],
            subnetIds: [
                testAwsSubnet.id,
                test2AwsSubnet.id,
            ],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    foo = aws.opensearch.VpcEndpoint("foo",
        domain_arn=domain1["arn"],
        vpc_options={
            "security_group_ids": [
                test["id"],
                test2["id"],
            ],
            "subnet_ids": [
                test_aws_subnet["id"],
                test2_aws_subnet["id"],
            ],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opensearch.NewVpcEndpoint(ctx, "foo", &opensearch.VpcEndpointArgs{
    			DomainArn: pulumi.Any(domain1.Arn),
    			VpcOptions: &opensearch.VpcEndpointVpcOptionsArgs{
    				SecurityGroupIds: pulumi.StringArray{
    					test.Id,
    					test2.Id,
    				},
    				SubnetIds: pulumi.StringArray{
    					testAwsSubnet.Id,
    					test2AwsSubnet.Id,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Aws.OpenSearch.VpcEndpoint("foo", new()
        {
            DomainArn = domain1.Arn,
            VpcOptions = new Aws.OpenSearch.Inputs.VpcEndpointVpcOptionsArgs
            {
                SecurityGroupIds = new[]
                {
                    test.Id,
                    test2.Id,
                },
                SubnetIds = new[]
                {
                    testAwsSubnet.Id,
                    test2AwsSubnet.Id,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.opensearch.VpcEndpoint;
    import com.pulumi.aws.opensearch.VpcEndpointArgs;
    import com.pulumi.aws.opensearch.inputs.VpcEndpointVpcOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var foo = new VpcEndpoint("foo", VpcEndpointArgs.builder()
                .domainArn(domain1.arn())
                .vpcOptions(VpcEndpointVpcOptionsArgs.builder()
                    .securityGroupIds(                
                        test.id(),
                        test2.id())
                    .subnetIds(                
                        testAwsSubnet.id(),
                        test2AwsSubnet.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: aws:opensearch:VpcEndpoint
        properties:
          domainArn: ${domain1.arn}
          vpcOptions:
            securityGroupIds:
              - ${test.id}
              - ${test2.id}
            subnetIds:
              - ${testAwsSubnet.id}
              - ${test2AwsSubnet.id}
    

    Create VpcEndpoint Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpcEndpoint(name: string, args: VpcEndpointArgs, opts?: CustomResourceOptions);
    @overload
    def VpcEndpoint(resource_name: str,
                    args: VpcEndpointArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcEndpoint(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    domain_arn: Optional[str] = None,
                    vpc_options: Optional[VpcEndpointVpcOptionsArgs] = None)
    func NewVpcEndpoint(ctx *Context, name string, args VpcEndpointArgs, opts ...ResourceOption) (*VpcEndpoint, error)
    public VpcEndpoint(string name, VpcEndpointArgs args, CustomResourceOptions? opts = null)
    public VpcEndpoint(String name, VpcEndpointArgs args)
    public VpcEndpoint(String name, VpcEndpointArgs args, CustomResourceOptions options)
    
    type: aws:opensearch:VpcEndpoint
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpcEndpointArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VpcEndpointArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VpcEndpointArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcEndpointArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcEndpointArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint = new Aws.OpenSearch.VpcEndpoint("examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint", new()
    {
        DomainArn = "string",
        VpcOptions = new Aws.OpenSearch.Inputs.VpcEndpointVpcOptionsArgs
        {
            SubnetIds = new[]
            {
                "string",
            },
            AvailabilityZones = new[]
            {
                "string",
            },
            SecurityGroupIds = new[]
            {
                "string",
            },
            VpcId = "string",
        },
    });
    
    example, err := opensearch.NewVpcEndpoint(ctx, "examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint", &opensearch.VpcEndpointArgs{
    	DomainArn: pulumi.String("string"),
    	VpcOptions: &opensearch.VpcEndpointVpcOptionsArgs{
    		SubnetIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		AvailabilityZones: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SecurityGroupIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		VpcId: pulumi.String("string"),
    	},
    })
    
    var examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint = new VpcEndpoint("examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint", VpcEndpointArgs.builder()
        .domainArn("string")
        .vpcOptions(VpcEndpointVpcOptionsArgs.builder()
            .subnetIds("string")
            .availabilityZones("string")
            .securityGroupIds("string")
            .vpcId("string")
            .build())
        .build());
    
    examplevpc_endpoint_resource_resource_from_opensearchvpc_endpoint = aws.opensearch.VpcEndpoint("examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint",
        domain_arn="string",
        vpc_options={
            "subnetIds": ["string"],
            "availabilityZones": ["string"],
            "securityGroupIds": ["string"],
            "vpcId": "string",
        })
    
    const examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint = new aws.opensearch.VpcEndpoint("examplevpcEndpointResourceResourceFromOpensearchvpcEndpoint", {
        domainArn: "string",
        vpcOptions: {
            subnetIds: ["string"],
            availabilityZones: ["string"],
            securityGroupIds: ["string"],
            vpcId: "string",
        },
    });
    
    type: aws:opensearch:VpcEndpoint
    properties:
        domainArn: string
        vpcOptions:
            availabilityZones:
                - string
            securityGroupIds:
                - string
            subnetIds:
                - string
            vpcId: string
    

    VpcEndpoint Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VpcEndpoint resource accepts the following input properties:

    DomainArn string
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    VpcOptions VpcEndpointVpcOptions
    Options to specify the subnets and security groups for the endpoint.
    DomainArn string
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    VpcOptions VpcEndpointVpcOptionsArgs
    Options to specify the subnets and security groups for the endpoint.
    domainArn String
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    vpcOptions VpcEndpointVpcOptions
    Options to specify the subnets and security groups for the endpoint.
    domainArn string
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    vpcOptions VpcEndpointVpcOptions
    Options to specify the subnets and security groups for the endpoint.
    domain_arn str
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    vpc_options VpcEndpointVpcOptionsArgs
    Options to specify the subnets and security groups for the endpoint.
    domainArn String
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    vpcOptions Property Map
    Options to specify the subnets and security groups for the endpoint.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcEndpoint resource produces the following output properties:

    Endpoint string
    The connection endpoint ID for connecting to the domain.
    Id string
    The provider-assigned unique ID for this managed resource.
    Endpoint string
    The connection endpoint ID for connecting to the domain.
    Id string
    The provider-assigned unique ID for this managed resource.
    endpoint String
    The connection endpoint ID for connecting to the domain.
    id String
    The provider-assigned unique ID for this managed resource.
    endpoint string
    The connection endpoint ID for connecting to the domain.
    id string
    The provider-assigned unique ID for this managed resource.
    endpoint str
    The connection endpoint ID for connecting to the domain.
    id str
    The provider-assigned unique ID for this managed resource.
    endpoint String
    The connection endpoint ID for connecting to the domain.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcEndpoint Resource

    Get an existing VpcEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VpcEndpointState, opts?: CustomResourceOptions): VpcEndpoint
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain_arn: Optional[str] = None,
            endpoint: Optional[str] = None,
            vpc_options: Optional[VpcEndpointVpcOptionsArgs] = None) -> VpcEndpoint
    func GetVpcEndpoint(ctx *Context, name string, id IDInput, state *VpcEndpointState, opts ...ResourceOption) (*VpcEndpoint, error)
    public static VpcEndpoint Get(string name, Input<string> id, VpcEndpointState? state, CustomResourceOptions? opts = null)
    public static VpcEndpoint get(String name, Output<String> id, VpcEndpointState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DomainArn string
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    Endpoint string
    The connection endpoint ID for connecting to the domain.
    VpcOptions VpcEndpointVpcOptions
    Options to specify the subnets and security groups for the endpoint.
    DomainArn string
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    Endpoint string
    The connection endpoint ID for connecting to the domain.
    VpcOptions VpcEndpointVpcOptionsArgs
    Options to specify the subnets and security groups for the endpoint.
    domainArn String
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    endpoint String
    The connection endpoint ID for connecting to the domain.
    vpcOptions VpcEndpointVpcOptions
    Options to specify the subnets and security groups for the endpoint.
    domainArn string
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    endpoint string
    The connection endpoint ID for connecting to the domain.
    vpcOptions VpcEndpointVpcOptions
    Options to specify the subnets and security groups for the endpoint.
    domain_arn str
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    endpoint str
    The connection endpoint ID for connecting to the domain.
    vpc_options VpcEndpointVpcOptionsArgs
    Options to specify the subnets and security groups for the endpoint.
    domainArn String
    Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
    endpoint String
    The connection endpoint ID for connecting to the domain.
    vpcOptions Property Map
    Options to specify the subnets and security groups for the endpoint.

    Supporting Types

    VpcEndpointVpcOptions, VpcEndpointVpcOptionsArgs

    SubnetIds List<string>
    A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.
    AvailabilityZones List<string>
    SecurityGroupIds List<string>
    The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.
    VpcId string
    SubnetIds []string
    A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.
    AvailabilityZones []string
    SecurityGroupIds []string
    The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.
    VpcId string
    subnetIds List<String>
    A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.
    availabilityZones List<String>
    securityGroupIds List<String>
    The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.
    vpcId String
    subnetIds string[]
    A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.
    availabilityZones string[]
    securityGroupIds string[]
    The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.
    vpcId string
    subnet_ids Sequence[str]
    A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.
    availability_zones Sequence[str]
    security_group_ids Sequence[str]
    The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.
    vpc_id str
    subnetIds List<String>
    A list of subnet IDs associated with the VPC endpoints for the domain. If your domain uses multiple Availability Zones, you need to provide two subnet IDs, one per zone. Otherwise, provide only one.
    availabilityZones List<String>
    securityGroupIds List<String>
    The list of security group IDs associated with the VPC endpoints for the domain. If you do not provide a security group ID, OpenSearch Service uses the default security group for the VPC.
    vpcId String

    Import

    Using pulumi import, import OpenSearch VPC endpoint connections using the id. For example:

    $ pulumi import aws:opensearch/vpcEndpoint:VpcEndpoint example endpoint-id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi