azurermCdnFrontdoorOriginGroup
Manages a Front Door (standard/premium) Origin Group.
Example Usage
/*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 azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-cdn-frontdoor",
}
);
const azurermCdnFrontdoorProfileExample =
new azurerm.cdnFrontdoorProfile.CdnFrontdoorProfile(this, "example_1", {
name: "example-profile",
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermCdnFrontdoorProfileExample.overrideLogicalId("example");
const azurermCdnFrontdoorOriginGroupExample =
new azurerm.cdnFrontdoorOriginGroup.CdnFrontdoorOriginGroup(
this,
"example_2",
{
cdn_frontdoor_profile_id: azurermCdnFrontdoorProfileExample.id,
health_probe: [
{
interval_in_seconds: 240,
path: "/healthProbe",
protocol: "Https",
request_type: "HEAD",
},
],
load_balancing: [
{
additional_latency_in_milliseconds: 0,
sample_size: 16,
successful_samples_required: 3,
},
],
name: "example-origin-group",
restore_traffic_time_to_healed_or_new_endpoint_in_minutes: 10,
session_affinity_enabled: true,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermCdnFrontdoorOriginGroupExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Front Door Origin Group. Changing this forces a new Front Door Origin Group to be created. -
cdnFrontdoorProfileId
- (Required) The ID of the Front Door Profile within which this Front Door Origin Group should exist. Changing this forces a new Front Door Origin Group to be created. -
loadBalancing
- (Required) AloadBalancing
block as defined below.
-
healthProbe
- (Optional) AhealthProbe
block as defined below. -
restoreTrafficTimeToHealedOrNewEndpointInMinutes
- (Optional) Specifies the amount of time which should elapse before shifting traffic to another endpoint when a healthy endpoint becomes unhealthy or a new endpoint is added. Possible values are between0
and50
minutes (inclusive). Default is10
minutes.
-> NOTE: This property is currently not used, but will be in the near future.
sessionAffinityEnabled
- (Optional) Specifies whether session affinity should be enabled on this host. Defaults totrue
.
A healthProbe
block supports the following:
-
protocol
- (Required) Specifies the protocol to use for health probe. Possible values arehttp
andhttps
. -
intervalInSeconds
- (Required) Specifies the number of seconds between health probes. Possible values are between5
and31536000
seconds (inclusive). -
requestType
- (Optional) Specifies the type of health probe request that is made. Possible values areget
andhead
. Defaults tohead
. -
path
- (Optional) Specifies the path relative to the origin that is used to determine the health of the origin. Defaults to/
.
-> NOTE: Health probes can only be disabled if there is a single enabled origin in a single enabled origin group. For more information about the healthProbe
settings please see the product documentation.
A loadBalancing
block supports the following:
-
additionalLatencyInMilliseconds
- (Optional) Specifies the additional latency in milliseconds for probes to fall into the lowest latency bucket. Possible values are between0
and1000
seconds (inclusive). Defaults to50
. -
sampleSize
- (Optional) Specifies the number of samples to consider for load balancing decisions. Possible values are between0
and255
(inclusive). Defaults to4
. -
successfulSamplesRequired
- (Optional) Specifies the number of samples within the sample period that must succeed. Possible values are between0
and255
(inclusive). Defaults to3
.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Front Door Origin Group.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Front Door Origin Group.read
- (Defaults to 5 minutes) Used when retrieving the Front Door Origin Group.update
- (Defaults to 30 minutes) Used when updating the Front Door Origin Group.delete
- (Defaults to 30 minutes) Used when deleting the Front Door Origin Group.
Import
Front Door Origin Groups can be imported using the resourceId
, e.g.