Skip to content
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

What-If and conditional deployment #223

Open
rvvincelli opened this issue Sep 4, 2021 · 3 comments
Open

What-If and conditional deployment #223

rvvincelli opened this issue Sep 4, 2021 · 3 comments

Comments

@rvvincelli
Copy link

Describe the noise

Resource type (i.e. Microsoft.Storage/storageAccounts): any

apiVersion: n/a

Client (PowerShell, Azure CLI, or API): PowerShell

Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template:

...
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"parameters": {
...
    "reDeployETLInfra": {
      "type": "int",
      "defaultValue":1,
      "metadata": {
        "description": "Toggle (1 or 0) to determine if the ETL infra (ADF, databricks) needs to be redeployed"
      }
    }
...
"resources": [
...
{
      "condition": "[equals(parameters('reDeployETLInfra'),1)]",
      "apiVersion": "2019-10-01",
      "name": "datafactorydeployment",
      "type": "Microsoft.Resources/deployments",
...

Expected response (i.e. "I expected no noise since the template has not been modified since the resources were deployed): the default parameter value is 1 and it is not overridden, so I expect to see updation information for this ADF instance too.

Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text): n/a

Additional context: the command we use is New-AzResourceGroupDeployment -ResourceGroupName ??? -TemplateFile azuredeploy_world.json -TemplateParameterFile azuredeploy_world_params.json -Whatif -WhatIfResultFormat FullResourcePayloads

Not sure if this is noise, expected behavior or just unsupported. Apologies in advanced if we missed any information in this sense, please gently point to the relevant docs.

Thank you,

@rvvincelli
Copy link
Author

rvvincelli commented Sep 4, 2021

On the same lines, it feels like resources showing a dependsOn are ignored too (please point us to the relevant issues). Thanks,

@alex-frankel
Copy link
Contributor

I expect to see updation information for this ADF instance too.

Can you clarify what were you expecting to see? Can you share the output of the what-if response and what in the response looks incorrect?

it feels like resources showing a dependsOn are ignored too

resources with a dependsOn property should not be ignored. We have #157 related to nested deployments. Could it be related to that?

@rvvincelli
Copy link
Author

I expect to see updation information for this ADF instance too.

Can you clarify what were you expecting to see? Can you share the output of the what-if response and what in the response looks incorrect?

See the reDeployETLInfra param and the condition: if the param is true the condition is true too and the deployment shall launch. This works in vivo but whatif seems to ignore this altogether, skipping the resource regardless of the condition value.

it feels like resources showing a dependsOn are ignored too

resources with a dependsOn property should not be ignored. We have #157 related to nested deployments. Could it be related to that?

Thanks for linking to it, it might well be! I cannot promise to look into this right now but that's a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants