bicep icon indicating copy to clipboard operation
bicep copied to clipboard

Any plan for VS Code Plugin supporting national cloud?

Open chuckz1321 opened this issue 3 years ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] For now, it's not able to deploy national cloud resources using bicep plugin in VS Code. It will prompt "Subscription not found."

Describe the solution you'd like A clear and concise description of what you want to happen.

chuckz1321 avatar Sep 07 '22 06:09 chuckz1321

@ucheNkadiCode -- can you help triage this?

alex-frankel avatar Sep 14 '22 19:09 alex-frankel

@ucheNkadiCode Could you please take a look at this issue?

chuckz1321 avatar Sep 27 '22 05:09 chuckz1321

@alex-frankel Could you please help to assign this issue to another owner? I could not find Uche in MS corp anymore.

chuckz1321 avatar Sep 27 '22 05:09 chuckz1321

@bhsubra @puicchan Hi team, any update?

chuckz1321 avatar Oct 03 '22 03:10 chuckz1321

@chuckz1321 - I just took over from Uche. Let me sync with team and get back to you.

puicchan avatar Oct 03 '22 14:10 puicchan

@chuckz1321, the Bicep extension should work with national cloud. Can you provide more details? e.g., which cloud? What are the resources you are deploying (some may not be supported in national cloud)? Is the message during login or during publish? etc.

puicchan avatar Oct 05 '22 19:10 puicchan

@puicchan When I deploy bicep in Mooncake with VS Code. It will prompt the subscription could not be found. You can check the error message below. image I log on VS code with my Mooncake account. Any other services like app service or function could be deployed normally.

The resources are storage account and vnet. I don't think the deployment has reached RP already.

chuckz1321 avatar Oct 06 '22 11:10 chuckz1321

It's wired that the header of the request seems to be set to another region. I mean "x-ms-routing-request-id" in the screenshot. I'm not sure it's a VS code level defect or the bicep extension compatibility issue.

chuckz1321 avatar Oct 06 '22 11:10 chuckz1321

You can reach me by Teams if you need me to present. My alias is chenzhang.

chuckz1321 avatar Oct 06 '22 11:10 chuckz1321

@chuckz1321 Thanks, that jives with what @bmoore-msft found:

Not working for me - it was a bit tricky to figure out how to get directed to USGov... I think I figured that out because it allowed me to select a subscription from the list. But when deploying I get this: … ErrorCode: SubscriptionNotFound ... Note the request route is CENTRALUS - I don't think centralus is a USGov endpoint... that and the fact is says the subId is not found makes me think it's not pointing to USGov during deployment

@bhsubra It appears that UI is able to properly select the subscription (I know those pieces have specifically been tested against other clouds), so it appears the Bicep extension is not copying/using the cloud environment information from that point.

I wonder if "Insert Resource..." works with other clouds...?

StephenWeatherford avatar Oct 06 '22 17:10 StephenWeatherford

Insert Resource... fails with a similar subscription not found error...

bmoore-msft avatar Oct 06 '22 19:10 bmoore-msft

If it helps, I'm seeing the same error based on the following steps

  1. Azure Sign-in to Azure Government.
  2. Generate the properties for a resource located in usgovarizona
  3. Copy the resource id
  4. Paste the resource id into "Insert Resource"

Then after a few seconds, I get an error like below.

Caught exception fetching resource: The subscription 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX' could not be found. Status: 404 (Not Found) ErrorCode: SubscriptionNotFound Content: {"error":{"code":"SubscriptionNotFound","message":"The subscription 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX' could not be found."}} Headers: Cache-Control: no-cache Pragma: no-cache x-ms-failure-cause: REDACTED x-ms-request-id: ed703b11-d2d3-4660-a34b-1326188047ff x-ms-correlation-request-id: ed703b11-d2d3-4660-a34b-1326188047ff x-ms-routing-request-id: WESTCENTRALUS:20221107T200205Z:ed703b11-d2d3-4660-a34b-1326188047ff Strict-Transport-Security: REDACTED X-Content-Type-Options: REDACTED Date: Mon, 07 Nov 2022 20:02:04 GMT Content-Type: application/json; charset=utf-8 Expires: -1 Content-Length: 129 .

snowke avatar Nov 07 '22 23:11 snowke

@StephenWeatherford Any progress?

chuckz1321 avatar Nov 08 '22 14:11 chuckz1321

Bicep has its own config file which can be created with the Bicep: Create Bicep Configuration File command. There is a cloud setting in that file which can be set to the other clouds. The problem here is that the Bicep is not using the shared cloud setting that all of the other Azure extensions use.

image

ColinBlair avatar Nov 14 '22 16:11 ColinBlair

@ColinBlair tried to deploy the bicep in VSCode with a config json file. Still failed. Same error msg. image

chuckz1321 avatar Nov 18 '22 06:11 chuckz1321

@StephenWeatherford Any progress?

Not yet, but we will look into it, thanks.

StephenWeatherford avatar Nov 18 '22 17:11 StephenWeatherford

@chuckz1321 Apologies, the config change does allow Bicep: Insert Resource to work and getting that to work is how I found this issue in the first place.

ColinBlair avatar Nov 18 '22 17:11 ColinBlair