If I add a new custom domain to the azure cdn profile ( azure front door premium ) then run the --what-if I do not see any changes to the front door.
how do I get the what-if to give me ALL the changes the deploy will make? I added this new custom domain
resource customDomainNew 'Microsoft.Cdn/profiles/customdomains@2022-05-01-preview' = if (customDomainDeploy) {
parent: frontdoorProfile
name: 'new-${baseDomainName}'
properties: {
hostName: 'new.${baseDomain}'
tlsSettings: {
certificateType: 'ManagedCertificate'
minimumTlsVersion: 'TLS12'
}
}
}
then added customDomainNew
to a route
resource frontdoorendpointFrontEnd 'Microsoft.Cdn/profiles/afdendpoints/routes@2022-11-01-preview' = {
parent: frontdoorEndpointDefault
name: 'frontend-v2'
properties: {
customDomains: [
{ id: customDomainApp.id }
{ id: customDomainNew.id }
]
...
then I run the --what-if
az deployment sub create -l eastus -f./main.bicep -p./Parameters/ci.json -w
and I do not see any information about a new custom domain being added to the route, I only see tags that are changing. I also wonder why resources are ignored like rontdoor-shared-ci-global
PS /Users/user/Projects/Code/Cloud/Infrastructure> az deployment sub create -l eastus -f ./main.bicep -p ./Parameters/ci.json -w
Note: The result may contain false positive predictions (noise).
You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues
Resource and property changes are indicated with these symbols:
+ Create
~ Modify
= Nochange
* Ignore
The deployment will update the following scopes
Scope: /subscriptions/xxx
~ resourceGroups/rg-appservice-hats-ci-eastus [2022-09-01]
~ tags.deploymentTime: "14:36" => "14:42"
~ resourceGroups/rg-frontdoor-shared-ci-global [2022-09-01]
~ tags.deploymentTime: "14:36" => "14:42"
~ resourceGroups/rg-network-shared-ci-eastus [2022-09-01]
~ tags.deploymentTime: "14:36" => "14:42"
Scope: /subscriptions/xxx/resourceGroups/rg-appservice-hats-ci-eastus
~ Microsoft.Web/serverfarms/serverfarm-hats-ci-eastus [2022-03-01]
~ tags.deploymentTime: "14:36" => "14:42"
~ Microsoft.Web/sites/site-hats-ci-eastus [2022-03-01]
+ properties.siteConfig.localMySqlEnabled: false
+ properties.siteConfig.netFrameworkVersion: "v4.6"
~ tags.deploymentTime: "14:36" => "14:42"
= Microsoft.Network/privateEndpoints/private-endpoint-web [2021-02-01]
* Microsoft.Network/networkInterfaces/private-endpoint-web.nic.xxxx
Scope: /subscriptions/xxxx/resourceGroups/rg-frontdoor-shared-ci-global
* Microsoft.Cdn/profiles/frontdoor-shared-ci-global
* Microsoft.Cdn/profiles/frontdoor-shared-ci-global/afdendpoints/frontdoor-shared-ci-global
* Microsoft.Network/frontdoorWebApplicationFirewallPolicies/wafsharedciglobal
Scope: /subscriptions/xxxxxx/resourceGroups/rg-network-shared-ci-eastus
~ Microsoft.Network/virtualNetworks/vnet-shared-ci-eastus [2022-05-01]
~ tags.deploymentTime: "14:36" => "14:42"
Resource changes: 6 to modify, 1 no change, 4 to ignore.
you can see the what-if is not really providing that much detail.
In my view there will be an issue with template, refer official tutorial .
resource <resource Name>
'Microsoft.Cdn/profiles/customDomains@2022-05-01-preview' = {
name: 'string'
parent: <Resource Name>
properties: {
azureDnsZone: {
id: 'string'
}
extendedProperties: {}
hostName: 'string'
preValidatedCustomDomainResourceId: {
id: 'string'
}
tlsSettings: {
certificateType: 'string'
minimumTlsVersion: 'string'
secret: {
id: 'string'
}
}
}
}
What-If compare our ARM template to the deployed service, based on the result, can decide if need to deploy. It's the same as the "terraform plan" command in terraform
here is the sample tutorial . i have found couple of useful blogs related to whatif
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.