getVpnGateway

The VPN Gateway data source provides details about a specific VPN gateway.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetVpnGatewayArgs;
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 selected = Ec2Functions.getVpnGateway(GetVpnGatewayArgs.builder()
.filters(GetVpnGatewayFilterArgs.builder()
.name("tag:Name")
.values("vpn-gw")
.build())
.build());
ctx.export("vpnGatewayId", selected.applyValue(getVpnGatewayResult -> getVpnGatewayResult.id()));
}
}

Return

A collection of values returned by getVpnGateway.

Parameters

argument

A collection of arguments for invoking getVpnGateway.


suspend fun getVpnGateway(amazonSideAsn: String? = null, attachedVpcId: String? = null, availabilityZone: String? = null, filters: List<GetVpnGatewayFilter>? = null, id: String? = null, state: String? = null, tags: Map<String, String>? = null): GetVpnGatewayResult

Return

A collection of values returned by getVpnGateway.

Parameters

amazonSideAsn

Autonomous System Number (ASN) for the Amazon side of the specific VPN Gateway to retrieve. More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

attachedVpcId

ID of a VPC attached to the specific VPN Gateway to retrieve.

availabilityZone

Availability Zone of the specific VPN Gateway to retrieve.

filters

Custom filter block as described below.

id

ID of the specific VPN Gateway to retrieve.

state

State of the specific VPN Gateway to retrieve.

tags

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

See also


Return

A collection of values returned by getVpnGateway.

Parameters

argument

Builder for com.pulumi.aws.ec2.kotlin.inputs.GetVpnGatewayPlainArgs.

See also