Data Source: azurermTrafficManagerProfile
Use this data source to access information about an existing Traffic Manager Profile.
Example Usage
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermTrafficManagerProfileExample =
new azurerm.dataAzurermTrafficManagerProfile.DataAzurermTrafficManagerProfile(
this,
"example",
{
name: "test",
resource_group_name: "test",
}
);
new cdktf.TerraformOutput(this, "traffic_routing_method", {
value: dataAzurermTrafficManagerProfileExample.trafficRoutingMethod,
});
Argument Reference
-
name
- Specifies the name of the Traffic Manager Profile. -
resourceGroupName
- Specifies the name of the resource group the Traffic Manager Profile is located in.
Attributes Reference
-
id
- The ID of the Traffic Manager Profile. -
location
- The Azure location where the Traffic Manager Profile exists. -
fqdn
- The FQDN of the created Profile. -
profileStatus
- The status of the profile. -
trafficRoutingMethod
- Specifies the algorithm used to route traffic. -
trafficViewEnabled
- Indicates whether Traffic View is enabled for the Traffic Manager profile. -
dnsConfig
- This block specifies the DNS configuration of the Profile. -
monitorConfig
- This block specifies the Endpoint monitoring configuration for the Profile. -
tags
- A mapping of tags to assign to the resource.
The dnsConfig
block provides:
-
relativeName
- The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. -
ttl
- The TTL value of the Profile used by Local DNS resolvers and clients.
The monitorConfig
block provides:
-
protocol
- The protocol used by the monitoring checks. -
port
- The port number used by the monitoring checks. -
path
- The path used by the monitoring checks. -
expectedStatusCodeRanges
- A list of status code ranges. -
customHeader
- One or morecustomHeader
blocks as defined below. -
intervalInSeconds
- The interval used to check the endpoint health from a Traffic Manager probing agent. -
timeoutInSeconds
- The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. -
toleratedNumberOfFailures
- The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy.
A customHeader
block supports the following:
-
name
- The name of the custom header. -
value
- The value of custom header. Applicable for HTTP and HTTPS protocol.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Location.