question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add auto-complete / IntelliSense for dependsOn

See original GitHub issue

When in a dependsOn block, ctrl > space or opening " could suggest a list of all resources found in the current template.

We could just use the resource name, however if the tempalte contains multiple resources with the same name, resourceId() must be used. Also, the resourceId convention does give indication of resource type which can also be desirable.

Initial suggestion is to create the dependencies using the resourceId()function, open for discussion.

"dependsOn": [
    "[resourceId('Microsoft.Storage/storageAccounts', 'nepetersone')]",
    "[resourceId('Microsoft.Storage/storageAccounts', variables('name'))]"
]

Other notes that may be helpful:

  • Dependencies only apply to resources defined within the same template.
  • A dependency can be defined with resource name or resource id. When using name, it must be unique to the template.
  • In addition to resources, dependencies can be created for copy blocks. For these use the copy block name.
  • Dependencies between a child and parent is not implicit, they must be specified (nested and decoupled), examples.
  • Using the reference or list* functions do create an implicit dependency. Initial thought is that this should not factor into this work.

dependsOn-completions

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
StephenWeatherfordcommented, Apr 1, 2020

Where the dependency would be the bane of the copy loop.

I agree… But did you mean “name”? 😃

1reaction
neilpetersoncommented, Apr 1, 2020

@bmoore-msft mentioned dependency on copy loops.

      "copy": {
        "name": "nicLoop",
        "count": "[parameters('numberOfInstances')]"
      },

Where the dependency would be the name of the copy loop.

      "dependsOn": [
        "nicLoop"
      ],
Read more comments on GitHub >

github_iconTop Results From Across the Web

IntelliSense in Visual Studio Code
IntelliSense. IntelliSense is a general term for various code editing features including: code completion, parameter info, quick info, and member lists.
Read more >
How to include additional path for auto-completion ... - GitHub
So autocomplete and other features will usually generate "too many" results, sometimes invalid in the context, or local vars will be missing.
Read more >
Python: Can autocomplete be used for the elements in a list?
Yes it can. This works in WingIDE (and I'm sure in PyCharm as well): from typing import List class MyClass: def hello(self): print("Hello") ......
Read more >
How to get custom object fields displaying in code completion ...
Autocomplete depends on the metadata cache. To fix this, go to View > Command Palette (Ctrl-Shift-P), and type in "sobject".
Read more >
How can I add autocomplete in notepad++ for ... - Super User
Go to Settings -> Preferences, and switch to the Backup/Auto-competion tab. At the bottom of that screen you'll see where you can enable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found