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

Regression: 2022-08-08 Microsoft.Automation/automationAccounts/runbooks has incorrect validation for "name" property #2947

Open
StephenWeatherford opened this issue Aug 24, 2023 · 0 comments

Comments

@StephenWeatherford
Copy link

This was not a problem before 2022-08-08.

The following template gives an error with the "name" property of Microsoft.Automation/automationAccounts/runbooks:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "resources": [
        {
            "name": "parent/automationRunbook1",
            "type": "Microsoft.Automation/automationAccounts/runbooks",
            "apiVersion": "2022-08-08",
            "location": "[resourceGroup().location]",
            "tags": {},
            "dependsOn": [
                "[resourceId('Microsoft.Automation/automationAccounts', 'automationAccount1')]"
            ],
            "properties": {
                "logVerbose": true,
                "logProgress": true,
                "runbookType": "Script",
                "publishContentLink": {
                    "uri": "uri",
                    "version": "1.0.0.0"
                },
                "description": "description"
            }
        }
    ]
}

Error:

Value must match the regular expression ^[a-zA-Z][a-zA-Z-_0-9]*$

EXPECTED: This error is incorrect because the name needs two segments. It should pass.
If you remove "parent" from the name, you instead get an error about the number of name segments.

StephenWeatherford pushed a commit to microsoft/vscode-azurearmtools that referenced this issue Aug 24, 2023
StephenWeatherford added a commit to microsoft/vscode-azurearmtools that referenced this issue Aug 25, 2023
* Update instructions

* Update snippets

* update snippet test baselines

* fix for schema change

* workaround Azure/azure-resource-manager-schemas#2947

* Update snippet types due to schema changre

---------

Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
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