GetVpcEndpoint
The VPC Endpoint data source provides details about a specific VPC endpoint.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var s3 = Output.Create(Aws.Ec2.GetVpcEndpoint.InvokeAsync(new Aws.Ec2.GetVpcEndpointArgs
{
ServiceName = "com.amazonaws.us-west-2.s3",
VpcId = aws_vpc.Foo.Id,
}));
var privateS3 = new Aws.Ec2.VpcEndpointRouteTableAssociation("privateS3", new Aws.Ec2.VpcEndpointRouteTableAssociationArgs
{
RouteTableId = aws_route_table.Private.Id,
VpcEndpointId = s3.Apply(s3 => s3.Id),
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "com.amazonaws.us-west-2.s3"
opt1 := aws_vpc.Foo.Id
s3, err := ec2.LookupVpcEndpoint(ctx, &ec2.LookupVpcEndpointArgs{
ServiceName: &opt0,
VpcId: &opt1,
}, nil)
if err != nil {
return err
}
_, err = ec2.NewVpcEndpointRouteTableAssociation(ctx, "privateS3", &ec2.VpcEndpointRouteTableAssociationArgs{
RouteTableId: pulumi.String(aws_route_table.Private.Id),
VpcEndpointId: pulumi.String(s3.Id),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
s3 = aws.ec2.get_vpc_endpoint(service_name="com.amazonaws.us-west-2.s3",
vpc_id=aws_vpc["foo"]["id"])
private_s3 = aws.ec2.VpcEndpointRouteTableAssociation("privateS3",
route_table_id=aws_route_table["private"]["id"],
vpc_endpoint_id=s3.id)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Declare the data source
const s3 = aws_vpc_foo.id.apply(id => aws.ec2.getVpcEndpoint({
serviceName: "com.amazonaws.us-west-2.s3",
vpcId: id,
}, { async: true }));
const privateS3 = new aws.ec2.VpcEndpointRouteTableAssociation("private_s3", {
routeTableId: aws_route_table_private.id,
vpcEndpointId: s3.id!,
});Using GetVpcEndpoint
function getVpcEndpoint(args: GetVpcEndpointArgs, opts?: InvokeOptions): Promise<GetVpcEndpointResult>function get_vpc_endpoint(filters=None, id=None, service_name=None, state=None, tags=None, vpc_id=None, opts=None)func LookupVpcEndpoint(ctx *Context, args *LookupVpcEndpointArgs, opts ...InvokeOption) (*LookupVpcEndpointResult, error)Note: This function is named
LookupVpcEndpointin the Go SDK.
public static class GetVpcEndpoint {
public static Task<GetVpcEndpointResult> InvokeAsync(GetVpcEndpointArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Vpc Endpoint Filter Args> Custom filter block as described below.
- Id string
The ID of the specific VPC Endpoint to retrieve.
- Service
Name string The service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).- State string
The state of the specific VPC Endpoint to retrieve.
- Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the specific VPC Endpoint to retrieve.
- Vpc
Id string The ID of the VPC in which the specific VPC Endpoint is used.
- Filters
[]Get
Vpc Endpoint Filter Custom filter block as described below.
- Id string
The ID of the specific VPC Endpoint to retrieve.
- Service
Name string The service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).- State string
The state of the specific VPC Endpoint to retrieve.
- map[string]string
A map of tags, each pair of which must exactly match a pair on the specific VPC Endpoint to retrieve.
- Vpc
Id string The ID of the VPC in which the specific VPC Endpoint is used.
- filters
Get
Vpc Endpoint Filter[] Custom filter block as described below.
- id string
The ID of the specific VPC Endpoint to retrieve.
- service
Name string The service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).- state string
The state of the specific VPC Endpoint to retrieve.
- {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the specific VPC Endpoint to retrieve.
- vpc
Id string The ID of the VPC in which the specific VPC Endpoint is used.
- filters
List[Get
Vpc Endpoint Filter] Custom filter block as described below.
- id str
The ID of the specific VPC Endpoint to retrieve.
- service_
name str The service name of the specific VPC Endpoint to retrieve. For AWS services the service name is usually in the form
com.amazonaws.<region>.<service>(the SageMaker Notebook service is an exception to this rule, the service name is in the formaws.sagemaker.<region>.notebook).- state str
The state of the specific VPC Endpoint to retrieve.
- Dict[str, str]
A map of tags, each pair of which must exactly match a pair on the specific VPC Endpoint to retrieve.
- vpc_
id str The ID of the VPC in which the specific VPC Endpoint is used.
GetVpcEndpoint Result
The following output properties are available:
- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint.
- Cidr
Blocks List<string> The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type
Gateway.- Dns
Entries List<GetVpc Endpoint Dns Entry> The DNS entries for the VPC Endpoint. Applicable for endpoints of type
Interface. DNS blocks are documented below.- Id string
- Network
Interface List<string>Ids One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type
Interface.- Owner
Id string The ID of the AWS account that owns the VPC endpoint.
- Policy string
The policy document associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- Prefix
List stringId The prefix list ID of the exposed AWS service. Applicable for endpoints of type
Gateway.- Private
Dns boolEnabled Whether or not the VPC is associated with a private hosted zone -
trueorfalse. Applicable for endpoints of typeInterface.- Requester
Managed bool Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.- Route
Table List<string>Ids One or more route tables associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- Security
Group List<string>Ids One or more security groups associated with the network interfaces. Applicable for endpoints of type
Interface.- Service
Name string - State string
- Subnet
Ids List<string> One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type
Interface.- Dictionary<string, string>
- Vpc
Endpoint stringType The VPC Endpoint type,
GatewayorInterface.- Vpc
Id string - Filters
List<Get
Vpc Endpoint Filter>
- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint.
- Cidr
Blocks []string The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type
Gateway.- Dns
Entries []GetVpc Endpoint Dns Entry The DNS entries for the VPC Endpoint. Applicable for endpoints of type
Interface. DNS blocks are documented below.- Id string
- Network
Interface []stringIds One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type
Interface.- Owner
Id string The ID of the AWS account that owns the VPC endpoint.
- Policy string
The policy document associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- Prefix
List stringId The prefix list ID of the exposed AWS service. Applicable for endpoints of type
Gateway.- Private
Dns boolEnabled Whether or not the VPC is associated with a private hosted zone -
trueorfalse. Applicable for endpoints of typeInterface.- Requester
Managed bool Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.- Route
Table []stringIds One or more route tables associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- Security
Group []stringIds One or more security groups associated with the network interfaces. Applicable for endpoints of type
Interface.- Service
Name string - State string
- Subnet
Ids []string One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type
Interface.- map[string]string
- Vpc
Endpoint stringType The VPC Endpoint type,
GatewayorInterface.- Vpc
Id string - Filters
[]Get
Vpc Endpoint Filter
- arn string
The Amazon Resource Name (ARN) of the VPC endpoint.
- cidr
Blocks string[] The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type
Gateway.- dns
Entries GetVpc Endpoint Dns Entry[] The DNS entries for the VPC Endpoint. Applicable for endpoints of type
Interface. DNS blocks are documented below.- id string
- network
Interface string[]Ids One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type
Interface.- owner
Id string The ID of the AWS account that owns the VPC endpoint.
- policy string
The policy document associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- prefix
List stringId The prefix list ID of the exposed AWS service. Applicable for endpoints of type
Gateway.- private
Dns booleanEnabled Whether or not the VPC is associated with a private hosted zone -
trueorfalse. Applicable for endpoints of typeInterface.- requester
Managed boolean Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.- route
Table string[]Ids One or more route tables associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- security
Group string[]Ids One or more security groups associated with the network interfaces. Applicable for endpoints of type
Interface.- service
Name string - state string
- subnet
Ids string[] One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type
Interface.- {[key: string]: string}
- vpc
Endpoint stringType The VPC Endpoint type,
GatewayorInterface.- vpc
Id string - filters
Get
Vpc Endpoint Filter[]
- arn str
The Amazon Resource Name (ARN) of the VPC endpoint.
- cidr_
blocks List[str] The list of CIDR blocks for the exposed AWS service. Applicable for endpoints of type
Gateway.- dns_
entries List[GetVpc Endpoint Dns Entry] The DNS entries for the VPC Endpoint. Applicable for endpoints of type
Interface. DNS blocks are documented below.- id str
- network_
interface_ List[str]ids One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type
Interface.- owner_
id str The ID of the AWS account that owns the VPC endpoint.
- policy str
The policy document associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- prefix_
list_ strid The prefix list ID of the exposed AWS service. Applicable for endpoints of type
Gateway.- private_
dns_ boolenabled Whether or not the VPC is associated with a private hosted zone -
trueorfalse. Applicable for endpoints of typeInterface.- requester_
managed bool Whether or not the VPC Endpoint is being managed by its service -
trueorfalse.- route_
table_ List[str]ids One or more route tables associated with the VPC Endpoint. Applicable for endpoints of type
Gateway.- security_
group_ List[str]ids One or more security groups associated with the network interfaces. Applicable for endpoints of type
Interface.- service_
name str - state str
- subnet_
ids List[str] One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type
Interface.- Dict[str, str]
- vpc_
endpoint_ strtype The VPC Endpoint type,
GatewayorInterface.- vpc_
id str - filters
List[Get
Vpc Endpoint Filter]
Supporting Types
GetVpcEndpointDnsEntry
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Dns
Name string The DNS name.
- Hosted
Zone stringId The ID of the private hosted zone.
- Dns
Name string The DNS name.
- Hosted
Zone stringId The ID of the private hosted zone.
- dns
Name string The DNS name.
- hosted
Zone stringId The ID of the private hosted zone.
- dns_
name str The DNS name.
- hosted_
zone_ strid The ID of the private hosted zone.
GetVpcEndpointFilter
- Name string
The name of the field to filter by, as defined by the underlying AWS API.
- Values List<string>
Set of values that are accepted for the given field. A VPC Endpoint will be selected if any one of the given values matches.
- Name string
The name of the field to filter by, as defined by the underlying AWS API.
- Values []string
Set of values that are accepted for the given field. A VPC Endpoint will be selected if any one of the given values matches.
- name string
The name of the field to filter by, as defined by the underlying AWS API.
- values string[]
Set of values that are accepted for the given field. A VPC Endpoint will be selected if any one of the given values matches.
- name str
The name of the field to filter by, as defined by the underlying AWS API.
- values List[str]
Set of values that are accepted for the given field. A VPC Endpoint will be selected if any one of the given values matches.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.