Datacenters
akamai_gtm_datacenters
Get a list of your domain's data centers.
data "akamai_gtm_datacenters" "my_datacenters" {
domain = "example.domain.net"
}
output "my_datacenters" {
value = data.akamai_gtm_datacenters.my_datacenters
}
Changes to Outputs:
+ my_datacenters = {
+ datacenters = [
+ {
+ 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
},
{
+ city = "Boston"
+ clone_of = 0
+ cloud_server_host_header_override = false
+ cloud_server_targeting = false
+ continent = "NA"
+ country = "US"
+ datacenter_id = 4321
+ default_load_object = []
+ latitude = 42.3601
+ links = [
+ {
+ href = "https://akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net/config-gtm/v1/domains/example.akadns.net/datacenters/4321"
+ rel = "self"
},
]
+ longitude = 71.0589
+ nickname = "example_2"
+ score_penalty = 0
+ servermonitor_pool = ""
+ state_or_province = ""
+ virtual = true
},
]
+ domain = "example.alb.akadns.net"
+ id = "example.alb.akadns.net"
}
// choose which data center from your returned list for the values
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_datacenters.my_datacenters.datacenters[1].datacenter_id
nickname = data.akamai_gtm_datacenters.my_datacenters.datacenters[1].nickname
// tvars
datacenter_id = var.datacenter_id
nickname = var.nickname
Arguments
Pass a domain name as the value for the domain
argument.
Attributes
Returned to you is a computed list of details about the set of data centers assigned to your given domain.
Updated about 1 year ago