1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. VpcEndpointConnectionAccepter

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

aws.ec2.VpcEndpointConnectionAccepter

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

    Provides a resource to accept a pending VPC Endpoint Connection accept request to VPC Endpoint Service.

    Example Usage

    Accept cross-account request

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleVpcEndpointService = new Aws.Ec2.VpcEndpointService("exampleVpcEndpointService", new()
        {
            AcceptanceRequired = false,
            NetworkLoadBalancerArns = new[]
            {
                aws_lb.Example.Arn,
            },
        });
    
        var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint("exampleVpcEndpoint", new()
        {
            VpcId = aws_vpc.Test_alternate.Id,
            ServiceName = aws_vpc_endpoint_service.Test.Service_name,
            VpcEndpointType = "Interface",
            PrivateDnsEnabled = false,
            SecurityGroupIds = new[]
            {
                aws_security_group.Test.Id,
            },
        }, new CustomResourceOptions
        {
            Provider = aws.Alternate,
        });
    
        var exampleVpcEndpointConnectionAccepter = new Aws.Ec2.VpcEndpointConnectionAccepter("exampleVpcEndpointConnectionAccepter", new()
        {
            VpcEndpointServiceId = exampleVpcEndpointService.Id,
            VpcEndpointId = exampleVpcEndpoint.Id,
        });
    
    });
    
    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 {
    		exampleVpcEndpointService, err := ec2.NewVpcEndpointService(ctx, "exampleVpcEndpointService", &ec2.VpcEndpointServiceArgs{
    			AcceptanceRequired: pulumi.Bool(false),
    			NetworkLoadBalancerArns: pulumi.StringArray{
    				aws_lb.Example.Arn,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcEndpoint, err := ec2.NewVpcEndpoint(ctx, "exampleVpcEndpoint", &ec2.VpcEndpointArgs{
    			VpcId:             pulumi.Any(aws_vpc.Test_alternate.Id),
    			ServiceName:       pulumi.Any(aws_vpc_endpoint_service.Test.Service_name),
    			VpcEndpointType:   pulumi.String("Interface"),
    			PrivateDnsEnabled: pulumi.Bool(false),
    			SecurityGroupIds: pulumi.StringArray{
    				aws_security_group.Test.Id,
    			},
    		}, pulumi.Provider(aws.Alternate))
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewVpcEndpointConnectionAccepter(ctx, "exampleVpcEndpointConnectionAccepter", &ec2.VpcEndpointConnectionAccepterArgs{
    			VpcEndpointServiceId: exampleVpcEndpointService.ID(),
    			VpcEndpointId:        exampleVpcEndpoint.ID(),
    		})
    		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 com.pulumi.aws.ec2.VpcEndpoint;
    import com.pulumi.aws.ec2.VpcEndpointArgs;
    import com.pulumi.aws.ec2.VpcEndpointConnectionAccepter;
    import com.pulumi.aws.ec2.VpcEndpointConnectionAccepterArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 exampleVpcEndpointService = new VpcEndpointService("exampleVpcEndpointService", VpcEndpointServiceArgs.builder()        
                .acceptanceRequired(false)
                .networkLoadBalancerArns(aws_lb.example().arn())
                .build());
    
            var exampleVpcEndpoint = new VpcEndpoint("exampleVpcEndpoint", VpcEndpointArgs.builder()        
                .vpcId(aws_vpc.test_alternate().id())
                .serviceName(aws_vpc_endpoint_service.test().service_name())
                .vpcEndpointType("Interface")
                .privateDnsEnabled(false)
                .securityGroupIds(aws_security_group.test().id())
                .build(), CustomResourceOptions.builder()
                    .provider(aws.alternate())
                    .build());
    
            var exampleVpcEndpointConnectionAccepter = new VpcEndpointConnectionAccepter("exampleVpcEndpointConnectionAccepter", VpcEndpointConnectionAccepterArgs.builder()        
                .vpcEndpointServiceId(exampleVpcEndpointService.id())
                .vpcEndpointId(exampleVpcEndpoint.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example_vpc_endpoint_service = aws.ec2.VpcEndpointService("exampleVpcEndpointService",
        acceptance_required=False,
        network_load_balancer_arns=[aws_lb["example"]["arn"]])
    example_vpc_endpoint = aws.ec2.VpcEndpoint("exampleVpcEndpoint",
        vpc_id=aws_vpc["test_alternate"]["id"],
        service_name=aws_vpc_endpoint_service["test"]["service_name"],
        vpc_endpoint_type="Interface",
        private_dns_enabled=False,
        security_group_ids=[aws_security_group["test"]["id"]],
        opts=pulumi.ResourceOptions(provider=aws["alternate"]))
    example_vpc_endpoint_connection_accepter = aws.ec2.VpcEndpointConnectionAccepter("exampleVpcEndpointConnectionAccepter",
        vpc_endpoint_service_id=example_vpc_endpoint_service.id,
        vpc_endpoint_id=example_vpc_endpoint.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const exampleVpcEndpointService = new aws.ec2.VpcEndpointService("exampleVpcEndpointService", {
        acceptanceRequired: false,
        networkLoadBalancerArns: [aws_lb.example.arn],
    });
    const exampleVpcEndpoint = new aws.ec2.VpcEndpoint("exampleVpcEndpoint", {
        vpcId: aws_vpc.test_alternate.id,
        serviceName: aws_vpc_endpoint_service.test.service_name,
        vpcEndpointType: "Interface",
        privateDnsEnabled: false,
        securityGroupIds: [aws_security_group.test.id],
    }, {
        provider: aws.alternate,
    });
    const exampleVpcEndpointConnectionAccepter = new aws.ec2.VpcEndpointConnectionAccepter("exampleVpcEndpointConnectionAccepter", {
        vpcEndpointServiceId: exampleVpcEndpointService.id,
        vpcEndpointId: exampleVpcEndpoint.id,
    });
    
    resources:
      exampleVpcEndpointService:
        type: aws:ec2:VpcEndpointService
        properties:
          acceptanceRequired: false
          networkLoadBalancerArns:
            - ${aws_lb.example.arn}
      exampleVpcEndpoint:
        type: aws:ec2:VpcEndpoint
        properties:
          vpcId: ${aws_vpc.test_alternate.id}
          serviceName: ${aws_vpc_endpoint_service.test.service_name}
          vpcEndpointType: Interface
          privateDnsEnabled: false
          securityGroupIds:
            - ${aws_security_group.test.id}
        options:
          provider: ${aws.alternate}
      exampleVpcEndpointConnectionAccepter:
        type: aws:ec2:VpcEndpointConnectionAccepter
        properties:
          vpcEndpointServiceId: ${exampleVpcEndpointService.id}
          vpcEndpointId: ${exampleVpcEndpoint.id}
    

    Create VpcEndpointConnectionAccepter Resource

    new VpcEndpointConnectionAccepter(name: string, args: VpcEndpointConnectionAccepterArgs, opts?: CustomResourceOptions);
    @overload
    def VpcEndpointConnectionAccepter(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      vpc_endpoint_id: Optional[str] = None,
                                      vpc_endpoint_service_id: Optional[str] = None)
    @overload
    def VpcEndpointConnectionAccepter(resource_name: str,
                                      args: VpcEndpointConnectionAccepterArgs,
                                      opts: Optional[ResourceOptions] = None)
    func NewVpcEndpointConnectionAccepter(ctx *Context, name string, args VpcEndpointConnectionAccepterArgs, opts ...ResourceOption) (*VpcEndpointConnectionAccepter, error)
    public VpcEndpointConnectionAccepter(string name, VpcEndpointConnectionAccepterArgs args, CustomResourceOptions? opts = null)
    public VpcEndpointConnectionAccepter(String name, VpcEndpointConnectionAccepterArgs args)
    public VpcEndpointConnectionAccepter(String name, VpcEndpointConnectionAccepterArgs args, CustomResourceOptions options)
    
    type: aws:ec2:VpcEndpointConnectionAccepter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    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 VpcEndpointConnectionAccepterArgs
    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 VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    VpcEndpointConnectionAccepter 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 VpcEndpointConnectionAccepter resource accepts the following input properties:

    VpcEndpointId string

    AWS VPC Endpoint ID.

    VpcEndpointServiceId string

    AWS VPC Endpoint Service ID.

    VpcEndpointId string

    AWS VPC Endpoint ID.

    VpcEndpointServiceId string

    AWS VPC Endpoint Service ID.

    vpcEndpointId String

    AWS VPC Endpoint ID.

    vpcEndpointServiceId String

    AWS VPC Endpoint Service ID.

    vpcEndpointId string

    AWS VPC Endpoint ID.

    vpcEndpointServiceId string

    AWS VPC Endpoint Service ID.

    vpc_endpoint_id str

    AWS VPC Endpoint ID.

    vpc_endpoint_service_id str

    AWS VPC Endpoint Service ID.

    vpcEndpointId String

    AWS VPC Endpoint ID.

    vpcEndpointServiceId String

    AWS VPC Endpoint Service ID.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    VpcEndpointState string

    State of the VPC Endpoint.

    Id string

    The provider-assigned unique ID for this managed resource.

    VpcEndpointState string

    State of the VPC Endpoint.

    id String

    The provider-assigned unique ID for this managed resource.

    vpcEndpointState String

    State of the VPC Endpoint.

    id string

    The provider-assigned unique ID for this managed resource.

    vpcEndpointState string

    State of the VPC Endpoint.

    id str

    The provider-assigned unique ID for this managed resource.

    vpc_endpoint_state str

    State of the VPC Endpoint.

    id String

    The provider-assigned unique ID for this managed resource.

    vpcEndpointState String

    State of the VPC Endpoint.

    Look up Existing VpcEndpointConnectionAccepter Resource

    Get an existing VpcEndpointConnectionAccepter 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?: VpcEndpointConnectionAccepterState, opts?: CustomResourceOptions): VpcEndpointConnectionAccepter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            vpc_endpoint_id: Optional[str] = None,
            vpc_endpoint_service_id: Optional[str] = None,
            vpc_endpoint_state: Optional[str] = None) -> VpcEndpointConnectionAccepter
    func GetVpcEndpointConnectionAccepter(ctx *Context, name string, id IDInput, state *VpcEndpointConnectionAccepterState, opts ...ResourceOption) (*VpcEndpointConnectionAccepter, error)
    public static VpcEndpointConnectionAccepter Get(string name, Input<string> id, VpcEndpointConnectionAccepterState? state, CustomResourceOptions? opts = null)
    public static VpcEndpointConnectionAccepter get(String name, Output<String> id, VpcEndpointConnectionAccepterState 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:
    VpcEndpointId string

    AWS VPC Endpoint ID.

    VpcEndpointServiceId string

    AWS VPC Endpoint Service ID.

    VpcEndpointState string

    State of the VPC Endpoint.

    VpcEndpointId string

    AWS VPC Endpoint ID.

    VpcEndpointServiceId string

    AWS VPC Endpoint Service ID.

    VpcEndpointState string

    State of the VPC Endpoint.

    vpcEndpointId String

    AWS VPC Endpoint ID.

    vpcEndpointServiceId String

    AWS VPC Endpoint Service ID.

    vpcEndpointState String

    State of the VPC Endpoint.

    vpcEndpointId string

    AWS VPC Endpoint ID.

    vpcEndpointServiceId string

    AWS VPC Endpoint Service ID.

    vpcEndpointState string

    State of the VPC Endpoint.

    vpc_endpoint_id str

    AWS VPC Endpoint ID.

    vpc_endpoint_service_id str

    AWS VPC Endpoint Service ID.

    vpc_endpoint_state str

    State of the VPC Endpoint.

    vpcEndpointId String

    AWS VPC Endpoint ID.

    vpcEndpointServiceId String

    AWS VPC Endpoint Service ID.

    vpcEndpointState String

    State of the VPC Endpoint.

    Import

    Using pulumi import, import VPC Endpoint Services using ID of the connection, which is the VPC Endpoint Service ID and VPC Endpoint ID separated by underscore (_).. For example:

     $ pulumi import aws:ec2/vpcEndpointConnectionAccepter:VpcEndpointConnectionAccepter foo vpce-svc-0f97a19d3fa8220bc_vpce-010601a6db371e263
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi