1. Packages
  2. Juniper Mist
  3. API Docs
  4. device
  5. GatewayCluster
Juniper Mist v0.1.1 published on Monday, Nov 4, 2024 by Pulumi

junipermist.device.GatewayCluster

Explore with Pulumi AI

junipermist logo
Juniper Mist v0.1.1 published on Monday, Nov 4, 2024 by Pulumi

    This resource can be used to form or delete a Gateway Clusters. It can be used with two Gateways assigned to the same site. Once the Cluster is formed, it can be create just like a Gateway with the junipermist.device.Gateway resource:

    1. Claim the gateways and assign them to a site with the junipermist.org.Inventory resource
    2. Form the Cluster with the junipermist.device.GatewayCluster resource by providing the site_id and the two nodes MAC Addresses (the first in the list will be the node0)
    3. Configure the Cluster with the junipermist.device.Gateway resource

    Please check the Juniper Documentation first to validate the cabling between the Gateways

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as junipermist from "@pulumi/juniper-mist";
    
    const clusterOne = new junipermist.device.GatewayCluster("cluster_one", {
        siteId: terraformSite2.id,
        nodes: [
            {
                mac: "4c961000000",
            },
            {
                mac: "4c961000001",
            },
        ],
    });
    
    import pulumi
    import pulumi_juniper_mist as junipermist
    
    cluster_one = junipermist.device.GatewayCluster("cluster_one",
        site_id=terraform_site2["id"],
        nodes=[
            {
                "mac": "4c961000000",
            },
            {
                "mac": "4c961000001",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-junipermist/sdk/go/junipermist/device"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := device.NewGatewayCluster(ctx, "cluster_one", &device.GatewayClusterArgs{
    			SiteId: pulumi.Any(terraformSite2.Id),
    			Nodes: device.GatewayClusterNodeArray{
    				&device.GatewayClusterNodeArgs{
    					Mac: pulumi.String("4c961000000"),
    				},
    				&device.GatewayClusterNodeArgs{
    					Mac: pulumi.String("4c961000001"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using JuniperMist = Pulumi.JuniperMist;
    
    return await Deployment.RunAsync(() => 
    {
        var clusterOne = new JuniperMist.Device.GatewayCluster("cluster_one", new()
        {
            SiteId = terraformSite2.Id,
            Nodes = new[]
            {
                new JuniperMist.Device.Inputs.GatewayClusterNodeArgs
                {
                    Mac = "4c961000000",
                },
                new JuniperMist.Device.Inputs.GatewayClusterNodeArgs
                {
                    Mac = "4c961000001",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.junipermist.device.GatewayCluster;
    import com.pulumi.junipermist.device.GatewayClusterArgs;
    import com.pulumi.junipermist.device.inputs.GatewayClusterNodeArgs;
    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) {
            var clusterOne = new GatewayCluster("clusterOne", GatewayClusterArgs.builder()
                .siteId(terraformSite2.id())
                .nodes(            
                    GatewayClusterNodeArgs.builder()
                        .mac("4c961000000")
                        .build(),
                    GatewayClusterNodeArgs.builder()
                        .mac("4c961000001")
                        .build())
                .build());
    
        }
    }
    
    resources:
      clusterOne:
        type: junipermist:device:GatewayCluster
        name: cluster_one
        properties:
          siteId: ${terraformSite2.id}
          nodes:
            - mac: 4c961000000
            - mac: 4c961000001
    

    Create GatewayCluster Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GatewayCluster(name: string, args: GatewayClusterArgs, opts?: CustomResourceOptions);
    @overload
    def GatewayCluster(resource_name: str,
                       args: GatewayClusterArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def GatewayCluster(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       nodes: Optional[Sequence[GatewayClusterNodeArgs]] = None,
                       site_id: Optional[str] = None)
    func NewGatewayCluster(ctx *Context, name string, args GatewayClusterArgs, opts ...ResourceOption) (*GatewayCluster, error)
    public GatewayCluster(string name, GatewayClusterArgs args, CustomResourceOptions? opts = null)
    public GatewayCluster(String name, GatewayClusterArgs args)
    public GatewayCluster(String name, GatewayClusterArgs args, CustomResourceOptions options)
    
    type: junipermist:device:GatewayCluster
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args GatewayClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GatewayClusterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GatewayClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayClusterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var gatewayClusterResource = new JuniperMist.Device.GatewayCluster("gatewayClusterResource", new()
    {
        Nodes = new[]
        {
            new JuniperMist.Device.Inputs.GatewayClusterNodeArgs
            {
                Mac = "string",
            },
        },
        SiteId = "string",
    });
    
    example, err := device.NewGatewayCluster(ctx, "gatewayClusterResource", &device.GatewayClusterArgs{
    	Nodes: device.GatewayClusterNodeArray{
    		&device.GatewayClusterNodeArgs{
    			Mac: pulumi.String("string"),
    		},
    	},
    	SiteId: pulumi.String("string"),
    })
    
    var gatewayClusterResource = new GatewayCluster("gatewayClusterResource", GatewayClusterArgs.builder()
        .nodes(GatewayClusterNodeArgs.builder()
            .mac("string")
            .build())
        .siteId("string")
        .build());
    
    gateway_cluster_resource = junipermist.device.GatewayCluster("gatewayClusterResource",
        nodes=[{
            "mac": "string",
        }],
        site_id="string")
    
    const gatewayClusterResource = new junipermist.device.GatewayCluster("gatewayClusterResource", {
        nodes: [{
            mac: "string",
        }],
        siteId: "string",
    });
    
    type: junipermist:device:GatewayCluster
    properties:
        nodes:
            - mac: string
        siteId: string
    

    GatewayCluster Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The GatewayCluster resource accepts the following input properties:

    Nodes List<Pulumi.JuniperMist.Device.Inputs.GatewayClusterNode>
    when replacing a node, either mac has to remain the same as existing cluster
    SiteId string
    Nodes []GatewayClusterNodeArgs
    when replacing a node, either mac has to remain the same as existing cluster
    SiteId string
    nodes List<GatewayClusterNode>
    when replacing a node, either mac has to remain the same as existing cluster
    siteId String
    nodes GatewayClusterNode[]
    when replacing a node, either mac has to remain the same as existing cluster
    siteId string
    nodes Sequence[GatewayClusterNodeArgs]
    when replacing a node, either mac has to remain the same as existing cluster
    site_id str
    nodes List<Property Map>
    when replacing a node, either mac has to remain the same as existing cluster
    siteId String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GatewayCluster resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing GatewayCluster Resource

    Get an existing GatewayCluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GatewayClusterState, opts?: CustomResourceOptions): GatewayCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            nodes: Optional[Sequence[GatewayClusterNodeArgs]] = None,
            site_id: Optional[str] = None) -> GatewayCluster
    func GetGatewayCluster(ctx *Context, name string, id IDInput, state *GatewayClusterState, opts ...ResourceOption) (*GatewayCluster, error)
    public static GatewayCluster Get(string name, Input<string> id, GatewayClusterState? state, CustomResourceOptions? opts = null)
    public static GatewayCluster get(String name, Output<String> id, GatewayClusterState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Nodes List<Pulumi.JuniperMist.Device.Inputs.GatewayClusterNode>
    when replacing a node, either mac has to remain the same as existing cluster
    SiteId string
    Nodes []GatewayClusterNodeArgs
    when replacing a node, either mac has to remain the same as existing cluster
    SiteId string
    nodes List<GatewayClusterNode>
    when replacing a node, either mac has to remain the same as existing cluster
    siteId String
    nodes GatewayClusterNode[]
    when replacing a node, either mac has to remain the same as existing cluster
    siteId string
    nodes Sequence[GatewayClusterNodeArgs]
    when replacing a node, either mac has to remain the same as existing cluster
    site_id str
    nodes List<Property Map>
    when replacing a node, either mac has to remain the same as existing cluster
    siteId String

    Supporting Types

    GatewayClusterNode, GatewayClusterNodeArgs

    Mac string
    Gateway MAC Address. Format is [0-9a-f]{12} (e.g "5684dae9ac8b")
    Mac string
    Gateway MAC Address. Format is [0-9a-f]{12} (e.g "5684dae9ac8b")
    mac String
    Gateway MAC Address. Format is [0-9a-f]{12} (e.g "5684dae9ac8b")
    mac string
    Gateway MAC Address. Format is [0-9a-f]{12} (e.g "5684dae9ac8b")
    mac str
    Gateway MAC Address. Format is [0-9a-f]{12} (e.g "5684dae9ac8b")
    mac String
    Gateway MAC Address. Format is [0-9a-f]{12} (e.g "5684dae9ac8b")

    Import

    Using pulumi import, import mist_device_gateway_cluster with:

    Gateway cluster can be imported by specifying the org_id and the cluster_id

    $ pulumi import junipermist:device/gatewayCluster:GatewayCluster cluster_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    junipermist pulumi/pulumi-junipermist
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mist Terraform Provider.
    junipermist logo
    Juniper Mist v0.1.1 published on Monday, Nov 4, 2024 by Pulumi