Consul v3.11.3 published on Friday, May 24, 2024 by Pulumi
consul.getPeerings
Explore with Pulumi AI
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 str
- partition String
getPeerings Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Peers
List<Get
Peerings Peer> - Partition string
- Id string
- The provider-assigned unique ID for this managed resource.
- Peers
[]Get
Peerings Peer - Partition string
- id String
- The provider-assigned unique ID for this managed resource.
- peers
List<Get
Peerings Peer> - partition String
- id string
- The provider-assigned unique ID for this managed resource.
- peers
Get
Peerings Peer[] - partition string
- id str
- The provider-assigned unique ID for this managed resource.
- peers
Sequence[Get
Peerings Peer] - partition str
- id String
- The provider-assigned unique ID for this managed resource.
- peers List<Property Map>
- partition String
Supporting Types
GetPeeringsPeer
- Deleted
At string - Id string
- Meta Dictionary<string, string>
- Name string
- Partition string
- Peer
Ca List<string>Pems - Peer
Id string - Peer
Server List<string>Addresses - Peer
Server stringName - State string
- Deleted
At string - Id string
- Meta map[string]string
- Name string
- Partition string
- Peer
Ca []stringPems - Peer
Id string - Peer
Server []stringAddresses - Peer
Server stringName - State string
- deleted
At String - id String
- meta Map<String,String>
- name String
- partition String
- peer
Ca List<String>Pems - peer
Id String - peer
Server List<String>Addresses - peer
Server StringName - state String
- deleted
At string - id string
- meta {[key: string]: string}
- name string
- partition string
- peer
Ca string[]Pems - peer
Id string - peer
Server string[]Addresses - peer
Server stringName - state string
- deleted_
at str - id str
- meta Mapping[str, str]
- name str
- partition str
- peer_
ca_ Sequence[str]pems - peer_
id str - peer_
server_ Sequence[str]addresses - peer_
server_ strname - state str
- deleted
At String - id String
- meta Map<String>
- name String
- partition String
- peer
Ca List<String>Pems - peer
Id String - peer
Server List<String>Addresses - peer
Server StringName - 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.