tfwriter

Terraform HCL code generator.

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

alicloud_eip_association

back

Index

Terraform

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

top

Example Usage

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

  # allocation_id - (required) is a type of string
  allocation_id = null
  # force - (optional) is a type of bool
  force = null
  # instance_id - (required) is a type of string
  instance_id = null
  # instance_type - (optional) is a type of string
  instance_type = null
  # private_ip_address - (optional) is a type of string
  private_ip_address = null
}

top

Variables

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

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

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

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

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

top

Resource

resource "alicloud_eip_association" "this" {
  # allocation_id - (required) is a type of string
  allocation_id = var.allocation_id
  # force - (optional) is a type of bool
  force = var.force
  # instance_id - (required) is a type of string
  instance_id = var.instance_id
  # instance_type - (optional) is a type of string
  instance_type = var.instance_type
  # private_ip_address - (optional) is a type of string
  private_ip_address = var.private_ip_address
}

top

Outputs

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

output "instance_type" {
  description = "returns a string"
  value       = alicloud_eip_association.this.instance_type
}

output "private_ip_address" {
  description = "returns a string"
  value       = alicloud_eip_association.this.private_ip_address
}

output "this" {
  value = alicloud_eip_association.this
}

top