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.

CustomDomains.enableCustomHttps returns error: The resource format is invalid

See original GitHub issue
  • Package Name: @azure/arm-cdn
  • Package Version: 5.0.0
  • Operating system: macOS
  • nodejs
    • version: v12.16.3

Describe the bug Following the pulumi example I get an error as customDomains.enableCustomHttps gets called. It’s not really related to pulumi I guess, as internally the @azure/arm-cdn package is used.

 error: The resource format is invalid.

To Reproduce Steps to reproduce the behavior:

  1. Follow this tutorial https://www.pulumi.com/docs/tutorials/azure/azure-ts-dynamicresource/

Expected behavior https is either en-/disabled depending on the call

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Kind of the same error was described in the azure-cli project and fixed recently. Might it be related?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
qiaozhacommented, Nov 6, 2020

The new cdn SDK is released now https://www.npmjs.com/package/@azure/arm-cdn/v/5.1.0. It should be able to resolve your issue @devployment @ChrisKlug

1reaction
ChrisKlugcommented, Oct 12, 2020

The reason is that the options parameter to enableCustomHttps can’t be optional as the customDomainHttpsParameters property is required. So both the options and customDomainHttpsParameters need to be made required, or have a default value.

To sort out the Pulumi resource, you can use

await cdnClient.customDomains.enableCustomHttps(
    inputs.resourceGroupName,
    inputs.profileName,
    inputs.endpointName,
    this.name,
    {
        customDomainHttpsParameters: {
            certificateSource: "Cdn",
            certificateSourceParameters: {
                certificateType: "Dedicated"
            },
            protocolType: "ServerNameIndication"
        }
    });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling HTTPS for Azure CDN custom domain returns error ...
Describe the bug Command Name az cdn custom-domain enable-https Errors: InvalidResource - The resource format is invalid.
Read more >
Enable Custom Https - REST API (Azure CDN) - Microsoft Learn
Defines the certificate source parameters using CDN managed certificate for enabling SSL. Name, Required, Type, Description. certificateSource ...
Read more >
All Azure Resource Provider Operations - AzAdvertizer
Resource Provider Resource Type Namespace IsDataAction Microsoft.AAD DomainServices Domain Services Resource Provider False Microsoft.AAD DomainServices Domain Services Resource Provider False Microsoft.AAD DomainServices Domain Services Resource Provider...
Read more >
How do I enable HTTPS in CustomDomain in ... - Stack Overflow
So the issue is how to create the the completed Azure CDN automatically in VSTS. Step1: Add a agent job. Step2: Add a...
Read more >
Skype Cdn Over Ssl - ADocLib
Return to the Azure CDN portal and select the profile and CDN endpoint you want to enable custom HTTPS.In the list of custom...
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