GuideReference
TrainingSupportCommunity
Guide

Datacenter

akamai_gtm_datacenter

Get details about a given domain's data center.

data "akamai_gtm_datacenter" "my_datacenter" {
      domain = "example.domain.net"
      datacenter_id = 1234
}

output "my_datacenter" {
  value = data.akamai_gtm_datacenter.my_datacenter
}
Changes to Outputs:
+ my_datacenter = {
    + datacenter = [
        + {
            + city                              = "Bath"
            + clone_of                          = 0
            + cloud_server_host_header_override = false
            + cloud_server_targeting            = false
            + continent                         = "EU"
            + country                           = "GB"
            + datacenter_id                     = 1234
            + default_load_object               = []
            + latitude                          = 51.380001
            + links                             = [
                + {
                    + href = "https://akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net/config-gtm/v1/domains/example.akadns.net/datacenters/1234"
                    + rel  = "self"
                  },
              ]
            + longitude                         = -2.360000
            + nickname                          = "example_1"
            + score_penalty                     = 0
            + servermonitor_pool                = ""
            + state_or_province                 = ""
            + virtual                           = true
          },
      ]
    + domain      = "example.alb.akadns.net"
    + id          = "example.alb.akadns.net"
  } 
variable "datacenter_id" {
    type: string
    description: "My US data center ID"
    default = "4321"
}
variable "nickname" {
    type: string
    description: "My US data center nickname"
    default = "example_2"
}
// local
datacenter_id = data.akamai_gtm_datacenter.my_datacenter.datacenter.datacenter_id
nickname= data.akamai_gtm_datacenter.my_datacenter.datacenter.nickname

// tvars
datacenter_id = var.datacenter_id
nickname = var.nickname

Arguments

ArgumentRequiredDescription
domain✔️The human-readable name for your domain.
datacenter_id✔️A data center ID for your domain.

Attributes

Returned to you is a computed list of details about the given data center within the provided domain.