-
Notifications
You must be signed in to change notification settings - Fork 769
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
Bicep/arm deployment fail after configuring Front Door managed certificate with failure message: "Operations on Secret Type ManagedCertificate are not allowed." #7340
Comments
FWIW, this does not seem like a bicep specific issue, but it would be good to take a deeper look. @brwilkinson do you have some time to look into this? @aviita -- it may be faster to open an azure support ticket if that is an option for you. |
Please take a look here for some examples. sample inputsample templateshttps://github.com/brwilkinson/AzureDeploymentFramework/blob/main/ADF/bicep/FD.CDN.bicep These will deploy The profile + afdendpoints and create the customDNS and Routes. Depending on your capability to generate the TXT verify records during your deployment, you may have the following in the Domains section. You can then capture the required fields and manually or via an external process setup the TXT record as well as the CName record. |
If you take a look at the customDomains definition, you can see that You also do not need to define the resource customDomains 'Microsoft.Cdn/profiles/customDomains@2021-06-01' = {
name: toLower(replace('${ep.name}.${ep.zone}', '.', '-'))
parent: CDNProfile
properties: {
hostName: toLower('${ep.name}.${ep.zone}')
tlsSettings: {
certificateType: 'ManagedCertificate'
minimumTlsVersion: 'TLS12'
// secret: {
// id:
// }
}
}
dependsOn: [
DNSCNAME
]
} If you remove both of those then you should be good. |
Thanks for quick replies @alex-frankel and @brwilkinson. I think I am going to need to leave this on hold for my summer vacation. I am leaving for summer vacation and do not want to rock the boat just before that. If this messes up the existing domains somehow again, I would be risking having to consult support for our DNS provider. This way of verification in palace for front door seems to mess up the DNS providers system. These entries get some subfolders created in their system and none of the related DNS records are visible to us. So I assume no need for bicep deployments on the front door during July and will pick up on our internal bug regarding this in August. Anyways we have the front door already setup for production too and bicep was great help there regardless of this problem. Much more enjoyable to work with than ARM templates. |
The closing of this issue was anyways accidental. Not sure if you can keep this parked in your system for a month. Anyways I could still mention that the So that is why I want to play it safe. |
The whatif issue is also tracked in I will update he notes there to include this specific example. Feel free to close this, if you have a working solution, other than the whatif issue. |
will close here, however please follow on #7354 |
I dared to run the After the |
Bicep version
Bicep CLI version 0.7.4 (5afc312)
Describe the bug
I have been setting up Azure Front Door manually, exporting ARM template and converting it to bicep with
az bicep decompile
, then formatting it to more generic script. All went well up-to a point where I added custom domains. We are using external DNS service so I saw no possibilities to automate the custom domain setup and instead went with manual setup first.I ran into two problems with bicep. Firstly I did not find a way to make the bicep deploy ignore the DNS configurations after this manual setup. And secondly after trying to add the custom domains to bicep script by again exporting ARM template, converting to bicep and modifying my bicep script with similar changes as were added by bicep, the
az deploy
starts to fail with error message.To Reproduce
Steps to reproduce the behavior:
az bicep decompile
az bicep decompile
Expected
az deploy
succeeds with bicep script that has custom domain in placeaz deploy
succeeds with ARM template exported after custom domain setup that has seen no changesActual
az deploy
fails with bicep script that has custom domain in placeaz deploy
fails with ARM template exported after custom domain setup that has seen no changesaz deploy
error message when deploying with ARM template after step 5 or bicep with script after step 6.Additional context
By minimum I need to find a way where most front door settings are managed through bicep script and deployment succeeds without
touching the custom domain to endpoint/route mappings. Script needs to work also when run from Azure DevOps pipeline.
I can see this might be rather an ARM issue and not bicep issue, but wanted also to get this documented with the latest bicep API's that one gets when converting from ARM templates currently. And on the other hand I would like to find a workaround to make the bicep not touch the custom domains if it is not possible to do this configuration fully yet.
My current bicep template that produces similar error is as follows (with some names changed). Also note that I am actually setting three different endpoints and hence have implemented some looping, but suspecting that is not relevant for for reproducing this issue. Providing this cleaned up version of the script mainly for discussing the topic more easily and to improve ability for others to find this issue if they are using same API versions (lots of examples and issues are using some older API versions that also have totally different namespaces and names).
Before adding the customDomains to routes I tried omitting the customDomains parameter altogether from the routes to maybe get not modify that custom domain to route mapping at all, but the mapping still got cleared.
Now that the custom domains were added to the script, a fresh deployment with the script fails to get the routes created while still completing e.g. the endpoint setup. This I still need to find a workaround too, to get FD deployed to production.
The text was updated successfully, but these errors were encountered: