1. Packages
  2. HCP
  3. API Docs
  4. getHvnPeeringConnection
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

hcp.getHvnPeeringConnection

Explore with Pulumi AI

hcp logo
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

    The HVN peering connection data source provides information about an existing peering connection between HVNs.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Hcp = Pulumi.Hcp;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Hcp.GetHvnPeeringConnection.Invoke(new()
        {
            PeeringId = @var.Peering_id,
            Hvn1 = @var.Hvn_1,
            Hvn2 = @var.Hvn_2,
        });
    
    });
    
    package main
    
    import (
    	"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hcp.LookupHvnPeeringConnection(ctx, &GetHvnPeeringConnectionArgs{
    			PeeringId: _var.Peering_id,
    			Hvn1:      _var.Hvn_1,
    			Hvn2:      _var.Hvn_2,
    		}, 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.GetHvnPeeringConnectionArgs;
    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 = HcpFunctions.getHvnPeeringConnection(GetHvnPeeringConnectionArgs.builder()
                .peeringId(var_.peering_id())
                .hvn1(var_.hvn_1())
                .hvn2(var_.hvn_2())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_hcp as hcp
    
    test = hcp.get_hvn_peering_connection(peering_id=var["peering_id"],
        hvn1=var["hvn_1"],
        hvn2=var["hvn_2"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as hcp from "@pulumi/hcp";
    
    const test = hcp.getHvnPeeringConnection({
        peeringId: _var.peering_id,
        hvn1: _var.hvn_1,
        hvn2: _var.hvn_2,
    });
    
    variables:
      test:
        Fn::Invoke:
          Function: hcp:getHvnPeeringConnection
          Arguments:
            peeringId: ${var.peering_id}
            hvn1: ${var.hvn_1}
            hvn2: ${var.hvn_2}
    

    Using getHvnPeeringConnection

    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 getHvnPeeringConnection(args: GetHvnPeeringConnectionArgs, opts?: InvokeOptions): Promise<GetHvnPeeringConnectionResult>
    function getHvnPeeringConnectionOutput(args: GetHvnPeeringConnectionOutputArgs, opts?: InvokeOptions): Output<GetHvnPeeringConnectionResult>
    def get_hvn_peering_connection(hvn1: Optional[str] = None,
                                   hvn2: Optional[str] = None,
                                   peering_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetHvnPeeringConnectionResult
    def get_hvn_peering_connection_output(hvn1: Optional[pulumi.Input[str]] = None,
                                   hvn2: Optional[pulumi.Input[str]] = None,
                                   peering_id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetHvnPeeringConnectionResult]
    func LookupHvnPeeringConnection(ctx *Context, args *LookupHvnPeeringConnectionArgs, opts ...InvokeOption) (*LookupHvnPeeringConnectionResult, error)
    func LookupHvnPeeringConnectionOutput(ctx *Context, args *LookupHvnPeeringConnectionOutputArgs, opts ...InvokeOption) LookupHvnPeeringConnectionResultOutput

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

    public static class GetHvnPeeringConnection 
    {
        public static Task<GetHvnPeeringConnectionResult> InvokeAsync(GetHvnPeeringConnectionArgs args, InvokeOptions? opts = null)
        public static Output<GetHvnPeeringConnectionResult> Invoke(GetHvnPeeringConnectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHvnPeeringConnectionResult> getHvnPeeringConnection(GetHvnPeeringConnectionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: hcp:index/getHvnPeeringConnection:getHvnPeeringConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Hvn1 string
    The unique URL of one of the HVNs being peered.
    Hvn2 string
    The unique URL of one of the HVNs being peered.
    PeeringId string
    The ID of the peering connection.
    Hvn1 string
    The unique URL of one of the HVNs being peered.
    Hvn2 string
    The unique URL of one of the HVNs being peered.
    PeeringId string
    The ID of the peering connection.
    hvn1 String
    The unique URL of one of the HVNs being peered.
    hvn2 String
    The unique URL of one of the HVNs being peered.
    peeringId String
    The ID of the peering connection.
    hvn1 string
    The unique URL of one of the HVNs being peered.
    hvn2 string
    The unique URL of one of the HVNs being peered.
    peeringId string
    The ID of the peering connection.
    hvn1 str
    The unique URL of one of the HVNs being peered.
    hvn2 str
    The unique URL of one of the HVNs being peered.
    peering_id str
    The ID of the peering connection.
    hvn1 String
    The unique URL of one of the HVNs being peered.
    hvn2 String
    The unique URL of one of the HVNs being peered.
    peeringId String
    The ID of the peering connection.

    getHvnPeeringConnection Result

    The following output properties are available:

    CreatedAt string
    The time that the peering connection was created.
    ExpiresAt string
    The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    Hvn1 string
    The unique URL of one of the HVNs being peered.
    Hvn2 string
    The unique URL of one of the HVNs being peered.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the HCP organization where the peering connection is located. Always matches the HVNs' organization.
    PeeringId string
    The ID of the peering connection.
    ProjectId string
    The ID of the HCP project where the peering connection is located. Always matches the HVNs' project.
    SelfLink string
    A unique URL identifying the peering connection
    State string
    The state of the HVN peering connection.
    CreatedAt string
    The time that the peering connection was created.
    ExpiresAt string
    The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    Hvn1 string
    The unique URL of one of the HVNs being peered.
    Hvn2 string
    The unique URL of one of the HVNs being peered.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the HCP organization where the peering connection is located. Always matches the HVNs' organization.
    PeeringId string
    The ID of the peering connection.
    ProjectId string
    The ID of the HCP project where the peering connection is located. Always matches the HVNs' project.
    SelfLink string
    A unique URL identifying the peering connection
    State string
    The state of the HVN peering connection.
    createdAt String
    The time that the peering connection was created.
    expiresAt String
    The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvn1 String
    The unique URL of one of the HVNs being peered.
    hvn2 String
    The unique URL of one of the HVNs being peered.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the HCP organization where the peering connection is located. Always matches the HVNs' organization.
    peeringId String
    The ID of the peering connection.
    projectId String
    The ID of the HCP project where the peering connection is located. Always matches the HVNs' project.
    selfLink String
    A unique URL identifying the peering connection
    state String
    The state of the HVN peering connection.
    createdAt string
    The time that the peering connection was created.
    expiresAt string
    The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvn1 string
    The unique URL of one of the HVNs being peered.
    hvn2 string
    The unique URL of one of the HVNs being peered.
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The ID of the HCP organization where the peering connection is located. Always matches the HVNs' organization.
    peeringId string
    The ID of the peering connection.
    projectId string
    The ID of the HCP project where the peering connection is located. Always matches the HVNs' project.
    selfLink string
    A unique URL identifying the peering connection
    state string
    The state of the HVN peering connection.
    created_at str
    The time that the peering connection was created.
    expires_at str
    The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvn1 str
    The unique URL of one of the HVNs being peered.
    hvn2 str
    The unique URL of one of the HVNs being peered.
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The ID of the HCP organization where the peering connection is located. Always matches the HVNs' organization.
    peering_id str
    The ID of the peering connection.
    project_id str
    The ID of the HCP project where the peering connection is located. Always matches the HVNs' project.
    self_link str
    A unique URL identifying the peering connection
    state str
    The state of the HVN peering connection.
    createdAt String
    The time that the peering connection was created.
    expiresAt String
    The time after which the peering connection will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvn1 String
    The unique URL of one of the HVNs being peered.
    hvn2 String
    The unique URL of one of the HVNs being peered.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the HCP organization where the peering connection is located. Always matches the HVNs' organization.
    peeringId String
    The ID of the peering connection.
    projectId String
    The ID of the HCP project where the peering connection is located. Always matches the HVNs' project.
    selfLink String
    A unique URL identifying the peering connection
    state String
    The state of the HVN peering connection.

    Package Details

    Repository
    hcp grapl-security/pulumi-hcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcp Terraform Provider.
    hcp logo
    HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security