I'm not able to connect a Devops repository to create my own environment ARM template into DevTest lab. How to debug this issue?

Mohamad CHHIMI 66 Reputation points
2021-10-13T09:23:52.447+00:00

Hello,

I'm trying to add a personal AZURE DevOps repository to my AZURE DevTest Lab to create my own ARM template .
I succeeded to connect the repository to visualise my custom artifacts, but I'm not able to visualise my custom ARM template's environments.
To accomplish that I used an environment ARM template form the public repository on GitHub and I copied it on my personal DevOps repository and doesn't appear in the list of my available environments. ( For example the WebApp-MySQL environment)

How can i debug this issue ?

Best regards
Mohamad

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
254 questions
0 comments No comments
{count} votes

Accepted answer
  1. kobulloc-MSFT 23,181 Reputation points Microsoft Employee
    2021-10-28T20:38:05.557+00:00

    Hello again @Mohamad CHHIMI ,

    When completing the documentation to add template repositories to the lab, it looks like the issue is the expected Azure Resource Manager template folder path. Each environment needs to be in its own folder and the recommendation is to have those folders in an environments/templates folder.

    For example, I have a copy of the WebApp template that I've made some modifications to. My GitHub repository looks like this:

    MyGitHubRepository/MyTemplates/MyWebAppTemplate

    144655-image.png

    When adding the Azure Resource Manager template repository, I need to enter the parent folder for the Azure Resource Manager template folder path:

    /MyTemplates

    144714-image.png

    After doing this, I'm able to see my ARM environment when creating a new lab:

    144733-image.png

    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Mohamad CHHIMI 66 Reputation points
    2021-10-29T07:36:44.75+00:00

    Hello @Anonymous ,

    Thank you for your answer. The problem is resolved.
    I can now see my custom environment.
    144844-image.png

    Best regards
    Mohamad

    1 person found this answer helpful.

  2. kobulloc-MSFT 23,181 Reputation points Microsoft Employee
    2021-10-13T15:27:18.75+00:00

    Hello, @Mohamad CHHIMI !

    Thank you for reaching out! Azure DevOps and its services are not supported in Microsoft Q&A because the Azure DevOps team and DevOps community are actively answering questions here:

    https://developercommunity.visualstudio.com/spaces/21/index.html


  3. kobulloc-MSFT 23,181 Reputation points Microsoft Employee
    2021-10-21T06:42:32.707+00:00

    Hello @Mohamad CHHIMI ,

    Let's start out with the following and see where you are running into trouble:

    Add template repositories to the lab
    https://learn.microsoft.com/en-us/azure/devtest-labs/devtest-lab-create-environment-from-arm#add-template-repositories-to-the-lab

    1. In your lab resource, go to Settings > Configuration and policies
    2. Under external resources, click on Repositories and then Add a repository
    3. Complete the wizard and Save

    142363-image.png

    142364-image.png

    142365-image.png

    After successfully completing that, you should see your repository listed:

    142319-image.png

    0 comments No comments

  4. Mohamad CHHIMI 66 Reputation points
    2021-10-21T08:32:54.987+00:00

    Hello @Anonymous ,

    I made exactly the same steps.
    I added the repository, one for artifacts and one for environments.
    For the artifacts repo i can see my custom artifact in the available artifacts list.
    142392-image.png
    142376-image.png

    For the environments i can't see my custom environments. Only public environments are visible in the list of available environments.
    When i save my configuration we can see that AZURE try to populate the AZURE Resource manager template cache.
    142386-image.png

    Then it's saved correctly.
    142402-image.png

    When i go to deploy a custom environments only public environment are available. My custom environments doesn't appear.
    142403-image.png

    Best regards
    Mohamad