aws.ec2.VpcEndpointConnectionAccepter
Explore with Pulumi AI
Provides a resource to accept a pending VPC Endpoint Connection accept request to VPC Endpoint Service.
Example Usage
Accept cross-account request
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpointService("example", {
acceptanceRequired: false,
networkLoadBalancerArns: [exampleAwsLb.arn],
});
const exampleVpcEndpoint = new aws.ec2.VpcEndpoint("example", {
vpcId: testAlternate.id,
serviceName: testAwsVpcEndpointService.serviceName,
vpcEndpointType: "Interface",
privateDnsEnabled: false,
securityGroupIds: [test.id],
});
const exampleVpcEndpointConnectionAccepter = new aws.ec2.VpcEndpointConnectionAccepter("example", {
vpcEndpointServiceId: example.id,
vpcEndpointId: exampleVpcEndpoint.id,
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.VpcEndpointService("example",
acceptance_required=False,
network_load_balancer_arns=[example_aws_lb["arn"]])
example_vpc_endpoint = aws.ec2.VpcEndpoint("example",
vpc_id=test_alternate["id"],
service_name=test_aws_vpc_endpoint_service["serviceName"],
vpc_endpoint_type="Interface",
private_dns_enabled=False,
security_group_ids=[test["id"]])
example_vpc_endpoint_connection_accepter = aws.ec2.VpcEndpointConnectionAccepter("example",
vpc_endpoint_service_id=example.id,
vpc_endpoint_id=example_vpc_endpoint.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 {
example, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
AcceptanceRequired: pulumi.Bool(false),
NetworkLoadBalancerArns: pulumi.StringArray{
exampleAwsLb.Arn,
},
})
if err != nil {
return err
}
exampleVpcEndpoint, err := ec2.NewVpcEndpoint(ctx, "example", &ec2.VpcEndpointArgs{
VpcId: pulumi.Any(testAlternate.Id),
ServiceName: pulumi.Any(testAwsVpcEndpointService.ServiceName),
VpcEndpointType: pulumi.String("Interface"),
PrivateDnsEnabled: pulumi.Bool(false),
SecurityGroupIds: pulumi.StringArray{
test.Id,
},
})
if err != nil {
return err
}
_, err = ec2.NewVpcEndpointConnectionAccepter(ctx, "example", &ec2.VpcEndpointConnectionAccepterArgs{
VpcEndpointServiceId: example.ID(),
VpcEndpointId: exampleVpcEndpoint.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 example = new Aws.Ec2.VpcEndpointService("example", new()
{
AcceptanceRequired = false,
NetworkLoadBalancerArns = new[]
{
exampleAwsLb.Arn,
},
});
var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint("example", new()
{
VpcId = testAlternate.Id,
ServiceName = testAwsVpcEndpointService.ServiceName,
VpcEndpointType = "Interface",
PrivateDnsEnabled = false,
SecurityGroupIds = new[]
{
test.Id,
},
});
var exampleVpcEndpointConnectionAccepter = new Aws.Ec2.VpcEndpointConnectionAccepter("example", new()
{
VpcEndpointServiceId = example.Id,
VpcEndpointId = exampleVpcEndpoint.Id,
});
});
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 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());
var exampleVpcEndpoint = new VpcEndpoint("exampleVpcEndpoint", VpcEndpointArgs.builder()
.vpcId(testAlternate.id())
.serviceName(testAwsVpcEndpointService.serviceName())
.vpcEndpointType("Interface")
.privateDnsEnabled(false)
.securityGroupIds(test.id())
.build());
var exampleVpcEndpointConnectionAccepter = new VpcEndpointConnectionAccepter("exampleVpcEndpointConnectionAccepter", VpcEndpointConnectionAccepterArgs.builder()
.vpcEndpointServiceId(example.id())
.vpcEndpointId(exampleVpcEndpoint.id())
.build());
}
}
resources:
example:
type: aws:ec2:VpcEndpointService
properties:
acceptanceRequired: false
networkLoadBalancerArns:
- ${exampleAwsLb.arn}
exampleVpcEndpoint:
type: aws:ec2:VpcEndpoint
name: example
properties:
vpcId: ${testAlternate.id}
serviceName: ${testAwsVpcEndpointService.serviceName}
vpcEndpointType: Interface
privateDnsEnabled: false
securityGroupIds:
- ${test.id}
exampleVpcEndpointConnectionAccepter:
type: aws:ec2:VpcEndpointConnectionAccepter
name: example
properties:
vpcEndpointServiceId: ${example.id}
vpcEndpointId: ${exampleVpcEndpoint.id}
Create VpcEndpointConnectionAccepter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcEndpointConnectionAccepter(name: string, args: VpcEndpointConnectionAccepterArgs, opts?: CustomResourceOptions);
@overload
def VpcEndpointConnectionAccepter(resource_name: str,
args: VpcEndpointConnectionAccepterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcEndpointConnectionAccepter(resource_name: str,
opts: Optional[ResourceOptions] = None,
vpc_endpoint_id: Optional[str] = None,
vpc_endpoint_service_id: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpcEndpointConnectionAccepterResource = new Aws.Ec2.VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource", new()
{
VpcEndpointId = "string",
VpcEndpointServiceId = "string",
});
example, err := ec2.NewVpcEndpointConnectionAccepter(ctx, "vpcEndpointConnectionAccepterResource", &ec2.VpcEndpointConnectionAccepterArgs{
VpcEndpointId: pulumi.String("string"),
VpcEndpointServiceId: pulumi.String("string"),
})
var vpcEndpointConnectionAccepterResource = new VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource", VpcEndpointConnectionAccepterArgs.builder()
.vpcEndpointId("string")
.vpcEndpointServiceId("string")
.build());
vpc_endpoint_connection_accepter_resource = aws.ec2.VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource",
vpc_endpoint_id="string",
vpc_endpoint_service_id="string")
const vpcEndpointConnectionAccepterResource = new aws.ec2.VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource", {
vpcEndpointId: "string",
vpcEndpointServiceId: "string",
});
type: aws:ec2:VpcEndpointConnectionAccepter
properties:
vpcEndpointId: string
vpcEndpointServiceId: string
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:
- Vpc
Endpoint stringId - AWS VPC Endpoint ID.
- Vpc
Endpoint stringService Id - AWS VPC Endpoint Service ID.
- Vpc
Endpoint stringId - AWS VPC Endpoint ID.
- Vpc
Endpoint stringService Id - AWS VPC Endpoint Service ID.
- vpc
Endpoint StringId - AWS VPC Endpoint ID.
- vpc
Endpoint StringService Id - AWS VPC Endpoint Service ID.
- vpc
Endpoint stringId - AWS VPC Endpoint ID.
- vpc
Endpoint stringService Id - AWS VPC Endpoint Service ID.
- vpc_
endpoint_ strid - AWS VPC Endpoint ID.
- vpc_
endpoint_ strservice_ id - AWS VPC Endpoint Service ID.
- vpc
Endpoint StringId - AWS VPC Endpoint ID.
- vpc
Endpoint StringService Id - 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.
- Vpc
Endpoint stringState - State of the VPC Endpoint.
- Id string
- The provider-assigned unique ID for this managed resource.
- Vpc
Endpoint stringState - State of the VPC Endpoint.
- id String
- The provider-assigned unique ID for this managed resource.
- vpc
Endpoint StringState - State of the VPC Endpoint.
- id string
- The provider-assigned unique ID for this managed resource.
- vpc
Endpoint stringState - State of the VPC Endpoint.
- id str
- The provider-assigned unique ID for this managed resource.
- vpc_
endpoint_ strstate - State of the VPC Endpoint.
- id String
- The provider-assigned unique ID for this managed resource.
- vpc
Endpoint StringState - 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.
- Vpc
Endpoint stringId - AWS VPC Endpoint ID.
- Vpc
Endpoint stringService Id - AWS VPC Endpoint Service ID.
- Vpc
Endpoint stringState - State of the VPC Endpoint.
- Vpc
Endpoint stringId - AWS VPC Endpoint ID.
- Vpc
Endpoint stringService Id - AWS VPC Endpoint Service ID.
- Vpc
Endpoint stringState - State of the VPC Endpoint.
- vpc
Endpoint StringId - AWS VPC Endpoint ID.
- vpc
Endpoint StringService Id - AWS VPC Endpoint Service ID.
- vpc
Endpoint StringState - State of the VPC Endpoint.
- vpc
Endpoint stringId - AWS VPC Endpoint ID.
- vpc
Endpoint stringService Id - AWS VPC Endpoint Service ID.
- vpc
Endpoint stringState - State of the VPC Endpoint.
- vpc_
endpoint_ strid - AWS VPC Endpoint ID.
- vpc_
endpoint_ strservice_ id - AWS VPC Endpoint Service ID.
- vpc_
endpoint_ strstate - State of the VPC Endpoint.
- vpc
Endpoint StringId - AWS VPC Endpoint ID.
- vpc
Endpoint StringService Id - AWS VPC Endpoint Service ID.
- vpc
Endpoint StringState - 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
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.