VpcEndpointService
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_principalsattribute. 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
Basic
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Ec2.VpcEndpointService("example", new Aws.Ec2.VpcEndpointServiceArgs
{
AcceptanceRequired = false,
NetworkLoadBalancerArns =
{
aws_lb.Example.Arn,
},
});
}
}
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 {
_, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
AcceptanceRequired: pulumi.Bool(false),
NetworkLoadBalancerArns: pulumi.StringArray{
pulumi.String(aws_lb.Example.Arn),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2.VpcEndpointService("example",
acceptance_required=False,
network_load_balancer_arns=[aws_lb["example"]["arn"]])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpointService("example", {
acceptanceRequired: false,
networkLoadBalancerArns: [aws_lb_example.arn],
});Basic w/ Tags
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Ec2.VpcEndpointService("example", new Aws.Ec2.VpcEndpointServiceArgs
{
AcceptanceRequired = false,
NetworkLoadBalancerArns =
{
aws_lb.Example.Arn,
},
Tags =
{
{ "Environment", "test" },
},
});
}
}
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 {
_, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
AcceptanceRequired: pulumi.Bool(false),
NetworkLoadBalancerArns: pulumi.StringArray{
pulumi.String(aws_lb.Example.Arn),
},
Tags: pulumi.StringMap{
"Environment": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2.VpcEndpointService("example",
acceptance_required=False,
network_load_balancer_arns=[aws_lb["example"]["arn"]],
tags={
"Environment": "test",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpointService("example", {
acceptanceRequired: false,
networkLoadBalancerArns: [aws_lb_example.arn],
tags: {
Environment: "test",
},
});Create a VpcEndpointService Resource
new VpcEndpointService(name: string, args: VpcEndpointServiceArgs, opts?: CustomResourceOptions);def VpcEndpointService(resource_name, opts=None, acceptance_required=None, allowed_principals=None, network_load_balancer_arns=None, tags=None, __props__=None);func NewVpcEndpointService(ctx *Context, name string, args VpcEndpointServiceArgs, opts ...ResourceOption) (*VpcEndpointService, error)public VpcEndpointService(string name, VpcEndpointServiceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args VpcEndpointServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpcEndpointServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcEndpointServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
VpcEndpointService Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The VpcEndpointService resource accepts the following input properties:
- Acceptance
Required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- Network
Load List<string>Balancer Arns The ARNs of one or more Network Load Balancers for the endpoint service.
- Allowed
Principals List<string> The ARNs of one or more principals allowed to discover the endpoint service.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Acceptance
Required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- Network
Load []stringBalancer Arns The ARNs of one or more Network Load Balancers for the endpoint service.
- Allowed
Principals []string The ARNs of one or more principals allowed to discover the endpoint service.
- map[string]string
A map of tags to assign to the resource.
- acceptance
Required boolean Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- network
Load string[]Balancer Arns The ARNs of one or more Network Load Balancers for the endpoint service.
- allowed
Principals string[] The ARNs of one or more principals allowed to discover the endpoint service.
- {[key: string]: string}
A map of tags to assign to the resource.
- acceptance_
required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- network_
load_ List[str]balancer_ arns The ARNs of one or more Network Load Balancers for the endpoint service.
- allowed_
principals List[str] The ARNs of one or more principals allowed to discover the endpoint service.
- Dict[str, str]
A map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcEndpointService resource produces the following output properties:
- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- Availability
Zones List<string> The Availability Zones in which the service is available.
- Base
Endpoint List<string>Dns Names The DNS names for the service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Manages
Vpc boolEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- Private
Dns stringName The private DNS name for the service.
- Service
Name string The service name.
- Service
Type string The service type,
GatewayorInterface.- State string
The state of the VPC endpoint service.
- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- Availability
Zones []string The Availability Zones in which the service is available.
- Base
Endpoint []stringDns Names The DNS names for the service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Manages
Vpc boolEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- Private
Dns stringName The private DNS name for the service.
- Service
Name string The service name.
- Service
Type string The service type,
GatewayorInterface.- State string
The state of the VPC endpoint service.
- arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- availability
Zones string[] The Availability Zones in which the service is available.
- base
Endpoint string[]Dns Names The DNS names for the service.
- id string
- The provider-assigned unique ID for this managed resource.
- manages
Vpc booleanEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- private
Dns stringName The private DNS name for the service.
- service
Name string The service name.
- service
Type string The service type,
GatewayorInterface.- state string
The state of the VPC endpoint service.
- arn str
The Amazon Resource Name (ARN) of the VPC endpoint service.
- availability_
zones List[str] The Availability Zones in which the service is available.
- base_
endpoint_ List[str]dns_ names The DNS names for the service.
- id str
- The provider-assigned unique ID for this managed resource.
- manages_
vpc_ boolendpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- private_
dns_ strname The private DNS name for the service.
- service_
name str The service name.
- service_
type str The service type,
GatewayorInterface.- state str
The state of the VPC endpoint service.
Look up an Existing VpcEndpointService Resource
Get an existing VpcEndpointService 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?: VpcEndpointServiceState, opts?: CustomResourceOptions): VpcEndpointServicestatic get(resource_name, id, opts=None, acceptance_required=None, allowed_principals=None, arn=None, availability_zones=None, base_endpoint_dns_names=None, manages_vpc_endpoints=None, network_load_balancer_arns=None, private_dns_name=None, service_name=None, service_type=None, state=None, tags=None, __props__=None);func GetVpcEndpointService(ctx *Context, name string, id IDInput, state *VpcEndpointServiceState, opts ...ResourceOption) (*VpcEndpointService, error)public static VpcEndpointService Get(string name, Input<string> id, VpcEndpointServiceState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Acceptance
Required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- Allowed
Principals List<string> The ARNs of one or more principals allowed to discover the endpoint service.
- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- Availability
Zones List<string> The Availability Zones in which the service is available.
- Base
Endpoint List<string>Dns Names The DNS names for the service.
- Manages
Vpc boolEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- Network
Load List<string>Balancer Arns The ARNs of one or more Network Load Balancers for the endpoint service.
- Private
Dns stringName The private DNS name for the service.
- Service
Name string The service name.
- Service
Type string The service type,
GatewayorInterface.- State string
The state of the VPC endpoint service.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Acceptance
Required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- Allowed
Principals []string The ARNs of one or more principals allowed to discover the endpoint service.
- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- Availability
Zones []string The Availability Zones in which the service is available.
- Base
Endpoint []stringDns Names The DNS names for the service.
- Manages
Vpc boolEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- Network
Load []stringBalancer Arns The ARNs of one or more Network Load Balancers for the endpoint service.
- Private
Dns stringName The private DNS name for the service.
- Service
Name string The service name.
- Service
Type string The service type,
GatewayorInterface.- State string
The state of the VPC endpoint service.
- map[string]string
A map of tags to assign to the resource.
- acceptance
Required boolean Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- allowed
Principals string[] The ARNs of one or more principals allowed to discover the endpoint service.
- arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- availability
Zones string[] The Availability Zones in which the service is available.
- base
Endpoint string[]Dns Names The DNS names for the service.
- manages
Vpc booleanEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- network
Load string[]Balancer Arns The ARNs of one or more Network Load Balancers for the endpoint service.
- private
Dns stringName The private DNS name for the service.
- service
Name string The service name.
- service
Type string The service type,
GatewayorInterface.- state string
The state of the VPC endpoint service.
- {[key: string]: string}
A map of tags to assign to the resource.
- acceptance_
required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- allowed_
principals List[str] The ARNs of one or more principals allowed to discover the endpoint service.
- arn str
The Amazon Resource Name (ARN) of the VPC endpoint service.
- availability_
zones List[str] The Availability Zones in which the service is available.
- base_
endpoint_ List[str]dns_ names The DNS names for the service.
- manages_
vpc_ boolendpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- network_
load_ List[str]balancer_ arns The ARNs of one or more Network Load Balancers for the endpoint service.
- private_
dns_ strname The private DNS name for the service.
- service_
name str The service name.
- service_
type str The service type,
GatewayorInterface.- state str
The state of the VPC endpoint service.
- Dict[str, str]
A map of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.