Bicep resource definition
The trafficmanagerprofiles resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/trafficmanagerprofiles resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Network/trafficmanagerprofiles@2017-03-01' = {
scope: resourceSymbolicName or scope
___location: 'string'
name: 'string'
properties: {
dnsConfig: {
fqdn: 'string'
relativeName: 'string'
ttl: int
}
endpoints: [
{
id: 'string'
name: 'string'
properties: {
endpointLocation: 'string'
endpointMonitorStatus: 'string'
endpointStatus: 'string'
geoMapping: [
'string'
]
minChildEndpoints: int
priority: int
target: 'string'
targetResourceId: 'string'
weight: int
}
type: 'string'
}
]
monitorConfig: {
path: 'string'
port: int
profileMonitorStatus: 'string'
protocol: 'string'
}
profileStatus: 'string'
trafficRoutingMethod: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Network/trafficmanagerprofiles
| Name |
Description |
Value |
| ___location |
Resource ___location |
string |
| name |
The resource name |
string (required) |
| properties |
Class representing the Traffic Manager profile properties. |
ProfileProperties |
| scope |
Use when creating a resource at a scope that is different than the deployment scope. |
Set this property to the symbolic name of a resource to apply the extension resource. |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
DnsConfig
| Name |
Description |
Value |
| fqdn |
Gets or sets the fully-qualified ___domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS ___domain used by Azure Traffic Manager. |
string |
| relativeName |
Gets or sets the relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS ___domain name used by Azure Traffic Manager to form the fully-qualified ___domain name (FQDN) of the profile. |
string |
| ttl |
Gets or sets the DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile. |
int |
Endpoint
| Name |
Description |
Value |
| id |
Gets or sets the ID of the Traffic Manager endpoint. |
string |
| name |
Gets or sets the name of the Traffic Manager endpoint. |
string |
| properties |
Class representing a Traffic Manager endpoint properties. |
EndpointProperties |
| type |
Gets or sets the endpoint type of the Traffic Manager endpoint. |
string |
EndpointProperties
| Name |
Description |
Value |
| endpointLocation |
Specifies the ___location of the external or nested endpoints when using the ‘Performance’ traffic routing method. |
string |
| endpointMonitorStatus |
Gets or sets the monitoring status of the endpoint. |
string |
| endpointStatus |
Gets or sets the status of the endpoint.. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values are 'Enabled' and 'Disabled'. |
string |
| geoMapping |
Gets or sets the list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. |
string[] |
| minChildEndpoints |
Gets or sets the minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. |
int |
| priority |
Gets or sets the priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. |
int |
| target |
Gets or sets the fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint. |
string |
| targetResourceId |
Gets or sets the Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. |
string |
| weight |
Gets or sets the weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. |
int |
MonitorConfig
| Name |
Description |
Value |
| path |
Gets or sets the path relative to the endpoint ___domain name used to probe for endpoint health. |
string |
| port |
Gets or sets the TCP port used to probe for endpoint health. |
int |
| profileMonitorStatus |
Gets or sets the profile-level monitoring status of the Traffic Manager profile. |
string |
| protocol |
Gets or sets the protocol (HTTP or HTTPS) used to probe for endpoint health. |
string |
ProfileProperties
| Name |
Description |
Value |
| dnsConfig |
Gets or sets the DNS settings of the Traffic Manager profile. |
DnsConfig |
| endpoints |
Gets or sets the list of endpoints in the Traffic Manager profile. |
Endpoint[] |
| monitorConfig |
Gets or sets the endpoint monitoring settings of the Traffic Manager profile. |
MonitorConfig |
| profileStatus |
Gets or sets the status of the Traffic Manager profile. Possible values are 'Enabled' and 'Disabled'. |
string |
| trafficRoutingMethod |
Gets or sets the traffic routing method of the Traffic Manager profile. Possible values are 'Performance', 'Weighted', 'Priority' or 'Geographic'. |
string |
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
ARM template resource definition
The trafficmanagerprofiles resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/trafficmanagerprofiles resource, add the following JSON to your template.
{
"type": "Microsoft.Network/trafficmanagerprofiles",
"apiVersion": "2017-03-01",
"name": "string",
"___location": "string",
"properties": {
"dnsConfig": {
"fqdn": "string",
"relativeName": "string",
"ttl": "int"
},
"endpoints": [
{
"id": "string",
"name": "string",
"properties": {
"endpointLocation": "string",
"endpointMonitorStatus": "string",
"endpointStatus": "string",
"geoMapping": [ "string" ],
"minChildEndpoints": "int",
"priority": "int",
"target": "string",
"targetResourceId": "string",
"weight": "int"
},
"type": "string"
}
],
"monitorConfig": {
"path": "string",
"port": "int",
"profileMonitorStatus": "string",
"protocol": "string"
},
"profileStatus": "string",
"trafficRoutingMethod": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Network/trafficmanagerprofiles
| Name |
Description |
Value |
| apiVersion |
The api version |
'2017-03-01' |
| ___location |
Resource ___location |
string |
| name |
The resource name |
string (required) |
| properties |
Class representing the Traffic Manager profile properties. |
ProfileProperties |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| type |
The resource type |
'Microsoft.Network/trafficmanagerprofiles' |
DnsConfig
| Name |
Description |
Value |
| fqdn |
Gets or sets the fully-qualified ___domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS ___domain used by Azure Traffic Manager. |
string |
| relativeName |
Gets or sets the relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS ___domain name used by Azure Traffic Manager to form the fully-qualified ___domain name (FQDN) of the profile. |
string |
| ttl |
Gets or sets the DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile. |
int |
Endpoint
| Name |
Description |
Value |
| id |
Gets or sets the ID of the Traffic Manager endpoint. |
string |
| name |
Gets or sets the name of the Traffic Manager endpoint. |
string |
| properties |
Class representing a Traffic Manager endpoint properties. |
EndpointProperties |
| type |
Gets or sets the endpoint type of the Traffic Manager endpoint. |
string |
EndpointProperties
| Name |
Description |
Value |
| endpointLocation |
Specifies the ___location of the external or nested endpoints when using the ‘Performance’ traffic routing method. |
string |
| endpointMonitorStatus |
Gets or sets the monitoring status of the endpoint. |
string |
| endpointStatus |
Gets or sets the status of the endpoint.. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values are 'Enabled' and 'Disabled'. |
string |
| geoMapping |
Gets or sets the list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. |
string[] |
| minChildEndpoints |
Gets or sets the minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. |
int |
| priority |
Gets or sets the priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. |
int |
| target |
Gets or sets the fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint. |
string |
| targetResourceId |
Gets or sets the Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. |
string |
| weight |
Gets or sets the weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. |
int |
MonitorConfig
| Name |
Description |
Value |
| path |
Gets or sets the path relative to the endpoint ___domain name used to probe for endpoint health. |
string |
| port |
Gets or sets the TCP port used to probe for endpoint health. |
int |
| profileMonitorStatus |
Gets or sets the profile-level monitoring status of the Traffic Manager profile. |
string |
| protocol |
Gets or sets the protocol (HTTP or HTTPS) used to probe for endpoint health. |
string |
ProfileProperties
| Name |
Description |
Value |
| dnsConfig |
Gets or sets the DNS settings of the Traffic Manager profile. |
DnsConfig |
| endpoints |
Gets or sets the list of endpoints in the Traffic Manager profile. |
Endpoint[] |
| monitorConfig |
Gets or sets the endpoint monitoring settings of the Traffic Manager profile. |
MonitorConfig |
| profileStatus |
Gets or sets the status of the Traffic Manager profile. Possible values are 'Enabled' and 'Disabled'. |
string |
| trafficRoutingMethod |
Gets or sets the traffic routing method of the Traffic Manager profile. Possible values are 'Performance', 'Weighted', 'Priority' or 'Geographic'. |
string |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
The trafficmanagerprofiles resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Network/trafficmanagerprofiles resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/trafficmanagerprofiles@2017-03-01"
name = "string"
parent_id = "string"
___location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
dnsConfig = {
fqdn = "string"
relativeName = "string"
ttl = int
}
endpoints = [
{
id = "string"
name = "string"
properties = {
endpointLocation = "string"
endpointMonitorStatus = "string"
endpointStatus = "string"
geoMapping = [
"string"
]
minChildEndpoints = int
priority = int
target = "string"
targetResourceId = "string"
weight = int
}
type = "string"
}
]
monitorConfig = {
path = "string"
port = int
profileMonitorStatus = "string"
protocol = "string"
}
profileStatus = "string"
trafficRoutingMethod = "string"
}
}
}
Property Values
Microsoft.Network/trafficmanagerprofiles
| Name |
Description |
Value |
| ___location |
Resource ___location |
string |
| name |
The resource name |
string (required) |
| parent_id |
The ID of the resource to apply this extension resource to. |
string (required) |
| properties |
Class representing the Traffic Manager profile properties. |
ProfileProperties |
| tags |
Resource tags |
Dictionary of tag names and values. |
| type |
The resource type |
"Microsoft.Network/trafficmanagerprofiles@2017-03-01" |
DnsConfig
| Name |
Description |
Value |
| fqdn |
Gets or sets the fully-qualified ___domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS ___domain used by Azure Traffic Manager. |
string |
| relativeName |
Gets or sets the relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS ___domain name used by Azure Traffic Manager to form the fully-qualified ___domain name (FQDN) of the profile. |
string |
| ttl |
Gets or sets the DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile. |
int |
Endpoint
| Name |
Description |
Value |
| id |
Gets or sets the ID of the Traffic Manager endpoint. |
string |
| name |
Gets or sets the name of the Traffic Manager endpoint. |
string |
| properties |
Class representing a Traffic Manager endpoint properties. |
EndpointProperties |
| type |
Gets or sets the endpoint type of the Traffic Manager endpoint. |
string |
EndpointProperties
| Name |
Description |
Value |
| endpointLocation |
Specifies the ___location of the external or nested endpoints when using the ‘Performance’ traffic routing method. |
string |
| endpointMonitorStatus |
Gets or sets the monitoring status of the endpoint. |
string |
| endpointStatus |
Gets or sets the status of the endpoint.. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values are 'Enabled' and 'Disabled'. |
string |
| geoMapping |
Gets or sets the list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. |
string[] |
| minChildEndpoints |
Gets or sets the minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. |
int |
| priority |
Gets or sets the priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. |
int |
| target |
Gets or sets the fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint. |
string |
| targetResourceId |
Gets or sets the Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. |
string |
| weight |
Gets or sets the weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. |
int |
MonitorConfig
| Name |
Description |
Value |
| path |
Gets or sets the path relative to the endpoint ___domain name used to probe for endpoint health. |
string |
| port |
Gets or sets the TCP port used to probe for endpoint health. |
int |
| profileMonitorStatus |
Gets or sets the profile-level monitoring status of the Traffic Manager profile. |
string |
| protocol |
Gets or sets the protocol (HTTP or HTTPS) used to probe for endpoint health. |
string |
ProfileProperties
| Name |
Description |
Value |
| dnsConfig |
Gets or sets the DNS settings of the Traffic Manager profile. |
DnsConfig |
| endpoints |
Gets or sets the list of endpoints in the Traffic Manager profile. |
Endpoint[] |
| monitorConfig |
Gets or sets the endpoint monitoring settings of the Traffic Manager profile. |
MonitorConfig |
| profileStatus |
Gets or sets the status of the Traffic Manager profile. Possible values are 'Enabled' and 'Disabled'. |
string |
| trafficRoutingMethod |
Gets or sets the traffic routing method of the Traffic Manager profile. Possible values are 'Performance', 'Weighted', 'Priority' or 'Geographic'. |
string |
Usage Examples
A basic example of deploying Traffic Manager Profile.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "___location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
___location = var.___location
}
resource "azapi_resource" "trafficManagerProfile" {
type = "Microsoft.Network/trafficManagerProfiles@2018-08-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
___location = "global"
body = {
properties = {
dnsConfig = {
relativeName = "acctest-tmp-230630034107605443"
ttl = 30
}
monitorConfig = {
expectedStatusCodeRanges = [
]
intervalInSeconds = 30
path = "/"
port = 443
protocol = "HTTPS"
timeoutInSeconds = 10
toleratedNumberOfFailures = 3
}
trafficRoutingMethod = "Weighted"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}