1. Packages
  2. Avi Provider
  3. API Docs
  4. getCluster
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

avi.getCluster

Explore with Pulumi AI

avi logo
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

    <!–

    Copyright 2021 VMware, Inc.
    SPDX-License-Identifier: Mozilla Public License 2.0
    

    –>

    layout: “avi”

    page_title: “AVI: avi.Cluster” sidebar_current: “docs-avi-datasource-cluster” description: |- Get information of Avi Cluster.

    avi.Cluster

    This data source is used to to get avi.Cluster objects.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as avi from "@pulumi/avi";
    
    const fooCluster = avi.getCluster({
        name: "foo",
        uuid: "cluster-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
    });
    
    import pulumi
    import pulumi_avi as avi
    
    foo_cluster = avi.get_cluster(name="foo",
        uuid="cluster-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := avi.LookupCluster(ctx, &avi.LookupClusterArgs{
    			Name: pulumi.StringRef("foo"),
    			Uuid: pulumi.StringRef("cluster-f9cf6b3e-a411-436f-95e2-2982ba2b217b"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Avi = Pulumi.Avi;
    
    return await Deployment.RunAsync(() => 
    {
        var fooCluster = Avi.GetCluster.Invoke(new()
        {
            Name = "foo",
            Uuid = "cluster-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.avi.AviFunctions;
    import com.pulumi.avi.inputs.GetClusterArgs;
    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 fooCluster = AviFunctions.getCluster(GetClusterArgs.builder()
                .name("foo")
                .uuid("cluster-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
                .build());
    
        }
    }
    
    variables:
      fooCluster:
        fn::invoke:
          function: avi:getCluster
          arguments:
            name: foo
            uuid: cluster-f9cf6b3e-a411-436f-95e2-2982ba2b217b
    

    Using getCluster

    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 getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
    function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
    def get_cluster(cluster_states: Optional[Sequence[GetClusterClusterState]] = None,
                    id: Optional[str] = None,
                    name: Optional[str] = None,
                    tenant_ref: Optional[str] = None,
                    uuid: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetClusterResult
    def get_cluster_output(cluster_states: Optional[pulumi.Input[Sequence[pulumi.Input[GetClusterClusterStateArgs]]]] = None,
                    id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    tenant_ref: Optional[pulumi.Input[str]] = None,
                    uuid: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
    func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
    func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput

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

    public static class GetCluster 
    {
        public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    public static Output<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: avi:index/getCluster:getCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterStates List<GetClusterClusterState>
    Id string
    Name string
    Search Cluster by name.
    TenantRef string
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Search Cluster by uuid.
    ClusterStates []GetClusterClusterState
    Id string
    Name string
    Search Cluster by name.
    TenantRef string
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Search Cluster by uuid.
    clusterStates List<GetClusterClusterState>
    id String
    name String
    Search Cluster by name.
    tenantRef String
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Search Cluster by uuid.
    clusterStates GetClusterClusterState[]
    id string
    name string
    Search Cluster by name.
    tenantRef string
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid string
    Search Cluster by uuid.
    cluster_states Sequence[GetClusterClusterState]
    id str
    name str
    Search Cluster by name.
    tenant_ref str
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid str
    Search Cluster by uuid.
    clusterStates List<Property Map>
    id String
    name String
    Search Cluster by name.
    tenantRef String
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Search Cluster by uuid.

    getCluster Result

    The following output properties are available:

    Id string
    Name string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Nodes List<GetClusterNode>
    Minimum of 1 items required. Maximum of 7 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    RejoinNodesAutomatically string
    Re-join cluster nodes automatically in the event one of the node is reset to factory. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    TenantRef string
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    VirtualIp6s List<GetClusterVirtualIp6>
    A v6 virtual ip address for the cluster that always points to the v6 ip of the leader node in cluster. Field introduced in 30.2.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    VirtualIps List<GetClusterVirtualIp>
    A v4 virtual ip address for the cluster that always points to the v4 ip of the leader node in cluster. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ClusterStates List<GetClusterClusterState>
    Id string
    Name string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Nodes []GetClusterNode
    Minimum of 1 items required. Maximum of 7 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    RejoinNodesAutomatically string
    Re-join cluster nodes automatically in the event one of the node is reset to factory. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    TenantRef string
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    VirtualIp6s []GetClusterVirtualIp6
    A v6 virtual ip address for the cluster that always points to the v6 ip of the leader node in cluster. Field introduced in 30.2.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    VirtualIps []GetClusterVirtualIp
    A v4 virtual ip address for the cluster that always points to the v4 ip of the leader node in cluster. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ClusterStates []GetClusterClusterState
    id String
    name String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    nodes List<GetClusterNode>
    Minimum of 1 items required. Maximum of 7 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rejoinNodesAutomatically String
    Re-join cluster nodes automatically in the event one of the node is reset to factory. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef String
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    virtualIp6s List<GetClusterVirtualIp6>
    A v6 virtual ip address for the cluster that always points to the v6 ip of the leader node in cluster. Field introduced in 30.2.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    virtualIps List<GetClusterVirtualIp>
    A v4 virtual ip address for the cluster that always points to the v4 ip of the leader node in cluster. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    clusterStates List<GetClusterClusterState>
    id string
    name string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    nodes GetClusterNode[]
    Minimum of 1 items required. Maximum of 7 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rejoinNodesAutomatically string
    Re-join cluster nodes automatically in the event one of the node is reset to factory. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef string
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid string
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    virtualIp6s GetClusterVirtualIp6[]
    A v6 virtual ip address for the cluster that always points to the v6 ip of the leader node in cluster. Field introduced in 30.2.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    virtualIps GetClusterVirtualIp[]
    A v4 virtual ip address for the cluster that always points to the v4 ip of the leader node in cluster. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    clusterStates GetClusterClusterState[]
    id str
    name str
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    nodes Sequence[GetClusterNode]
    Minimum of 1 items required. Maximum of 7 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rejoin_nodes_automatically str
    Re-join cluster nodes automatically in the event one of the node is reset to factory. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenant_ref str
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid str
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    virtual_ip6s Sequence[GetClusterVirtualIp6]
    A v6 virtual ip address for the cluster that always points to the v6 ip of the leader node in cluster. Field introduced in 30.2.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    virtual_ips Sequence[GetClusterVirtualIp]
    A v4 virtual ip address for the cluster that always points to the v4 ip of the leader node in cluster. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    cluster_states Sequence[GetClusterClusterState]
    id String
    name String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    nodes List<Property Map>
    Minimum of 1 items required. Maximum of 7 items allowed. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    rejoinNodesAutomatically String
    Re-join cluster nodes automatically in the event one of the node is reset to factory. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    tenantRef String
    It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    virtualIp6s List<Property Map>
    A v6 virtual ip address for the cluster that always points to the v6 ip of the leader node in cluster. Field introduced in 30.2.1. Allowed with any value in enterprise, enterprise with cloud services edition.
    virtualIps List<Property Map>
    A v4 virtual ip address for the cluster that always points to the v4 ip of the leader node in cluster. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    clusterStates List<Property Map>

    Supporting Types

    GetClusterClusterState

    Progress string
    State string
    UpSince string
    Progress string
    State string
    UpSince string
    progress String
    state String
    upSince String
    progress string
    state string
    upSince string
    progress String
    state String
    upSince String

    GetClusterNode

    GetClusterNodeInterface

    GetClusterNodeInterfaceGateway

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeInterfaceGateway6

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeInterfaceIp

    GetClusterNodeInterfaceIp6

    GetClusterNodeInterfaceIp6IpAddr

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeInterfaceIpIpAddr

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeInterfacePublicIpOrName

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeIp

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeIp6

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodePublicIpOrName

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeStaticRoute

    GetClusterNodeStaticRouteLabel

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    GetClusterNodeStaticRouteNextHop

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterNodeStaticRoutePrefix

    GetClusterNodeStaticRoutePrefixIpAddr

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterVirtualIp

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetClusterVirtualIp6

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    Package Details

    Repository
    avi vmware/terraform-provider-avi
    License
    Notes
    This Pulumi package is based on the avi Terraform Provider.
    avi logo
    avi 31.1.1 published on Monday, Apr 14, 2025 by vmware