1. Packages
  2. Consul Provider
  3. API Docs
  4. getDatacenters
Consul v3.12.4 published on Wednesday, Feb 12, 2025 by Pulumi

consul.getDatacenters

Explore with Pulumi AI

Consul v3.12.4 published on Wednesday, Feb 12, 2025 by Pulumi

The consul.getDatacenters data source returns the list of all knwown Consul datacenters.

Using getDatacenters

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 getDatacenters(opts?: InvokeOptions): Promise<GetDatacentersResult>
function getDatacentersOutput(opts?: InvokeOptions): Output<GetDatacentersResult>
Copy
def get_datacenters(opts: Optional[InvokeOptions] = None) -> GetDatacentersResult
def get_datacenters_output(opts: Optional[InvokeOptions] = None) -> Output[GetDatacentersResult]
Copy
func GetDatacenters(ctx *Context, opts ...InvokeOption) (*GetDatacentersResult, error)
func GetDatacentersOutput(ctx *Context, opts ...InvokeOption) GetDatacentersResultOutput
Copy

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

public static class GetDatacenters 
{
    public static Task<GetDatacentersResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetDatacentersResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDatacentersResult> getDatacenters(InvokeOptions options)
public static Output<GetDatacentersResult> getDatacenters(InvokeOptions options)
Copy
fn::invoke:
  function: consul:index/getDatacenters:getDatacenters
  arguments:
    # arguments dictionary
Copy

getDatacenters Result

The following output properties are available:

Datacenters List<string>
The list of datacenters known. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter.
Id string
The provider-assigned unique ID for this managed resource.
Datacenters []string
The list of datacenters known. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter.
Id string
The provider-assigned unique ID for this managed resource.
datacenters List<String>
The list of datacenters known. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter.
id String
The provider-assigned unique ID for this managed resource.
datacenters string[]
The list of datacenters known. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter.
id string
The provider-assigned unique ID for this managed resource.
datacenters Sequence[str]
The list of datacenters known. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter.
id str
The provider-assigned unique ID for this managed resource.
datacenters List<String>
The list of datacenters known. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter.
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
HashiCorp Consul pulumi/pulumi-consul
License
Apache-2.0
Notes
This Pulumi package is based on the consul Terraform Provider.
Consul v3.12.4 published on Wednesday, Feb 12, 2025 by Pulumi