1. Packages
  2. Consul Provider
  3. API Docs
  4. getPeerings
Consul v3.12.1 published on Friday, Aug 23, 2024 by Pulumi

consul.getPeerings

Explore with Pulumi AI

consul logo
Consul v3.12.1 published on Friday, Aug 23, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as consul from "@pulumi/consul";
    
    const peers = consul.getPeerings({});
    
    import pulumi
    import pulumi_consul as consul
    
    peers = consul.get_peerings()
    
    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.GetPeerings(ctx, nil, 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 peers = Consul.GetPeerings.Invoke();
    
    });
    
    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.GetPeeringsArgs;
    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 peers = ConsulFunctions.getPeerings();
    
        }
    }
    
    variables:
      peers:
        fn::invoke:
          Function: consul:getPeerings
          Arguments: {}
    

    Using getPeerings

    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 getPeerings(args: GetPeeringsArgs, opts?: InvokeOptions): Promise<GetPeeringsResult>
    function getPeeringsOutput(args: GetPeeringsOutputArgs, opts?: InvokeOptions): Output<GetPeeringsResult>
    def get_peerings(partition: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPeeringsResult
    def get_peerings_output(partition: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPeeringsResult]
    func GetPeerings(ctx *Context, args *GetPeeringsArgs, opts ...InvokeOption) (*GetPeeringsResult, error)
    func GetPeeringsOutput(ctx *Context, args *GetPeeringsOutputArgs, opts ...InvokeOption) GetPeeringsResultOutput

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

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

    The following arguments are supported:

    Partition string
    Partition string
    partition String
    partition string
    partition String

    getPeerings Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Peers List<GetPeeringsPeer>
    Partition string
    Id string
    The provider-assigned unique ID for this managed resource.
    Peers []GetPeeringsPeer
    Partition string
    id String
    The provider-assigned unique ID for this managed resource.
    peers List<GetPeeringsPeer>
    partition String
    id string
    The provider-assigned unique ID for this managed resource.
    peers GetPeeringsPeer[]
    partition string
    id str
    The provider-assigned unique ID for this managed resource.
    peers Sequence[GetPeeringsPeer]
    partition str
    id String
    The provider-assigned unique ID for this managed resource.
    peers List<Property Map>
    partition String

    Supporting Types

    GetPeeringsPeer

    DeletedAt string
    Id string
    Meta Dictionary<string, string>
    Name string
    Partition string
    PeerCaPems List<string>
    PeerId string
    PeerServerAddresses List<string>
    PeerServerName string
    State string
    DeletedAt string
    Id string
    Meta map[string]string
    Name string
    Partition string
    PeerCaPems []string
    PeerId string
    PeerServerAddresses []string
    PeerServerName string
    State string
    deletedAt String
    id String
    meta Map<String,String>
    name String
    partition String
    peerCaPems List<String>
    peerId String
    peerServerAddresses List<String>
    peerServerName String
    state String
    deletedAt string
    id string
    meta {[key: string]: string}
    name string
    partition string
    peerCaPems string[]
    peerId string
    peerServerAddresses string[]
    peerServerName string
    state string
    deleted_at str
    id str
    meta Mapping[str, str]
    name str
    partition str
    peer_ca_pems Sequence[str]
    peer_id str
    peer_server_addresses Sequence[str]
    peer_server_name str
    state str
    deletedAt String
    id String
    meta Map<String>
    name String
    partition String
    peerCaPems List<String>
    peerId String
    peerServerAddresses List<String>
    peerServerName String
    state 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.1 published on Friday, Aug 23, 2024 by Pulumi