GuideReference
TrainingSupportCommunity

Resources

akamai_gtm_resources

Get details about all resources assigned to a GTM domain.

data "akamai_gtm_resources" "my_gtm_resources" {
  domain = "my_gtm_domain.akadns.net"
}

output "my_gtm_resources" {
  value = data.akamai_gtm_resources.my_gtm_resources
}  
Changes to Outputs:
  + my_gtm_resources = {
      + domain    = "my_gtm_domain.akadns.net"
      + id        = "akamai_gtm_resources"
      + resources = [
          + {
              + aggregation_type               = "sum"
              + constrained_property           = ""
              + description                    = "Testing resource"
              + host_header                    = "header"
              + leader_string                  = "leader"
              + links                          = [
                  + {
                      + href = "https://akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net/config-gtm/v1/domains/example_domain.akadns.net/resources/resource1"
                      + rel  = "self"
                    },
                ]
              + load_imbalance_percentage      = 0
              + name                           = "resource1"
              + resource_instances             = [
                  + {
                      + datacenter_id           = 1
                      + load_object             = ""
                      + load_object_port        = 1234
                      + load_servers            = [
                          + "0.0.0.1",
                        ]
                      + use_default_load_object = false
                    },
                  + {
                      + datacenter_id           = 2
                      + load_object             = ""
                      + load_object_port        = 1234
                      + load_servers            = [
                          + "0.0.0.2",
                        ]
                      + use_default_load_object = false
                    },
                ]
              + type                           = "Non-XML load object via HTTP"
              + upper_bound                    = 0
            },
        ]
    } 

Arguments

Pass a domain name in the data block.

Attributes

Returned are high-level details about the resources assigned to your GTM domain.

ArgumentDescription
aggregation_typeSpecifies how GTM handles different load numbers when multiple load servers are used for a data center or property. Values returned are:
  • latest. Takes the values with the latest timestamp.
  • median. Takes the median of the values.
  • sum. Takes the sum of the values.
constrained_propertySpecifies the name of the property that this resource constraints.
descriptionA descriptive note to help you track what the resource constraints.
domainThe GTM domain name.
host_headerSpecifies the host header used when fetching the load object.
idIdentifier for this instance of the data source.
leader_stringSpecifies the text that comes before the load_object. GTM assumes that the current load is the first number to appear after this string, minus any white space. The value is a maximum of 256 characters. The default is null.
linksAn object providing the direct URL to the GTM resource. Contains:
  • rel. The link relationship of the object.
  • href. The fully-qualified URL that defines the GTM resource.
load_imbalance_percentageIndicates the percent of load imbalance factor for the domain.
typeIndicates the kind of load_object format used to determine the load on the resource. Values include:
  • XML load object via HTTP
  • XML load object via HTTPS
  • Non-XML load object via HTTP
  • Non-XML load object via HTTPS
  • Download score
  • Push API
upper_boundAn optional sanity check that specifies the maximum allowed value for any component of the load object.
resource_instancesAn object listing instances of the resource by data center. Value options:
  • datacenter_id. A unique identifier for an existing data center in the domain.
  • load_object. Identifies the load object file used to report real-time information about the current load, maximum allowable load and target load on each resource.
  • load_object_port. Specifies the TCP port of the load_object.
  • load_servers. Specifies the list of servers to requests the load object from.
  • use_default_load_object. Whether to use default load_object. If the load_object