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

hcp.getAwsNetworkPeering

Explore with Pulumi AI

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

    The AWS network peering data source provides information about an existing network peering between an HVN and a peer AWS VPC.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Hcp = Pulumi.Hcp;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Hcp.GetAwsNetworkPeering.Invoke(new()
        {
            HvnId = @var.Hvn_id,
            PeeringId = @var.Peering_id,
            WaitForActiveState = true,
        });
    
    });
    
    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.LookupAwsNetworkPeering(ctx, &GetAwsNetworkPeeringArgs{
    			HvnId:              _var.Hvn_id,
    			PeeringId:          _var.Peering_id,
    			WaitForActiveState: pulumi.BoolRef(true),
    		}, 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.GetAwsNetworkPeeringArgs;
    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.getAwsNetworkPeering(GetAwsNetworkPeeringArgs.builder()
                .hvnId(var_.hvn_id())
                .peeringId(var_.peering_id())
                .waitForActiveState(true)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_hcp as hcp
    
    test = hcp.get_aws_network_peering(hvn_id=var["hvn_id"],
        peering_id=var["peering_id"],
        wait_for_active_state=True)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as hcp from "@pulumi/hcp";
    
    const test = hcp.getAwsNetworkPeering({
        hvnId: _var.hvn_id,
        peeringId: _var.peering_id,
        waitForActiveState: true,
    });
    
    variables:
      test:
        Fn::Invoke:
          Function: hcp:getAwsNetworkPeering
          Arguments:
            hvnId: ${var.hvn_id}
            peeringId: ${var.peering_id}
            waitForActiveState: true
    

    Using getAwsNetworkPeering

    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 getAwsNetworkPeering(args: GetAwsNetworkPeeringArgs, opts?: InvokeOptions): Promise<GetAwsNetworkPeeringResult>
    function getAwsNetworkPeeringOutput(args: GetAwsNetworkPeeringOutputArgs, opts?: InvokeOptions): Output<GetAwsNetworkPeeringResult>
    def get_aws_network_peering(hvn_id: Optional[str] = None,
                                peering_id: Optional[str] = None,
                                wait_for_active_state: Optional[bool] = None,
                                opts: Optional[InvokeOptions] = None) -> GetAwsNetworkPeeringResult
    def get_aws_network_peering_output(hvn_id: Optional[pulumi.Input[str]] = None,
                                peering_id: Optional[pulumi.Input[str]] = None,
                                wait_for_active_state: Optional[pulumi.Input[bool]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetAwsNetworkPeeringResult]
    func LookupAwsNetworkPeering(ctx *Context, args *LookupAwsNetworkPeeringArgs, opts ...InvokeOption) (*LookupAwsNetworkPeeringResult, error)
    func LookupAwsNetworkPeeringOutput(ctx *Context, args *LookupAwsNetworkPeeringOutputArgs, opts ...InvokeOption) LookupAwsNetworkPeeringResultOutput

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

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

    The following arguments are supported:

    HvnId string
    The ID of the HashiCorp Virtual Network (HVN).
    PeeringId string
    The ID of the network peering.
    WaitForActiveState bool
    HvnId string
    The ID of the HashiCorp Virtual Network (HVN).
    PeeringId string
    The ID of the network peering.
    WaitForActiveState bool
    hvnId String
    The ID of the HashiCorp Virtual Network (HVN).
    peeringId String
    The ID of the network peering.
    waitForActiveState Boolean
    hvnId string
    The ID of the HashiCorp Virtual Network (HVN).
    peeringId string
    The ID of the network peering.
    waitForActiveState boolean
    hvn_id str
    The ID of the HashiCorp Virtual Network (HVN).
    peering_id str
    The ID of the network peering.
    wait_for_active_state bool
    hvnId String
    The ID of the HashiCorp Virtual Network (HVN).
    peeringId String
    The ID of the network peering.
    waitForActiveState Boolean

    getAwsNetworkPeering Result

    The following output properties are available:

    CreatedAt string
    The time that the network peering was created.
    ExpiresAt string
    The time after which the network peering will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    HvnId string
    The ID of the HashiCorp Virtual Network (HVN).
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the HCP organization where the network peering is located. Always matches the HVN's organization.
    PeerAccountId string
    The account ID of the peer VPC in AWS.
    PeerVpcId string
    The ID of the peer VPC in AWS.
    PeerVpcRegion string
    The region of the peer VPC in AWS.
    PeeringId string
    The ID of the network peering.
    ProjectId string
    The ID of the HCP project where the network peering is located. Always matches the HVN's project.
    ProviderPeeringId string
    The peering connection ID used by AWS.
    SelfLink string
    A unique URL identifying the network peering.
    State string
    The state of the network peering.
    WaitForActiveState bool
    CreatedAt string
    The time that the network peering was created.
    ExpiresAt string
    The time after which the network peering will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    HvnId string
    The ID of the HashiCorp Virtual Network (HVN).
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the HCP organization where the network peering is located. Always matches the HVN's organization.
    PeerAccountId string
    The account ID of the peer VPC in AWS.
    PeerVpcId string
    The ID of the peer VPC in AWS.
    PeerVpcRegion string
    The region of the peer VPC in AWS.
    PeeringId string
    The ID of the network peering.
    ProjectId string
    The ID of the HCP project where the network peering is located. Always matches the HVN's project.
    ProviderPeeringId string
    The peering connection ID used by AWS.
    SelfLink string
    A unique URL identifying the network peering.
    State string
    The state of the network peering.
    WaitForActiveState bool
    createdAt String
    The time that the network peering was created.
    expiresAt String
    The time after which the network peering will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvnId String
    The ID of the HashiCorp Virtual Network (HVN).
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the HCP organization where the network peering is located. Always matches the HVN's organization.
    peerAccountId String
    The account ID of the peer VPC in AWS.
    peerVpcId String
    The ID of the peer VPC in AWS.
    peerVpcRegion String
    The region of the peer VPC in AWS.
    peeringId String
    The ID of the network peering.
    projectId String
    The ID of the HCP project where the network peering is located. Always matches the HVN's project.
    providerPeeringId String
    The peering connection ID used by AWS.
    selfLink String
    A unique URL identifying the network peering.
    state String
    The state of the network peering.
    waitForActiveState Boolean
    createdAt string
    The time that the network peering was created.
    expiresAt string
    The time after which the network peering will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvnId string
    The ID of the HashiCorp Virtual Network (HVN).
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The ID of the HCP organization where the network peering is located. Always matches the HVN's organization.
    peerAccountId string
    The account ID of the peer VPC in AWS.
    peerVpcId string
    The ID of the peer VPC in AWS.
    peerVpcRegion string
    The region of the peer VPC in AWS.
    peeringId string
    The ID of the network peering.
    projectId string
    The ID of the HCP project where the network peering is located. Always matches the HVN's project.
    providerPeeringId string
    The peering connection ID used by AWS.
    selfLink string
    A unique URL identifying the network peering.
    state string
    The state of the network peering.
    waitForActiveState boolean
    created_at str
    The time that the network peering was created.
    expires_at str
    The time after which the network peering will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvn_id str
    The ID of the HashiCorp Virtual Network (HVN).
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The ID of the HCP organization where the network peering is located. Always matches the HVN's organization.
    peer_account_id str
    The account ID of the peer VPC in AWS.
    peer_vpc_id str
    The ID of the peer VPC in AWS.
    peer_vpc_region str
    The region of the peer VPC in AWS.
    peering_id str
    The ID of the network peering.
    project_id str
    The ID of the HCP project where the network peering is located. Always matches the HVN's project.
    provider_peering_id str
    The peering connection ID used by AWS.
    self_link str
    A unique URL identifying the network peering.
    state str
    The state of the network peering.
    wait_for_active_state bool
    createdAt String
    The time that the network peering was created.
    expiresAt String
    The time after which the network peering will be considered expired if it hasn't transitioned into ACCEPTED or ACTIVE state.
    hvnId String
    The ID of the HashiCorp Virtual Network (HVN).
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the HCP organization where the network peering is located. Always matches the HVN's organization.
    peerAccountId String
    The account ID of the peer VPC in AWS.
    peerVpcId String
    The ID of the peer VPC in AWS.
    peerVpcRegion String
    The region of the peer VPC in AWS.
    peeringId String
    The ID of the network peering.
    projectId String
    The ID of the HCP project where the network peering is located. Always matches the HVN's project.
    providerPeeringId String
    The peering connection ID used by AWS.
    selfLink String
    A unique URL identifying the network peering.
    state String
    The state of the network peering.
    waitForActiveState Boolean

    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