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 should understand resources that are managed by other resources declared in the template #78

Open
alex-frankel opened this issue May 26, 2020 · 6 comments
Labels
enhancement New feature or request preflight improvement issue requires a change to preflight API

Comments

@alex-frankel
Copy link
Contributor

Examples:

  • VMs will create disks
  • AKS will setup a VMSS cluster
  • DeploymentScripts will create ACI + Storage
@alex-frankel
Copy link
Contributor Author

@alex-frankel alex-frankel added enhancement New feature or request preflight improvement issue requires a change to preflight API labels May 26, 2020
@JustinGrote
Copy link

JustinGrote commented May 30, 2020

Here's an example I have. I'm attaching VM domain join extensions via a looped reference to another nested deployment. The domain join extensions don't show up at all in whatif. If whatif can't evaluate these it should at least show a warning that it expects additional resources of a certain type to be created.

image

@alex-frankel
Copy link
Contributor Author

@JustinGrote I think this is actually in issue with the reference() call. What-if is able to evaluate nested templates, but if there are references() to resolve the name or resourceId of the resources in the nested template, what-if will not find those resources since it doesn't know what to look for.

We have a separate issue (#83) tracking cases related to the reference() function. Can you add this there?

@alex-frankel alex-frankel pinned this issue Jun 16, 2020
@JustinGrote
Copy link

@alex-frankel it may help in the output to note it as "calculated" or maybe have a new whatif status of "Inconclusive" to indicate that ARM doesn't know if this will change or not because it can't evaluate the reference. This is how Terraform handles states like this. It should evalute the reference or at least guess if possible (my example it would be guessable), but I understand that would probably be a large engineering effort with a lot of edge cases.

@alex-frankel
Copy link
Contributor Author

Yeah, I agree we should provide more information as to what as happening. We will discuss this during our triage this week. cc @shenglol @majastrz

If we implement #83, it should resolve the issue you are hitting

@shenglol
Copy link
Collaborator

shenglol commented Aug 13, 2020

#46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preflight improvement issue requires a change to preflight API
Projects
None yet
Development

No branches or pull requests

3 participants