Skip to content

Latest commit

 

History

History
127 lines (96 loc) · 3.55 KB

cluster_layout.md

File metadata and controls

127 lines (96 loc) · 3.55 KB
page_title subcategory description
morpheus_cluster_layout Resource - terraform-provider-morpheus
Provides a Morpheus cluster layout resource

morpheus_cluster_layout

Provides a Morpheus cluster layout resource

Example Usage

data "morpheus_cluster_type" "kubernetes_layout" {
  name = "Kubernetes Cluster"
}

data "morpheus_provision_type" "provision_layout" {
  name = "VMware"
}

resource "morpheus_cluster_layout" "example_kubernetes_layout" {
  name              = "tfexample cluster layout"
  description       = "Terraform example cluster layout"
  version           = "1.0"
  creatable         = false
  minimum_memory    = 4294967296
  workflow_id       = 2
  cluster_type_id   = data.morpheus_cluster_type.kubernetes_layout.id
  provision_type_id = data.morpheus_provision_type.provision_layout.id
  enable_scaling    = false
  option_type_ids = [
    1910,
    2037
  ]

  evar {
    name   = "application"
    value  = "first"
    export = true
  }

  master_node_pool {
    count          = 1
    node_type_id   = 3
    priority_order = 0
  }

  worker_node_pool {
    count          = 4
    node_type_id   = 4
    priority_order = 1
  }

  worker_node_pool {
    count          = 4
    node_type_id   = 3
    priority_order = 2
  }
}

Schema

Required

  • cluster_type_id (Number) The cluster type ID of the cluster layout
  • name (String) The name of the cluster layout
  • provision_type_id (Number) The provision type ID of the cluster layout
  • version (String) The version of the cluster layout

Optional

  • creatable (Boolean) Whether the cluster layout can be used to create clusters or not
  • description (String) The description of the cluster layout
  • enable_scaling (Boolean) Whether to enable or disable horizontal scaling
  • evar (Block List) The environment variables to create (see below for nested schema)
  • install_docker (Boolean) Whether to automatically install Docker or not
  • master_node_pool (Block List) Master node configuration (see below for nested schema)
  • minimum_memory (Number) The minimum amount of memory in bytes
  • option_type_ids (List of Number) A list of option type ids associated with the cluster layout
  • worker_node_pool (Block List) Worker node configuration (see below for nested schema)
  • workflow_id (Number) Workflow ID to associate with the cluster layout

Read-Only

  • id (String) The ID of the cluster layout

Nested Schema for evar

Optional:

  • export (Boolean) Whether the environment variable is exported as an instance tag
  • masked_value (String, Sensitive) The environment variable value when the value needs to be masked
  • name (String) The name of the environment variable
  • value (String) The environment variable value when the value can be in plaintext

Nested Schema for master_node_pool

Required:

  • count (Number) The number of nodes
  • node_type_id (Number) The id of the node type
  • priority_order (Number) The priority order of the node type

Nested Schema for worker_node_pool

Required:

  • count (Number) The number of nodes
  • node_type_id (Number) The id of the node type
  • priority_order (Number) The priority order of the node type

Import

Import is supported using the following syntax:

terraform import morpheus_cluster_layout.tf_example_cluster_layout 1