GtmDatacenter

Use the akamai.GtmDatacenter resource to create, configure, and import a GTM data center. A GTM data center represents a customer data center and is also known as a traffic target, a location containing many servers GTM can direct traffic to.

GTM uses data centers to scale load balancing. For example, you might have data centers in both New York and Amsterdam and want to balance load between them. You can configure GTM to send US users to the New York data center and European users to the data center in Amsterdam.

Note Import requires an ID with this format: existing_domain_name:existing_datacenter_id.

Argument reference

This resource supports these arguments:

  • domain - (Required) The GTM domain name for the data center.
  • wait_on_complete - (Optional) A boolean, that if set to true, waits for transaction to complete.
  • nickname - (Optional) A descriptive label for the data center.
  • default_load_object - (Optional) Specifies the load reporting interface between you and the GTM system. If used, requires these additional arguments:
    • load_object - A load object is a file that provides real-time information about the current load, maximum allowable load, and target load on each resource.
    • load_object_port - Specifies the TCP port to connect to when requesting the load object.
    • load_servers - Specifies a list of servers to request the load object from.
  • city - (Optional) The name of the city where the data center is located.
  • clone_of - (Optional) Identifies the data center’s datacenter_id of which this data center is a clone.
  • cloud_server_targeting - (Optional) A boolean indicating whether to balance load between two or more servers in a cloud environment.
  • cloud_server_host_header_override - (Optional) A boolean that, if set to true, Akamai’s liveness test agents use the Host header configured in the liveness test.
  • continent - (Optional) A two-letter code that specifies the continent where the data center maps to.
  • country - (Optional) A two-letter ISO 3166 country code that specifies the country where the data center maps to.
  • latitude - (Optional) Specifies the geographical latitude of the data center’s position. See also longitude within this object.
  • longitude - (Optional) Specifies the geographic longitude of the data center’s position. See also latitude within this object.
  • state_or_province - (Optional) Specifies a two-letter ISO 3166 country code for the state or province where the data center is located.

Attribute reference

This resource returns these computed attributes in the state file:

  • datacenter_id - A unique identifier for an existing data center in the domain.
  • ping_interval
  • ping_packet_size
  • score_penalty
  • servermonitor_liveness_count
  • servermonitor_load_count
  • servermonitor_pool
  • virtual - A boolean indicating whether the data center is virtual or physical, the latter meaning the data center has an Akamai Network Agent installed, and its physical location (latitude, longitude) is fixed. Either true if virtual or false if physical.

Schema reference

You can download the GTM Data Center backing schema from the Global Traffic Management API page.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var demoDatacenter = new Akamai.GtmDatacenter("demoDatacenter", new Akamai.GtmDatacenterArgs
        {
            Domain = "demo_domain.akadns.net",
            Nickname = "demo_datacenter",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v2/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := akamai.NewGtmDatacenter(ctx, "demoDatacenter", &akamai.GtmDatacenterArgs{
			Domain:   pulumi.String("demo_domain.akadns.net"),
			Nickname: pulumi.String("demo_datacenter"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

demo_datacenter = akamai.GtmDatacenter("demoDatacenter",
    domain="demo_domain.akadns.net",
    nickname="demo_datacenter")
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const demoDatacenter = new akamai.GtmDatacenter("demo_datacenter", {
    domain: "demo_domain.akadns.net",
    nickname: "demo_datacenter",
});

Create a GtmDatacenter Resource

new GtmDatacenter(name: string, args: GtmDatacenterArgs, opts?: CustomResourceOptions);
@overload
def GtmDatacenter(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  city: Optional[str] = None,
                  clone_of: Optional[int] = None,
                  cloud_server_host_header_override: Optional[bool] = None,
                  cloud_server_targeting: Optional[bool] = None,
                  continent: Optional[str] = None,
                  country: Optional[str] = None,
                  default_load_object: Optional[GtmDatacenterDefaultLoadObjectArgs] = None,
                  domain: Optional[str] = None,
                  latitude: Optional[float] = None,
                  longitude: Optional[float] = None,
                  nickname: Optional[str] = None,
                  state_or_province: Optional[str] = None,
                  wait_on_complete: Optional[bool] = None)
@overload
def GtmDatacenter(resource_name: str,
                  args: GtmDatacenterArgs,
                  opts: Optional[ResourceOptions] = None)
func NewGtmDatacenter(ctx *Context, name string, args GtmDatacenterArgs, opts ...ResourceOption) (*GtmDatacenter, error)
public GtmDatacenter(string name, GtmDatacenterArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args GtmDatacenterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args GtmDatacenterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GtmDatacenterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GtmDatacenterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

GtmDatacenter Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The GtmDatacenter resource accepts the following input properties:

Outputs

All input properties are implicitly available as output properties. Additionally, the GtmDatacenter resource produces the following output properties:

DatacenterId int
Id string
The provider-assigned unique ID for this managed resource.
PingInterval int
PingPacketSize int
ScorePenalty int
ServermonitorLivenessCount int
ServermonitorLoadCount int
ServermonitorPool string
Virtual bool
DatacenterId int
Id string
The provider-assigned unique ID for this managed resource.
PingInterval int
PingPacketSize int
ScorePenalty int
ServermonitorLivenessCount int
ServermonitorLoadCount int
ServermonitorPool string
Virtual bool
datacenterId number
id string
The provider-assigned unique ID for this managed resource.
pingInterval number
pingPacketSize number
scorePenalty number
servermonitorLivenessCount number
servermonitorLoadCount number
servermonitorPool string
virtual boolean
datacenter_id int
id str
The provider-assigned unique ID for this managed resource.
ping_interval int
ping_packet_size int
score_penalty int
servermonitor_liveness_count int
servermonitor_load_count int
servermonitor_pool str
virtual bool

Look up an Existing GtmDatacenter Resource

Get an existing GtmDatacenter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GtmDatacenterState, opts?: CustomResourceOptions): GtmDatacenter
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        city: Optional[str] = None,
        clone_of: Optional[int] = None,
        cloud_server_host_header_override: Optional[bool] = None,
        cloud_server_targeting: Optional[bool] = None,
        continent: Optional[str] = None,
        country: Optional[str] = None,
        datacenter_id: Optional[int] = None,
        default_load_object: Optional[GtmDatacenterDefaultLoadObjectArgs] = None,
        domain: Optional[str] = None,
        latitude: Optional[float] = None,
        longitude: Optional[float] = None,
        nickname: Optional[str] = None,
        ping_interval: Optional[int] = None,
        ping_packet_size: Optional[int] = None,
        score_penalty: Optional[int] = None,
        servermonitor_liveness_count: Optional[int] = None,
        servermonitor_load_count: Optional[int] = None,
        servermonitor_pool: Optional[str] = None,
        state_or_province: Optional[str] = None,
        virtual: Optional[bool] = None,
        wait_on_complete: Optional[bool] = None) -> GtmDatacenter
func GetGtmDatacenter(ctx *Context, name string, id IDInput, state *GtmDatacenterState, opts ...ResourceOption) (*GtmDatacenter, error)
public static GtmDatacenter Get(string name, Input<string> id, GtmDatacenterState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Supporting Types

GtmDatacenterDefaultLoadObject

LoadObject string
LoadObjectPort int
LoadServers List<string>

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.