An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
Yogo Koyama hi & thx for join me at Q&A platform,
important distinction is between general ARM concurrency behavior and guarantees explicitly documented for the Bastion resource provider. The Bastion Create Or Update API is a PUT operation. Its published contract doesn't explicitly document support for If-None-Match: * as a create-only condition.
If that condition is supported and enforced, an existing resource should produce 412 Precondition Failed. However, I wouldn't assume this behavior is guaranteed for Microsoft.Network/bastionHosts API 2024-05-01 without confirmation from Microsoft. A normal PUT can create or update the resource. Concurrent operations may produce 409 Conflict, but there's no documented guarantee of a specific response when an earlier creation is still running.
Regarding your second question, there's no documented atomic API that confirms all operations affecting the Bastion, Public IP, and AzureBastionSubnet have completed, particularly when their operation IDs are unknown.
Checking provisioningState and Activity Log can help, but neither provides a race-free synchronization guarantee.
For automation, I'd serialize operations on these resources, track the asynchronous operation URLs returned by ARM, and wait for terminal states before proceeding. A preliminary GET alone isn't sufficient.
https://learn.microsoft.com/en-us/rest/api/virtualnetwork/bastion-hosts/create-or-update
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations
For a strict create-only guarantee, I'd request explicit confirmation from the Azure Networking team for this particular API version rather than rely on undocumented behavior.
Best regards,
Alex
💬 P.S. Did this help? Mark it as the solution: it keeps me motivated!
➕ Follow me on Q&A for more answers
📝 And feel free to visit my blog → https://ctrlaltdel.blog/