aws.opensearch.VpcEndpoint
Explore with Pulumi AI
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={
"subnet_ids": ["string"],
"availability_zones": ["string"],
"security_group_ids": ["string"],
"vpc_id": "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpcEndpoint resource accepts the following input properties:
- Domain
Arn string - Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
- Vpc
Options VpcEndpoint Vpc Options - Options to specify the subnets and security groups for the endpoint.
- Domain
Arn string - Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
- Vpc
Options VpcEndpoint Vpc Options Args - Options to specify the subnets and security groups for the endpoint.
- domain
Arn String - Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
- vpc
Options VpcEndpoint Vpc Options - Options to specify the subnets and security groups for the endpoint.
- domain
Arn string - Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
- vpc
Options VpcEndpoint Vpc Options - 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 VpcEndpoint Vpc Options Args - Options to specify the subnets and security groups for the endpoint.
- domain
Arn String - Specifies the Amazon Resource Name (ARN) of the domain to create the endpoint for
- vpc
Options 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:
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.
- Domain
Arn 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.
- Vpc
Options VpcEndpoint Vpc Options - Options to specify the subnets and security groups for the endpoint.
- Domain
Arn 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.
- Vpc
Options VpcEndpoint Vpc Options Args - Options to specify the subnets and security groups for the endpoint.
- domain
Arn 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.
- vpc
Options VpcEndpoint Vpc Options - Options to specify the subnets and security groups for the endpoint.
- domain
Arn 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.
- vpc
Options VpcEndpoint Vpc Options - 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 VpcEndpoint Vpc Options Args - Options to specify the subnets and security groups for the endpoint.
- domain
Arn 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.
- vpc
Options Property Map - Options to specify the subnets and security groups for the endpoint.
Supporting Types
VpcEndpointVpcOptions, VpcEndpointVpcOptionsArgs
- Subnet
Ids 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.
- Availability
Zones List<string> - Security
Group List<string>Ids - 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 string
- Subnet
Ids []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.
- Availability
Zones []string - Security
Group []stringIds - 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 string
- subnet
Ids 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.
- availability
Zones List<String> - security
Group List<String>Ids - 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 String
- subnet
Ids 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.
- availability
Zones string[] - security
Group string[]Ids - 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 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_ Sequence[str]ids - 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
- subnet
Ids 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.
- availability
Zones List<String> - security
Group List<String>Ids - 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 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.