Skip to content

Latest commit

 

History

History
209 lines (173 loc) · 4.29 KB

File metadata and controls

209 lines (173 loc) · 4.29 KB

ecl_dedicated_hypervisor_server_v1

back

Index

Terraform

terraform {
  required_providers {
    ecl = ">= 2.0.0"
  }
}

top

Example Usage

module "ecl_dedicated_hypervisor_server_v1" {
  source = "./modules/ecl/r/ecl_dedicated_hypervisor_server_v1"

  # admin_pass - (optional) is a type of string
  admin_pass = null
  # availability_zone - (optional) is a type of string
  availability_zone = null
  # description - (optional) is a type of string
  description = null
  # flavor_ref - (required) is a type of string
  flavor_ref = null
  # image_ref - (required) is a type of string
  image_ref = null
  # metadata - (optional) is a type of map of string
  metadata = {}
  # name - (required) is a type of string
  name = null

  networks = [{
    fixed_ip        = null
    plane           = null
    port            = null
    segmentation_id = null
    uuid            = null
  }]

  timeouts = [{
    create = null
    delete = null
  }]
}

top

Variables

variable "admin_pass" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "availability_zone" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "description" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "flavor_ref" {
  description = "(required)"
  type        = string
}

variable "image_ref" {
  description = "(required)"
  type        = string
}

variable "metadata" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

variable "name" {
  description = "(required)"
  type        = string
}

variable "networks" {
  description = "nested block: NestingList, min items: 1, max items: 4"
  type = set(object(
    {
      fixed_ip        = string
      plane           = string
      port            = string
      segmentation_id = number
      uuid            = string
    }
  ))
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      create = string
      delete = string
    }
  ))
  default = []
}

top

Resource

resource "ecl_dedicated_hypervisor_server_v1" "this" {
  # admin_pass - (optional) is a type of string
  admin_pass = var.admin_pass
  # availability_zone - (optional) is a type of string
  availability_zone = var.availability_zone
  # description - (optional) is a type of string
  description = var.description
  # flavor_ref - (required) is a type of string
  flavor_ref = var.flavor_ref
  # image_ref - (required) is a type of string
  image_ref = var.image_ref
  # metadata - (optional) is a type of map of string
  metadata = var.metadata
  # name - (required) is a type of string
  name = var.name

  dynamic "networks" {
    for_each = var.networks
    content {
      # fixed_ip - (optional) is a type of string
      fixed_ip = networks.value["fixed_ip"]
      # plane - (required) is a type of string
      plane = networks.value["plane"]
      # port - (optional) is a type of string
      port = networks.value["port"]
      # segmentation_id - (required) is a type of number
      segmentation_id = networks.value["segmentation_id"]
      # uuid - (optional) is a type of string
      uuid = networks.value["uuid"]
    }
  }

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
    }
  }

}

top

Outputs

output "admin_pass" {
  description = "returns a string"
  value       = ecl_dedicated_hypervisor_server_v1.this.admin_pass
}

output "availability_zone" {
  description = "returns a string"
  value       = ecl_dedicated_hypervisor_server_v1.this.availability_zone
}

output "baremetal_server_id" {
  description = "returns a string"
  value       = ecl_dedicated_hypervisor_server_v1.this.baremetal_server_id
}

output "id" {
  description = "returns a string"
  value       = ecl_dedicated_hypervisor_server_v1.this.id
}

output "this" {
  value = ecl_dedicated_hypervisor_server_v1.this
}

top