tfwriter

Terraform HCL code generator.

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

akamai_gtm_geomap

back

Index

Terraform

terraform {
  required_providers {
    akamai = ">= 1.5.0"
  }
}

top

Example Usage

module "akamai_gtm_geomap" {
  source = "./modules/akamai/r/akamai_gtm_geomap"

  # default_datacenter - (required) is a type of list of object
  default_datacenter = [{
    datacenter_id = null
    nickname      = null
  }]
  # domain - (required) is a type of string
  domain = null
  # name - (required) is a type of string
  name = null
  # wait_on_complete - (optional) is a type of bool
  wait_on_complete = null

  assignment = [{
    countries     = []
    datacenter_id = null
    nickname      = null
  }]
}

top

Variables

variable "default_datacenter" {
  description = "(required)"
  type = list(object(
    {
      datacenter_id = number
      nickname      = string
    }
  ))
}

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

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

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

variable "assignment" {
  description = "nested block: NestingList, min items: 0, max items: 0"
  type = set(object(
    {
      countries     = list(string)
      datacenter_id = number
      nickname      = string
    }
  ))
  default = []
}

top

Resource

resource "akamai_gtm_geomap" "this" {
  # default_datacenter - (required) is a type of list of object
  default_datacenter = var.default_datacenter
  # domain - (required) is a type of string
  domain = var.domain
  # name - (required) is a type of string
  name = var.name
  # wait_on_complete - (optional) is a type of bool
  wait_on_complete = var.wait_on_complete

  dynamic "assignment" {
    for_each = var.assignment
    content {
      # countries - (optional) is a type of list of string
      countries = assignment.value["countries"]
      # datacenter_id - (required) is a type of number
      datacenter_id = assignment.value["datacenter_id"]
      # nickname - (required) is a type of string
      nickname = assignment.value["nickname"]
    }
  }

}

top

Outputs

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

output "this" {
  value = akamai_gtm_geomap.this
}

top