Search code examples
azureterraformcdnsas-token

CDN endpoint throws: the Url Query String's max length is 100


I'm generating a SAS token for a storage on Azure in Terraform. However, the token is always above 100 characters long. This causes azurerm_cdn_endpoint to throw: Error: the Url Query String's max length is 100.

I need it because I wanted to add to the endpoint's rules engine a delivery rule with such properties:

query_string_condition {
  operator         = "Contains"
  negate_condition = true
  match_values     = ["sig"]
}
url_redirect_action {
  redirect_type = "PermanentRedirect"
  query_string  = var.sas_url_query_string
}

Is there any workaround?


Solution

  • The error is misleading - once the question mark in front of the query string is removed, the error is gone, though the number of characters exceeds 100 in length.