-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable-AzCdnCustomDomainCustomHttps - Bad Request (Property 'CustomHttpsParameters.CertificateSourceParameters.CertificateType' is required but it was not set) #18700
Comments
Thank you for your feedback. This has been routed to the support team for assistance. |
@pjmvp Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update. |
@pjmvp Could you please try this ?
|
@pjmvp I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you need any further assistance on this. Awaiting your reply. |
@navba-MSFT, thanks for reaching out. It works when I run it locally (my laptop).
However, if I run it in Azure DevOps, using the
it fails with
Sounds like a version mismatch? Can Az PowerShell 8.0.0 be used in Azure DevOps together with AzurePowerShell@5? |
@pjmvp Could you please ensure that you are using Azure Powershell task and not plain powershell task? Did you try with the Azure Powershell Script:Inline task ? Awaiting your reply. |
@navba-MSFT, I am indeed using the Azure PowerShell task ( However, I can't seem to find any documentation saying which version of Azure PowerShell is used by the AzurePowerShell@5 task. |
@pjmvp The command is introduced in Az PowerShell 8.0, that might explain why this command couldn't be find in AzurePowerShell@5 task. You could actually specify the target Azure PowerShell version in the task: [https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-powershell?view=azure-devops] You could also update the Az.Cdn module to 2.1.0 in your script using:
Let me know if this solves your problem. Awaiting your reply. |
I got
to work by altering my AzurePowerShell@5 task:
I'd thought that having
I still think that this doc. page could benefit from an example using Thanks a lot for the help, @navba-MSFT. |
@pjmvp Seems like the fix for the examples has been committed already. see here. So this should be fixed in next release, which is in a week or two. With that we will proceed with closure of this GitHub thread. If you have any follow-up queries, please feel free to reopen this thread. We would be happy to help. |
Description
I'm trying to enable HTTPS in my CDN custom domain. I want it to have a CDN-managed certificate.
I get the Cdn Custom Domain using Get-AzCdnCustomDomain and pipe the result to Enable-AzCdnCustomDomainCustomHttps.
I pass a hash table to Enable-AzCdnCustomDomainCustomHttps' CustomDomainHttpsParameter.
The hash table is defined as:
But the response is a BadRequest with the error message:
I've also tried:
But the result is the same. When running with -Debug flag I see the payload being POSTed is:
So the CertificateSourceParameter , if needed at all, is being ignored by the parser.
This behaviour is probably driven by this part of the code.
It looks like a mismatch between the REST API and what the cmdlet serializes and sends. Or could I be creating my hash table incorrectly? The documentation is incomplete.
How can I enable HTTPS in my CDN custom domain using this PowerShell Module?
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: