tfwriter

Terraform HCL code generator.

Download as .zip Download as .tar.gz View on GitHub

alicloud_havip

back

Index

Terraform

terraform {
  required_providers {
    alicloud = ">= 1.120.0"
  }
}

top

Example Usage

module "alicloud_havip" {
  source = "./modules/alicloud/r/alicloud_havip"

  # description - (optional) is a type of string
  description = null
  # havip_name - (optional) is a type of string
  havip_name = null
  # ip_address - (optional) is a type of string
  ip_address = null
  # vswitch_id - (required) is a type of string
  vswitch_id = null

  timeouts = [{
    create = null
  }]
}

top

Variables

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

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

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

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

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

top

Resource

resource "alicloud_havip" "this" {
  # description - (optional) is a type of string
  description = var.description
  # havip_name - (optional) is a type of string
  havip_name = var.havip_name
  # ip_address - (optional) is a type of string
  ip_address = var.ip_address
  # vswitch_id - (required) is a type of string
  vswitch_id = var.vswitch_id

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

}

top

Outputs

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

output "ip_address" {
  description = "returns a string"
  value       = alicloud_havip.this.ip_address
}

output "status" {
  description = "returns a string"
  value       = alicloud_havip.this.status
}

output "this" {
  value = alicloud_havip.this
}

top