GetVpnAttachment
Get information on an EC2 Transit Gateway VPN Attachment.
Example Usage
By Transit Gateway and VPN Connection Identifiers
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2TransitGateway.GetVpnAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetVpnAttachmentArgs
{
TransitGatewayId = aws_ec2_transit_gateway.Example.Id,
VpnConnectionId = aws_vpn_connection.Example.Id,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := aws_ec2_transit_gateway.Example.Id
opt1 := aws_vpn_connection.Example.Id
_, err := ec2transitgateway.GetVpnAttachment(ctx, &ec2transitgateway.GetVpnAttachmentArgs{
TransitGatewayId: &opt0,
VpnConnectionId: &opt1,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_vpn_attachment(transit_gateway_id=aws_ec2_transit_gateway["example"]["id"],
vpn_connection_id=aws_vpn_connection["example"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.all([aws_ec2_transit_gateway_example.id, aws_vpn_connection_example.id]).apply(([aws_ec2_transit_gateway_exampleId, aws_vpn_connection_exampleId]) => aws.ec2transitgateway.getVpnAttachment({
transitGatewayId: aws_ec2_transit_gateway_exampleId,
vpnConnectionId: aws_vpn_connection_exampleId,
}, { async: true }));Filter
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Aws.Ec2TransitGateway.GetVpnAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetVpnAttachmentArgs
{
Filters =
{
new Aws.Ec2TransitGateway.Inputs.GetVpnAttachmentFilterArgs
{
Name = "resource-id",
Values =
{
"some-resource",
},
},
},
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2transitgateway.GetVpnAttachment(ctx, &ec2transitgateway.GetVpnAttachmentArgs{
Filters: []ec2transitgateway.GetVpnAttachmentFilter{
ec2transitgateway.GetVpnAttachmentFilter{
Name: "resource-id",
Values: []string{
"some-resource",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
test = aws.ec2transitgateway.get_vpn_attachment(filters=[{
"name": "resource-id",
"values": ["some-resource"],
}])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = pulumi.output(aws.ec2transitgateway.getVpnAttachment({
filters: [{
name: "resource-id",
values: ["some-resource"],
}],
}, { async: true }));Using GetVpnAttachment
function getVpnAttachment(args: GetVpnAttachmentArgs, opts?: InvokeOptions): Promise<GetVpnAttachmentResult>function get_vpn_attachment(filters=None, tags=None, transit_gateway_id=None, vpn_connection_id=None, opts=None)func GetVpnAttachment(ctx *Context, args *GetVpnAttachmentArgs, opts ...InvokeOption) (*GetVpnAttachmentResult, error)public static class GetVpnAttachment {
public static Task<GetVpnAttachmentResult> InvokeAsync(GetVpnAttachmentArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Vpn Attachment Filter Args> Configuration block(s) for filtering. Detailed below.
- Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.
- Transit
Gateway stringId Identifier of the EC2 Transit Gateway.
- Vpn
Connection stringId Identifier of the EC2 VPN Connection.
- Filters
[]Get
Vpn Attachment Filter Configuration block(s) for filtering. Detailed below.
- map[string]string
A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.
- Transit
Gateway stringId Identifier of the EC2 Transit Gateway.
- Vpn
Connection stringId Identifier of the EC2 VPN Connection.
- filters
Get
Vpn Attachment Filter[] Configuration block(s) for filtering. Detailed below.
- {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.
- transit
Gateway stringId Identifier of the EC2 Transit Gateway.
- vpn
Connection stringId Identifier of the EC2 VPN Connection.
- filters
List[Get
Vpn Attachment Filter] Configuration block(s) for filtering. Detailed below.
- Dict[str, str]
A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.
- transit_
gateway_ strid Identifier of the EC2 Transit Gateway.
- vpn_
connection_ strid Identifier of the EC2 VPN Connection.
GetVpnAttachment Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway VPN Attachment
- Filters
List<Get
Vpn Attachment Filter> - Transit
Gateway stringId - Vpn
Connection stringId
- Id string
The provider-assigned unique ID for this managed resource.
- map[string]string
Key-value tags for the EC2 Transit Gateway VPN Attachment
- Filters
[]Get
Vpn Attachment Filter - Transit
Gateway stringId - Vpn
Connection stringId
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway VPN Attachment
- filters
Get
Vpn Attachment Filter[] - transit
Gateway stringId - vpn
Connection stringId
- id str
The provider-assigned unique ID for this managed resource.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway VPN Attachment
- filters
List[Get
Vpn Attachment Filter] - transit_
gateway_ strid - vpn_
connection_ strid
Supporting Types
GetVpnAttachmentFilter
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.
- Values List<string>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- Name string
The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.
- Values []string
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name string
The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.
- values string[]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name str
The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.
- values List[str]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.