HCP

v0.1.11 published on Monday, Jul 25, 2022 by Grapl Security

getHvn

The HVN data source provides information about an existing HashiCorp Virtual Network.

Example Usage

using Pulumi;
using Hcp = Pulumi.Hcp;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Hcp.GetHvn.InvokeAsync(new Hcp.GetHvnArgs
        {
            HvnId = @var.Hvn_id,
        }));
    }

}
package main

import (
	"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
	"github.com/pulumi/pulumi-hcp/sdk/go/hcp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcp.LookupHvn(ctx, &GetHvnArgs{
			HvnId: _var.Hvn_id,
		}, 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.hcp.HcpFunctions;
import com.pulumi.hcp.inputs.GetHvnArgs;
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 = HcpFunctions.getHvn(GetHvnArgs.builder()
            .hvnId(var_.hvn_id())
            .build());

    }
}
import pulumi
import pulumi_hcp as hcp

example = hcp.get_hvn(hvn_id=var["hvn_id"])
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";

const example = hcp.getHvn({
    hvnId: _var.hvn_id,
});
variables:
  example:
    Fn::Invoke:
      Function: hcp:getHvn
      Arguments:
        hvnId: ${var.hvn_id}

Using getHvn

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 getHvn(args: GetHvnArgs, opts?: InvokeOptions): Promise<GetHvnResult>
function getHvnOutput(args: GetHvnOutputArgs, opts?: InvokeOptions): Output<GetHvnResult>
def get_hvn(hvn_id: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetHvnResult
def get_hvn_output(hvn_id: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetHvnResult]
func LookupHvn(ctx *Context, args *LookupHvnArgs, opts ...InvokeOption) (*LookupHvnResult, error)
func LookupHvnOutput(ctx *Context, args *LookupHvnOutputArgs, opts ...InvokeOption) LookupHvnResultOutput

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

public static class GetHvn 
{
    public static Task<GetHvnResult> InvokeAsync(GetHvnArgs args, InvokeOptions? opts = null)
    public static Output<GetHvnResult> Invoke(GetHvnInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHvnResult> getHvn(GetHvnArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: hcp:index/getHvn:getHvn
  Arguments:
    # Arguments dictionary

The following arguments are supported:

HvnId string
HvnId string
hvnId String
hvnId string
hvn_id str
hvnId String

getHvn Result

The following output properties are available:

CidrBlock string
CloudProvider string
CreatedAt string
HvnId string
Id string

The provider-assigned unique ID for this managed resource.

OrganizationId string
ProjectId string
ProviderAccountId string
Region string
SelfLink string
State string
CidrBlock string
CloudProvider string
CreatedAt string
HvnId string
Id string

The provider-assigned unique ID for this managed resource.

OrganizationId string
ProjectId string
ProviderAccountId string
Region string
SelfLink string
State string
cidrBlock String
cloudProvider String
createdAt String
hvnId String
id String

The provider-assigned unique ID for this managed resource.

organizationId String
projectId String
providerAccountId String
region String
selfLink String
state String
cidrBlock string
cloudProvider string
createdAt string
hvnId string
id string

The provider-assigned unique ID for this managed resource.

organizationId string
projectId string
providerAccountId string
region string
selfLink string
state string
cidr_block str
cloud_provider str
created_at str
hvn_id str
id str

The provider-assigned unique ID for this managed resource.

organization_id str
project_id str
provider_account_id str
region str
self_link str
state str
cidrBlock String
cloudProvider String
createdAt String
hvnId String
id String

The provider-assigned unique ID for this managed resource.

organizationId String
projectId String
providerAccountId String
region String
selfLink String
state String

Package Details

Repository
https://github.com/grapl-security/pulumi-hcp
License
Apache-2.0
Notes

This Pulumi package is based on the hcp Terraform Provider.