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

Database dependency not picked up #33

Closed
simonech opened this issue Oct 7, 2020 · 1 comment
Closed

Database dependency not picked up #33

simonech opened this issue Oct 7, 2020 · 1 comment
Assignees

Comments

@simonech
Copy link

simonech commented Oct 7, 2020

Describe the bug
My ARM template has a website which dependsOn a SQL Database (and a few other resources).
The other resources are displayed, but not the database connection

To Reproduce

            "dependsOn": [
                "[resourceId('Microsoft.Insights/components/', variables('appInsight'))]",
                "[resourceId('Microsoft.Web/serverfarms/', variables('hostingPlanName'))]",
                "[resourceId('Microsoft.Sql/servers/databases/', variables('dbServerName'), variables('dbName'))]"
            ],

image

I understand there are "known issues" with the dependsOn but here the 3 resources are expressed in the same way.

If not possible to fix, could you please tell me how to express that dependency so that it gets picked up?

@benc-uk
Copy link
Owner

benc-uk commented Oct 21, 2020

Hi, Thanks for bringing this to my attention. I was able to reproduce. It's because resources like databases are normally defined as nested resources. If you move the to the top level resource array my extension would show this links

Anyhow it was a very deep bug in how I parse the dependsOn links, which has been in the code for a very long time, so I'm surprised it hasn't been raised before!

Should be fixed in the next release

@benc-uk benc-uk self-assigned this Oct 21, 2020
@benc-uk benc-uk mentioned this issue Oct 21, 2020
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