get Hc Vpn Gateway
Get a HA VPN Gateway within GCE from its name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const gateway = gcp.compute.getHcVpnGateway({
name: "foobar",
});
Content copied to clipboard
import pulumi
import pulumi_gcp as gcp
gateway = gcp.compute.get_hc_vpn_gateway(name="foobar")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var gateway = Gcp.Compute.GetHcVpnGateway.Invoke(new()
{
Name = "foobar",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.GetHcVpnGateway(ctx, &compute.GetHcVpnGatewayArgs{
Name: "foobar",
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetHcVpnGatewayArgs;
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 gateway = ComputeFunctions.getHcVpnGateway(GetHcVpnGatewayArgs.builder()
.name("foobar")
.build());
}
}
Content copied to clipboard
variables:
gateway:
fn::invoke:
function: gcp:compute:getHcVpnGateway
arguments:
name: foobar
Content copied to clipboard
Return
A collection of values returned by getHcVpnGateway.
Parameters
argument
A collection of arguments for invoking getHcVpnGateway.
suspend fun getHcVpnGateway(name: String, project: String? = null, region: String? = null): GetHcVpnGatewayResult
Return
A collection of values returned by getHcVpnGateway.
Parameters
name
The name of the forwarding rule.
project
The project in which the resource belongs. If it is not provided, the provider project is used.
region
The region in which the resource belongs. If it is not provided, the project region is used.
See also
suspend fun getHcVpnGateway(argument: suspend GetHcVpnGatewayPlainArgsBuilder.() -> Unit): GetHcVpnGatewayResult
Return
A collection of values returned by getHcVpnGateway.
Parameters
argument
Builder for com.pulumi.gcp.compute.kotlin.inputs.GetHcVpnGatewayPlainArgs.