aztfmod / rovergo

The next version of Rover, the command line tool for Azure CAF Landingzones. Developed in Go
MIT License
10 stars 7 forks source link

Resource not found for the segment 'me' #132

Open hallerx opened 2 years ago

hallerx commented 2 years ago

I am attempting to deploy a launchpad using a service principal that has owner privileges to subscription, directory read/write, application read/write API permissions and admin consent. All of this is attempted using Azure DevOps Microsoft-hosted agent or Ubuntu 20.04.2 LTS virtual machine.

Expected Behavior

Rover should create launchpad and required resources. Readme should state what type of permissions RoverGo expects before proceeding. Output in debug mode should be more clear which statement RoverGo is executing and where it's failing at.

Actual Behavior

Azure subscription is: XYZ (sample_subscription_id)
Failed, ERROR: Resource not found for the segment 'me'.
Error: exit status 1

If Rover is launched when authenticated using standard user account which has owner permissions, it succeeds to deploy resources. If Rover is launched when authenticated using service principal, it fails with above message.

Steps to Reproduce the Problem

- none

variables:
- group: bootstrap-variable-group
- name: terraform_version
  value: 0.15.5

pool:
  vmImage: 'ubuntu-latest'

stages:
- stage: Init_launchpad
  jobs:
  - job: Init_rover
    steps:
    - script: |
        curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
        sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
        sudo apt install terraform=$(terraform_version) --allow-downgrades -y
      displayName: Install Terraform version $(terraform_version)
    - script: |
        curl https://raw.githubusercontent.com/aztfmod/rovergo/main/install.sh | bash
      displayName: Install Rover v2
    - task: AzureCLI@2
      displayName: 'Rover deploy launchpad'
      inputs:
        scriptType: bash
        scriptLocation: inlineScript
        azureSubscription: 'connection_name'
        inlineScript: |
          git clone https://github.com/aztfmod/rovergo.git
          git clone https://github.com/aztfmod/symphony.git
          git clone https://github.com/Azure/caf-terraform-landingzones.git
          ./bin/rover apply --config-dir ./symphony/caf/config_launchpad/level0/launchpad --source ./caf-terraform-landingzones --launchpad --level level0 --debug

Environment Details

core 2.0.81 telemetry 1.0.4

Extensions: azure-devops 0.17.0

Python location '/usr/bin/python3' Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]