get Vpn Attachment
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 atransit_gateway_attachment_id
attribute which can replace some usage of this data source. For tagging the attachment, see theaws.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
A collection of arguments for invoking getVpnAttachment.
Return
A collection of values returned by getVpnAttachment.
Parameters
Configuration block(s) for filtering. Detailed below.
Map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.
Identifier of the EC2 Transit Gateway.
Identifier of the EC2 VPN Connection.
See also
Return
A collection of values returned by getVpnAttachment.
Parameters
Builder for com.pulumi.aws.ec2transitgateway.kotlin.inputs.GetVpnAttachmentPlainArgs.