Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Subscription not found issue with GenerateResourcesAndImage #6162

Closed
2 of 10 tasks
tedm13 opened this issue Aug 29, 2022 · 0 comments
Closed
2 of 10 tasks

Subscription not found issue with GenerateResourcesAndImage #6162

tedm13 opened this issue Aug 29, 2022 · 0 comments

Comments

@tedm13
Copy link

tedm13 commented Aug 29, 2022

Description

I've recently had troubles running the scripts specifically the GenerateResourcesAndImage, the result is with an error saying it is unable to find the Subscription however it will create the resource group but it will not create the storage account to hold the resources. I've had this working in a different subscription but not in a subscription I just created to isolate all the build images. The new subscription has the proper IAM roles and I've tried creating a app registration thinking there was an access issue but it didn't work.

I'm also running this script locally in windows/powershell and have had it working but when switching the target subscription I receive errors.

Below is the command I run.

GenerateResourcesAndImage -SubscriptionId {SubscriptionID} -ResourceGroupName "rg-st-ubuntu-eastus" -ImageGenerationRepositoryRoot "$pwd" -ImageType Ubuntu2004 -AzureLocation "East US" -AzureClientId {AzureClientId} -AzureClientSecret {AzureClientSecret} -AzureTenantId {AzureTenantId }

This is the output that I get

Name : DevOps Pipelines {IDs}
Account : {SubsAccount}
Environment : AzureCloud
Subscription : {SubscriptionID}
Tenant : {TenantID}
TokenCache :
VersionProfile :
ExtendedProperties : {}

ResourceGroupName : rg-st-ubuntu-eastus
Location : eastus
ProvisioningState : Succeeded
Tags :
TagsTable :
ResourceId : /subscriptions/{SubscriptionID}/resourceGroups/rg-st-ubuntu-eastus
ManagedBy :

Delete Resource Group
The resource group you specified already exists. Do you want to clean it up?
[Y] Yes [N] No [S] Stop [?] Help (default is "Y"): N
GenerateResourcesAndImage : Subscription {SubscriptionID} was not found.
At line:1 char:1

  • GenerateResourcesAndImage -SubscriptionId {SubscriptionID} ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,GenerateResourcesAndImage
    
    

Platforms affected

  • Azure DevOps
  • GitHub Actions

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

I'm using the latest from master

Is it regression?

No

Expected behavior

To be able to generate the resources and images.

Actual behavior

Erroring out right after the resource group is created.

Repro steps

  1. Import the helper to GenerateResourcesAndImages
  2. Run the GenerateResourcesAndImages script
  3. It will error out

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants