question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enabling HTTPS for Azure CDN custom domain returns error (InvalidResource)

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az cdn custom-domain enable-https

Errors:

InvalidResource - The resource format is invalid.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Azure DNS zone exists and CNAME record from there points to Azure CDN endpoint
  • Following script used

#!/bin/bash

set -e

CDN_ENDPOINT_NAME=$1
CDN_PROFILE_NAME=$2
RESOURCE_GROUP_NAME=$3
CDN_CUSTOM_DOMAIN_HOSTNAME=$4

# Check the mapping
CUSTOM_DOMAIN_VALIDATED=$(az cdn endpoint validate-custom-domain --host-name $CDN_CUSTOM_DOMAIN_HOSTNAME -n $CDN_ENDPOINT_NAME --profile-name $CDN_PROFILE_NAME -g $RESOURCE_GROUP_NAME --query customDomainValidated -o tsv)

# Create the custom domain on the endpoint
if [ $CUSTOM_DOMAIN_VALIDATED ]; then
    az cdn custom-domain create \
    --endpoint-name $CDN_ENDPOINT_NAME \
    --hostname $CDN_CUSTOM_DOMAIN_HOSTNAME \
    -n CDN \
    --profile-name $CDN_PROFILE_NAME \
    -g $RESOURCE_GROUP_NAME
fi

# Enable custom domain HTTPS
az cdn custom-domain enable-https \
    --endpoint-name $CDN_ENDPOINT_NAME \
    -n CDN \
    --profile-name $CDN_PROFILE_NAME \
    -g $RESOURCE_GROUP_NAME

Expected Behavior

Azure would begin enabling HTTPS for the custom domain in Azure CDN endpoint.

Similar works from PowerShell core command

# Enable custom domain HTTPS Enable-AzCdnCustomDomainHttps -EndpointName $EndpointName -ProfileName $ProfileName -ResourceGroupName $rgName -CustomDomainName CDN

Environment Summary

Linux-4.4.0-18362-Microsoft-x86_64-with-debian-buster-sid
Python 3.6.5
Shell: bash

azure-cli 2.0.81 *

Additional Context

Creation of custom domain for Azure CDN endpoint works fine. Only the last part fails.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sseveringhaus-newclassroomscommented, Feb 21, 2020

This issue apparently still exists with version 2.1.0.

1reaction
highlyunavailablecommented, Feb 26, 2020

I’m also seeing this issue with a raw az rest call to https://management.azure.com/subscriptions/[redacted]/resourceGroups/[redacted]/providers/Microsoft.Cdn/profiles/[redacted]/endpoints/[redacted]/customdomains/[redacted]/enableCustomHttps?api-version=2019-04-15

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Configure HTTPS on an Azure CDN custom domain
In this tutorial, you learn how to enable and disable HTTPS on your Azure CDN endpoint custom domain.
Read more >
CDN custom domain HTTPS stuck at submitting your request
After creating a custom domain for a CDN endpoint, and enabling HTTPS, the status is stuck at "Submitting your request" now for more...
Read more >
Azure CDN custom domain with HTTPS not seeing CNAME ...
I'm trying to setup a custom domain on an Azure CDN endpoint. ... Then, when trying to enable HTTPS by using the next...
Read more >
Problems with enabling HTTPS for Azure CDN - Microsoft Q&A
Azure Front Door and Azure CDN from Microsoft made a recent update in July to enforce custom domains to require a full certificate...
Read more >
Static Website, HTTPS via CDN stuck on 'Enabling'
Please can anyone offer assistance? Subscription ID: c56d63a9-af75-4235-9644-f5d2a2ad4b73. azure-webapps-custom-domainsazure-cdn.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found