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

Nested Resources - Unable to Resolve Names #57

Open
sol3uk opened this issue Aug 14, 2023 · 0 comments
Open

Nested Resources - Unable to Resolve Names #57

sol3uk opened this issue Aug 14, 2023 · 0 comments

Comments

@sol3uk
Copy link

sol3uk commented Aug 14, 2023

Describe the bug
Forgive me if I'm doing something wrong, but I've noticed a lot of our templates will fail to display the names correctly, even when parameters are provided. Turns out this seems to be because we use a lot of nested resources. It looks like the resource names are struggling to display when the resources are nested within a deployment resource. Is this a bug or am I using the extension incorrectly?
When the resource is nested:
image
When I move the resource to the root it's fine (but no longer linked to the parent):
image

Again, apologies if this is just me misunderstanding, but as far as I can see the names should resolve correctly?

To Reproduce

 {
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "asbResourceGroup": {
      "type": "string"
    }
  },
  "variables": {
    "topic-name": "my.topic"
  },
  "resources": [
    {
      "apiVersion": "2018-05-01",
      "name": "eunEntities",
      "type": "Microsoft.Resources/deployments",
      "resourceGroup": "[parameters('asbResourceGroup')]",
      "properties": {
        "mode": "Incremental",
        "template": {
          "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
          "contentVersion": "1.0.0.0",
          "parameters": {},
          "resources": [
            {
              "type": "Microsoft.ServiceBus/namespaces/topics",
              "name": "[concat(variables('topic-name'))]",
              "apiVersion": "2018-05-01"
            }
          ]
        }
      }
    }
  ]
}
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

1 participant