1. Packages
  2. Consul Provider
  3. API Docs
  4. getPeering
Consul v3.12.2 published on Wednesday, Oct 16, 2024 by Pulumi

consul.getPeering

Explore with Pulumi AI

consul logo
Consul v3.12.2 published on Wednesday, Oct 16, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as consul from "@pulumi/consul";
    
    const basic = consul.getPeering({
        peerName: "peered-cluster",
    });
    
    import pulumi
    import pulumi_consul as consul
    
    basic = consul.get_peering(peer_name="peered-cluster")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-consul/sdk/v3/go/consul"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := consul.LookupPeering(ctx, &consul.LookupPeeringArgs{
    			PeerName: "peered-cluster",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Consul = Pulumi.Consul;
    
    return await Deployment.RunAsync(() => 
    {
        var basic = Consul.GetPeering.Invoke(new()
        {
            PeerName = "peered-cluster",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.consul.ConsulFunctions;
    import com.pulumi.consul.inputs.GetPeeringArgs;
    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 basic = ConsulFunctions.getPeering(GetPeeringArgs.builder()
                .peerName("peered-cluster")
                .build());
    
        }
    }
    
    variables:
      basic:
        fn::invoke:
          Function: consul:getPeering
          Arguments:
            peerName: peered-cluster
    

    Using getPeering

    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 getPeering(args: GetPeeringArgs, opts?: InvokeOptions): Promise<GetPeeringResult>
    function getPeeringOutput(args: GetPeeringOutputArgs, opts?: InvokeOptions): Output<GetPeeringResult>
    def get_peering(partition: Optional[str] = None,
                    peer_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetPeeringResult
    def get_peering_output(partition: Optional[pulumi.Input[str]] = None,
                    peer_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetPeeringResult]
    func LookupPeering(ctx *Context, args *LookupPeeringArgs, opts ...InvokeOption) (*LookupPeeringResult, error)
    func LookupPeeringOutput(ctx *Context, args *LookupPeeringOutputArgs, opts ...InvokeOption) LookupPeeringResultOutput

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

    public static class GetPeering 
    {
        public static Task<GetPeeringResult> InvokeAsync(GetPeeringArgs args, InvokeOptions? opts = null)
        public static Output<GetPeeringResult> Invoke(GetPeeringInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPeeringResult> getPeering(GetPeeringArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: consul:index/getPeering:getPeering
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PeerName string
    Partition string
    PeerName string
    Partition string
    peerName String
    partition String
    peerName string
    partition string
    peerName String
    partition String

    getPeering Result

    The following output properties are available:

    DeletedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    Meta Dictionary<string, string>
    PeerCaPems List<string>
    PeerId string
    PeerName string
    PeerServerAddresses List<string>
    PeerServerName string
    State string
    Partition string
    DeletedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    Meta map[string]string
    PeerCaPems []string
    PeerId string
    PeerName string
    PeerServerAddresses []string
    PeerServerName string
    State string
    Partition string
    deletedAt String
    id String
    The provider-assigned unique ID for this managed resource.
    meta Map<String,String>
    peerCaPems List<String>
    peerId String
    peerName String
    peerServerAddresses List<String>
    peerServerName String
    state String
    partition String
    deletedAt string
    id string
    The provider-assigned unique ID for this managed resource.
    meta {[key: string]: string}
    peerCaPems string[]
    peerId string
    peerName string
    peerServerAddresses string[]
    peerServerName string
    state string
    partition string
    deleted_at str
    id str
    The provider-assigned unique ID for this managed resource.
    meta Mapping[str, str]
    peer_ca_pems Sequence[str]
    peer_id str
    peer_name str
    peer_server_addresses Sequence[str]
    peer_server_name str
    state str
    partition str
    deletedAt String
    id String
    The provider-assigned unique ID for this managed resource.
    meta Map<String>
    peerCaPems List<String>
    peerId String
    peerName String
    peerServerAddresses List<String>
    peerServerName String
    state String
    partition String

    Package Details

    Repository
    HashiCorp Consul pulumi/pulumi-consul
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the consul Terraform Provider.
    consul logo
    Consul v3.12.2 published on Wednesday, Oct 16, 2024 by Pulumi