Vpc Endpoint Service
Provides a VPC Endpoint Service resource. Service consumers can create an Interface VPC Endpoint to connect to the service.
NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals: This provider provides both a standalone VPC Endpoint Service Allowed Principal resource and a VPC Endpoint Service resource with an
allowed_principals
attribute. Do not use the same principal ARN in both a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict and will overwrite the association.
Example Usage
Network Load Balancers
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpointService("example", {
acceptanceRequired: false,
networkLoadBalancerArns: [exampleAwsLb.arn],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.VpcEndpointService("example",
acceptance_required=False,
network_load_balancer_arns=[example_aws_lb["arn"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2.VpcEndpointService("example", new()
{
AcceptanceRequired = false,
NetworkLoadBalancerArns = new[]
{
exampleAwsLb.Arn,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
AcceptanceRequired: pulumi.Bool(false),
NetworkLoadBalancerArns: pulumi.StringArray{
exampleAwsLb.Arn,
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcEndpointService;
import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
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 example = new VpcEndpointService("example", VpcEndpointServiceArgs.builder()
.acceptanceRequired(false)
.networkLoadBalancerArns(exampleAwsLb.arn())
.build());
}
}
resources:
example:
type: aws:ec2:VpcEndpointService
properties:
acceptanceRequired: false
networkLoadBalancerArns:
- ${exampleAwsLb.arn}
Gateway Load Balancers
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpointService("example", {
acceptanceRequired: false,
gatewayLoadBalancerArns: [exampleAwsLb.arn],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.VpcEndpointService("example",
acceptance_required=False,
gateway_load_balancer_arns=[example_aws_lb["arn"]])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2.VpcEndpointService("example", new()
{
AcceptanceRequired = false,
GatewayLoadBalancerArns = new[]
{
exampleAwsLb.Arn,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
AcceptanceRequired: pulumi.Bool(false),
GatewayLoadBalancerArns: pulumi.StringArray{
exampleAwsLb.Arn,
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcEndpointService;
import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
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 example = new VpcEndpointService("example", VpcEndpointServiceArgs.builder()
.acceptanceRequired(false)
.gatewayLoadBalancerArns(exampleAwsLb.arn())
.build());
}
}
resources:
example:
type: aws:ec2:VpcEndpointService
properties:
acceptanceRequired: false
gatewayLoadBalancerArns:
- ${exampleAwsLb.arn}
Import
Using pulumi import
, import VPC Endpoint Services using the VPC endpoint service id
. For example:
$ pulumi import aws:ec2/vpcEndpointService:VpcEndpointService foo vpce-svc-0f97a19d3fa8220bc
Properties
Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true
or false
.
The ARNs of one or more principals allowed to discover the endpoint service.
A set of Availability Zones in which the service is available.
A set of DNS names for the service.
Amazon Resource Names (ARNs) of one or more Gateway Load Balancers for the endpoint service.
Whether or not the service manages its VPC endpoints - true
or false
.
Amazon Resource Names (ARNs) of one or more Network Load Balancers for the endpoint service.
The private DNS name for the service.
List of objects containing information about the endpoint service private DNS name configuration.
The service name.
The service type, Gateway
or Interface
.
The supported IP address types. The possible values are ipv4
and ipv6
.
The set of regions from which service consumers can access the service.