Skip to content

Validation failing after enabling "Core.SkipResource": false and "Core.AutoGeneratedTemplateFolderPath": ".az" #622

@rahul-ve

Description

@rahul-ve

Describe the bug

Encountering the below error after enabling the settings "Core.SkipResource": false and "Core.AutoGeneratedTemplateFolderPath": ".az". Tried creating a new resource group but validation fails with:

[06:52:00][Initialize-AzOpsEnvironment] AzOps environment initialization concluded
[06:52:00][Invoke-AzOpsPush] Deployment required
[06:52:00][Invoke-AzOpsPush] Adding or modifying:
[06:52:00][Invoke-AzOpsPush]   root/eslzxx (eslzxx)/eslzxx-sandboxes (eslzxx-sandboxes)/sub-it-sbox-prototype-001 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/rg-st-test-sbox-001/microsoft.resources_resourcegroups-rg-st-test-sbox-001.json
[06:52:00][Invoke-AzOpsPush]   settings.json
[06:52:00][Invoke-AzOpsPush] Deleting:

WARNING: [06:52:05][New-AzOpsScope] Failed to: Creating new scope from path /home/runner/work/eslzxx/eslzxx/root/eslzxx (eslzxx)/eslzxx-sandboxes (eslzxx-sandboxes)/sub-it-sbox-prototype-001 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/rg-st-test-sbox-001 | Cannot find path '/home/runner/work/eslzxx/eslzxx/root/eslzxx (eslzxx)/eslzxx-sandboxes (eslzxx-sandboxes)/sub-it-sbox-prototype-001 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/rg-st-test-sbox-001/.az' because it does not exist.

WARNING: [06:52:05][New-AzOpsScope] Failed to: Creating new scope from path /home/runner/work/eslzxx/eslzxx/root/eslzxx (eslzxx)/eslzxx-sandboxes (eslzxx-sandboxes)/sub-it-sbox-prototype-001 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/rg-st-test-sbox-001/microsoft.resources_resourcegroups-rg-st-test-sbox-001.json | Cannot find path '/home/runner/work/eslzxx/eslzxx/root/eslzxx (eslzxx)/eslzxx-sandboxes (eslzxx-sandboxes)/sub-it-sbox-prototype-001 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/rg-st-test-sbox-001/.az' because it does not exist.
[06:52:05][Invoke-AzOpsPush] Expecting deploymentList object, it was not found. Exiting runtime with error code 1.
Error: Process completed with exit code 1.

I don't fully understand the error. why is it looking for sub-it-sbox-prototype-001 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/rg-st-test-sbox-001/.az folder?

Steps to reproduce

1 . Used the adventureworks template and setup the IaC repo based of the AzOps accelerator template repo.

2 . Then enabled the below two settings to pull in resources that were already present:

"Core.AutoGeneratedTemplateFolderPath": ".az",
"Core.SkipResource": false,

All other settings were left with their defaults.

Pull workflow ran fine.

3 . Tried creating a resource group rg-st-test-sbox-001 under sub sub-it-sbox-prototype-001 but validation step fails with the above error.
The sub sub-it-sbox-prototype-001 was created via the Portal and pulled in, not sure if that matters.

Not sure if this is a bug or incorrect settings.
Would greatly appreciate any pointers in understanding the root cause of this issue.

Thanks
Rahul

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedwaiting-for-responseMaintainers have replied and are awaiting a response from the bug/issue/feature creator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions