bicep
bicep copied to clipboard
Any plan for VS Code Plugin supporting national cloud?
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.
@ucheNkadiCode -- can you help triage this?
@ucheNkadiCode Could you please take a look at this issue?
@alex-frankel Could you please help to assign this issue to another owner? I could not find Uche in MS corp anymore.
@bhsubra @puicchan Hi team, any update?
@chuckz1321 - I just took over from Uche. Let me sync with team and get back to you.
@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 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.
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.
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.
You can reach me by Teams if you need me to present. My alias is chenzhang.
@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...?
Insert Resource... fails with a similar subscription not found error...
If it helps, I'm seeing the same error based on the following steps
- Azure Sign-in to Azure Government.
- Generate the properties for a resource located in usgovarizona
- Copy the resource id
- 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 .
@StephenWeatherford Any progress?
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.

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

@StephenWeatherford Any progress?
Not yet, but we will look into it, thanks.
@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.