contoso-chat icon indicating copy to clipboard operation
contoso-chat copied to clipboard

The target scope "subscription" does not match the deployment scope "resourceGroup".

Open davew-msft opened this issue 1 year ago • 10 comments
trafficstars

run ./provision.sh on a fresh install and you get

The target scope "subscription" does not match the deployment scope "resourceGroup".

appears as though the fix is something like this on Line 21.

az deployment sub create --name contchat --location $resourceGroupLocation --only-show-errors --template-file infra/main.bicep > /dev/null

davew-msft avatar Mar 12 '24 16:03 davew-msft

@cassiebreviu might have something to do with your change yesterday. dunno/can't tell.

davew-msft avatar Mar 12 '24 16:03 davew-msft

I dunno if that is right or not. I'm now getting a bunch of errors that I filed on Issue 80: https://github.com/Azure-Samples/contoso-chat/issues/80 . But it's possible that a different/better fix would ameliorate those errors.

I'm just a dumb data scientist.

I'd also say that the provision.sh is creating a rg that is then not being used during the main.bicep deployment. The former creates contchat-rg but main.bicep (or whatever...I'm not a bicep expert) is using rg-contchat.

Might need to wipe out all the rgs, start with a clean devcontainer and retest everything. I'm happy to volunteer because, basically, if you can get this working for an id1ot like me...well, it'll work for anyone.

davew-msft avatar Mar 12 '24 17:03 davew-msft

I have same issue.

We recently made change to enable azd up can you try that instead of the provision script? We did test that the provision script should still work on its own though as well.

cassiebreviu avatar Mar 13 '24 01:03 cassiebreviu

Same for me.

run ./provision.sh on a fresh install in a Codespace and you get: "ERROR: The target scope "subscription" does not match the deployment scope "resourceGroup"."

sebafo avatar Mar 18 '24 09:03 sebafo

Can you confirm that you ran the az account set --subscription "<SUBSCRIPTION-NAME>" set prior to the running the provision script?

cassiebreviu avatar Mar 18 '24 14:03 cassiebreviu

still getting the same issue

The target scope "subscription" does not match the deployment scope "resourceGroup".

jwalitptl avatar Mar 19 '24 16:03 jwalitptl

There will be a pr with instructions for fixing this likely later today. The azd up command on local works on the current version in main. We will advise what checkin to pull if you want to run the provision.sh script with codespaces.

cassiebreviu avatar Mar 19 '24 16:03 cassiebreviu

so you are suggesting azd up command instead running provision.sh?

jwalitptl avatar Mar 19 '24 16:03 jwalitptl

Please check the updated readme. If you wish to use codespaces and the provision.sh script (the way its documented in the instructions), then use the Stable commit ID below. If you wish to use azd up and the continuing upgrades, use main.

Stable : #cc2e808 | Version tested & used in Microsoft AI Tour (works on Skillable) Active : main | Version under active development (breaking changes possible)

Thanks!

cassiebreviu avatar Mar 20 '24 13:03 cassiebreviu

[!NOTE]
This sample is currently undergoing a refresh in preparation for #MSBuild so many of these issues may no longer be relevant. We are closing issues now in preparation for the new version. Check back May 21, 2024 for updated release before posting new issues.

nitya avatar May 07 '24 18:05 nitya