Skip to content

Latest commit

 

History

History
185 lines (149 loc) · 3.41 KB

brightbox_cloudip.md

File metadata and controls

185 lines (149 loc) · 3.41 KB

brightbox_cloudip

back

Index

Terraform

terraform {
  required_providers {
    brightbox = ">= 2.0.3"
  }
}

top

Example Usage

module "brightbox_cloudip" {
  source = "./modules/brightbox/r/brightbox_cloudip"

  # name - (optional) is a type of string
  name = null
  # reverse_dns - (optional) is a type of string
  reverse_dns = null
  # target - (optional) is a type of string
  target = null

  port_translator = [{
    incoming = null
    outgoing = null
    protocol = null
  }]

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

top

Variables

variable "name" {
  description = "(optional) - Name assigned to the Cloud IP"
  type        = string
  default     = null
}

variable "reverse_dns" {
  description = "(optional) - Reverse DNS entry for the Cloud IP"
  type        = string
  default     = null
}

variable "target" {
  description = "(optional) - The object this Cloud IP maps to"
  type        = string
  default     = null
}

variable "port_translator" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      incoming = number
      outgoing = number
      protocol = string
    }
  ))
  default = []
}

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

top

Resource

resource "brightbox_cloudip" "this" {
  # name - (optional) is a type of string
  name = var.name
  # reverse_dns - (optional) is a type of string
  reverse_dns = var.reverse_dns
  # target - (optional) is a type of string
  target = var.target

  dynamic "port_translator" {
    for_each = var.port_translator
    content {
      # incoming - (required) is a type of number
      incoming = port_translator.value["incoming"]
      # outgoing - (required) is a type of number
      outgoing = port_translator.value["outgoing"]
      # protocol - (required) is a type of string
      protocol = port_translator.value["protocol"]
    }
  }

  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 "fqdn" {
  description = "returns a string"
  value       = brightbox_cloudip.this.fqdn
}

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

output "locked" {
  description = "returns a string"
  value       = brightbox_cloudip.this.locked
}

output "public_ip" {
  description = "returns a string"
  value       = brightbox_cloudip.this.public_ip
}

output "public_ipv4" {
  description = "returns a string"
  value       = brightbox_cloudip.this.public_ipv4
}

output "public_ipv6" {
  description = "returns a string"
  value       = brightbox_cloudip.this.public_ipv6
}

output "reverse_dns" {
  description = "returns a string"
  value       = brightbox_cloudip.this.reverse_dns
}

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

output "this" {
  value = brightbox_cloudip.this
}

top