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

Compute Extension template type - invalid #59283

Closed
silaspath opened this issue Jul 18, 2020 · 6 comments
Closed

Compute Extension template type - invalid #59283

silaspath opened this issue Jul 18, 2020 · 6 comments

Comments

@silaspath
Copy link

In the extension schema, the following key-value pair is invalid:
"type": "extensions"

However, the below works:
"type": "Microsoft.Compute/Extensions"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@silaspath
Copy link
Author

silaspath commented Jul 18, 2020

Turns out that's incorrect as well.

I copied a schema from template of a current Windows VM with the extension installed post-deploy:

        {
            "type": "Microsoft.Compute/virtualMachines/Extensions",
            "apiVersion": "2019-07-01",
            "name": "AzureNetworkWatcherExtension",
            "location": "[resourceGroup().location]",
            "dependsOn": [
                "[resourceId('Microsoft.Compute/virtualMachines', variables('vmName'))]"
            ],
            "properties": {
                "publisher": "Microsoft.Azure.NetworkWatcher",
                "type": "NetworkWatcherAgentWindows",
                "typeHandlerVersion": "1.4",
                "autoUpgradeMinorVersion": true
            }
        }

The below error appears:

Deployment template validation failed: 'The template resource 'AzureNetworkWatcherExtension' for type 'Microsoft.Compute/virtualMachines/Extensions' at line '238' and column '64' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-template/#resources for usage details.'. (Code: InvalidTemplate)

@YutongTie-MSFT
Copy link
Contributor

@jaydarius
Thanks for the feedback! We are currently investigating and will update you shortly.

@YutongTie-MSFT
Copy link
Contributor

@mimckitt Hello Micah! Need your help here. Could you please check the document and update it? Thanks!

@mimckitt
Copy link
Contributor

mimckitt commented Aug 3, 2020

#reassign: @damendo

@damendo since your team works on Network Watcher, can you take a look at this?

@PRMerger6 PRMerger6 assigned damendo and unassigned mimckitt Aug 3, 2020
@damendo
Copy link
Contributor

damendo commented Aug 4, 2020

@jaydarius the type is correct. But you need more segments in the name.
See: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/child-resource-name-type#outside-parent-resource

Something like VmName/AzureNetworkWatcherExtension should work.

@Karishma-Tiwari-MSFT
Copy link
Member

Thanks for bringing this to our attention. We will now close this issue. If there are further questions regarding this matter, please tag me in a comment. I will reopen it and we will gladly continue the discussion.

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

No branches or pull requests

6 participants