Unsupported Argument and unsupported block - Azure Front door

Hey Team,Got stuck in Terraforming the front door custom domain . The issue seems to be irrelevant as I have referenced lots of GitHub front door repos referring to same code which I am trying to execute.

Getting issue while terraforming front door for custom domain -:

➜ frontdoor git:(frontdoor-dev) ✗ t plan
Acquiring state lock. This may take a few moments…
Releasing state lock. This may take a few moments…Error: Unsupported argument on modules/module.tf line 93, in resource “azurerm_frontdoor” “instance”:
93: custom_https_provisioning_enabled = frontend_endpoint.value.custom_https_provisioning_enabledAn argument named “custom_https_provisioning_enabled” is not expected here.Error: Unsupported block type on modules/module.tf line 94, in resource “azurerm_frontdoor” “instance”:
94: dynamic “custom_https_configuration” {Blocks of type “custom_https_configuration” are not expected here.

Terraform version and azurerm version is -:Terraform v0.14.11

Terraform module Code -:

dynamic “frontend_endpoint” {
for_each = var.frontend_endpoint
content {
name = frontend_endpoint.value.name
host_name = frontend_endpoint.value.host_name
session_affinity_enabled = frontend_endpoint.value.session_affinity_enabled
session_affinity_ttl_seconds = frontend_endpoint.value.session_affinity_ttl_seconds
custom_https_provisioning_enabled = frontend_endpoint.value.custom_https_provisioning_enabled
dynamic “custom_https_configuration” {
for_each = frontend_endpoint.value.custom_https_provisioning_enabled == true ? [frontend_endpoint.value.custom_https_configuration] :
content {
certificate_source = frontend_endpoint.value.custom_https_configuration.certificate_source
azure_key_vault_certificate_vault_id = custom_https_configuration.value.azure_key_vault_certificate_vault_id
azure_key_vault_certificate_secret_name = custom_https_configuration.value.azure_key_vault_certificate_secret_name
azure_key_vault_certificate_secret_version = custom_https_configuration.value.azure_key_vault_certificate_secret_version
}
}
web_application_firewall_policy_link_id = frontend_endpoint.value.web_application_firewall_policy_link_name != “” ? module.azure_front_door_waf.waf-map[frontend_endpoint.value.web_application_firewall_policy_link_name] : “”
}
}

Any pointers to the issue will be appreciable.