Open restfulhead opened 4 years ago
@restfulhead Thank you for submitting this!
After checking this Azure document, it turns out that delivery_rule
also works for Standard_Verizon
and Standard_Akamai
.
Though it has some subtle limitations, e.g. can not name the rule, only url_file_extension_condition
is supported, only cache_expiration_action
is supported, .etc.
@restfulhead Unfortunately, the Swagger has some blockers. Until it is addressed, we can go on implementing this feature in Terraform.
@restfulhead were you able to find any workaround for this? I am getting the same error. I have an existing resource with global_delivery_rule. I just changed resource tag and now it says that "Error: Error: global_delivery_policy
and delivery_rule
are only allowed when Standard_Microsoft
sku is used" even though I havent changed anything in that block now
@raswinraaj Only by ignoring those attributes:
lifecycle {
ignore_changes = [
global_delivery_rule,
delivery_rule
]
}
It seems that this is also an issue when changing CDN Endpoints (Standard_Verizon) which have a delivery rule defined in the portal. The ignore life cycle block work that terraform will not remove those rules without a change, but when a change should be done (e.g. change the origin path) then following error come:
Error: `global_delivery_rule` and `delivery_rule` are only allowed when `Standard_Microsoft` sku is used. Profile sku: Standard_Verizon
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_cdn_endpoint
Terraform Configuration Files
Expected Behavior
Expected TF to create caching rules or do not set these attributes.
Actual Behavior
With
global_delivery_rule
anddelivery_rule
present, the following error occurs:But please also note: Without these elements, Terraform removes caching rules that were manually created in the portal. It detects them as changes, for example:
I have to ignore those using lifecycle ignore_changes.
It would be great if support for Standard Verizon could be added. If that's not feasible, perhaps at least these attributes shouldn't cause changes.