Google Cloud (GCP) Classic

v6.44.0 published on Tuesday, Nov 29, 2022 by Pulumi

getHcVpnGateway

Get a HA VPN Gateway within GCE from its name.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var gateway = Gcp.Compute.GetHcVpnGateway.Invoke(new()
    {
        Name = "foobar",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/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
	})
}
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());

    }
}
import pulumi
import pulumi_gcp as gcp

gateway = gcp.compute.get_hc_vpn_gateway(name="foobar")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const gateway = pulumi.output(gcp.compute.getHcVpnGateway({
    name: "foobar",
}));
variables:
  gateway:
    fn::invoke:
      Function: gcp:compute:getHcVpnGateway
      Arguments:
        name: foobar

Using getHcVpnGateway

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getHcVpnGateway(args: GetHcVpnGatewayArgs, opts?: InvokeOptions): Promise<GetHcVpnGatewayResult>
function getHcVpnGatewayOutput(args: GetHcVpnGatewayOutputArgs, opts?: InvokeOptions): Output<GetHcVpnGatewayResult>
def get_hc_vpn_gateway(name: Optional[str] = None,
                       project: Optional[str] = None,
                       region: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetHcVpnGatewayResult
def get_hc_vpn_gateway_output(name: Optional[pulumi.Input[str]] = None,
                       project: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetHcVpnGatewayResult]
func GetHcVpnGateway(ctx *Context, args *GetHcVpnGatewayArgs, opts ...InvokeOption) (*GetHcVpnGatewayResult, error)
func GetHcVpnGatewayOutput(ctx *Context, args *GetHcVpnGatewayOutputArgs, opts ...InvokeOption) GetHcVpnGatewayResultOutput

> Note: This function is named GetHcVpnGateway in the Go SDK.

public static class GetHcVpnGateway 
{
    public static Task<GetHcVpnGatewayResult> InvokeAsync(GetHcVpnGatewayArgs args, InvokeOptions? opts = null)
    public static Output<GetHcVpnGatewayResult> Invoke(GetHcVpnGatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHcVpnGatewayResult> getHcVpnGateway(GetHcVpnGatewayArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:compute/getHcVpnGateway:getHcVpnGateway
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

The name of the forwarding rule.

Project string

The project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region in which the resource belongs. If it is not provided, the project region is used.

Name string

The name of the forwarding rule.

Project string

The project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region in which the resource belongs. If it is not provided, the project region is used.

name String

The name of the forwarding rule.

project String

The project in which the resource belongs. If it is not provided, the provider project is used.

region String

The region in which the resource belongs. If it is not provided, the project region is used.

name string

The name of the forwarding rule.

project string

The project in which the resource belongs. If it is not provided, the provider project is used.

region string

The region in which the resource belongs. If it is not provided, the project region is used.

name str

The name of the forwarding rule.

project str

The project in which the resource belongs. If it is not provided, the provider project is used.

region str

The region in which the resource belongs. If it is not provided, the project region is used.

name String

The name of the forwarding rule.

project String

The project in which the resource belongs. If it is not provided, the provider project is used.

region String

The region in which the resource belongs. If it is not provided, the project region is used.

getHcVpnGateway Result

The following output properties are available:

Description string
Id string

The provider-assigned unique ID for this managed resource.

Name string
Network string
SelfLink string
VpnInterfaces List<GetHcVpnGatewayVpnInterface>
Project string
Region string
Description string
Id string

The provider-assigned unique ID for this managed resource.

Name string
Network string
SelfLink string
VpnInterfaces []GetHcVpnGatewayVpnInterface
Project string
Region string
description String
id String

The provider-assigned unique ID for this managed resource.

name String
network String
selfLink String
vpnInterfaces List<GetHcVpnGatewayVpnInterface>
project String
region String
description string
id string

The provider-assigned unique ID for this managed resource.

name string
network string
selfLink string
vpnInterfaces GetHcVpnGatewayVpnInterface[]
project string
region string
description str
id str

The provider-assigned unique ID for this managed resource.

name str
network str
self_link str
vpn_interfaces Sequence[GetHcVpnGatewayVpnInterface]
project str
region str
description String
id String

The provider-assigned unique ID for this managed resource.

name String
network String
selfLink String
vpnInterfaces List<Property Map>
project String
region String

Supporting Types

GetHcVpnGatewayVpnInterface

id Integer
interconnectAttachment String
ipAddress String

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.