getVpnAttachment

Get information on an EC2 Transit Gateway VPN Attachment.

EC2 Transit Gateway VPN Attachments are implicitly created by VPN Connections referencing an EC2 Transit Gateway so there is no managed resource. For ease, the aws.ec2.VpnConnection resource includes a transit_gateway_attachment_id attribute which can replace some usage of this data source. For tagging the attachment, see the aws.ec2.Tag resource.

Example Usage

By Transit Gateway and VPN Connection Identifiers

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetVpnAttachmentArgs;
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) {
final var example = Ec2transitgatewayFunctions.getVpnAttachment(GetVpnAttachmentArgs.builder()
.transitGatewayId(aws_ec2_transit_gateway.example().id())
.vpnConnectionId(aws_vpn_connection.example().id())
.build());
}
}

Filter

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetVpnAttachmentArgs;
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) {
final var test = Ec2transitgatewayFunctions.getVpnAttachment(GetVpnAttachmentArgs.builder()
.filters(GetVpnAttachmentFilterArgs.builder()
.name("resource-id")
.values("some-resource")
.build())
.build());
}
}

Return

A collection of values returned by getVpnAttachment.

Parameters

argument

A collection of arguments for invoking getVpnAttachment.


suspend fun getVpnAttachment(filters: List<GetVpnAttachmentFilter>? = null, tags: Map<String, String>? = null, transitGatewayId: String? = null, vpnConnectionId: String? = null): GetVpnAttachmentResult

Return

A collection of values returned by getVpnAttachment.

Parameters

filters

Configuration block(s) for filtering. Detailed below.

tags

Map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.

transitGatewayId

Identifier of the EC2 Transit Gateway.

vpnConnectionId

Identifier of the EC2 VPN Connection.

See also


Return

A collection of values returned by getVpnAttachment.

Parameters

argument

Builder for com.pulumi.aws.ec2transitgateway.kotlin.inputs.GetVpnAttachmentPlainArgs.

See also