You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/azure/services/resource-manager.mdx
+138Lines changed: 138 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,18 @@ This guide is designed for users new to Resource Manager and assumes basic knowl
24
24
25
25
Launch LocalStack using your preferred method. For more information, see [Introduction to LocalStack for Azure](/azure/getting-started/). Once the container is running, enable Azure CLI interception by running:
26
26
27
+
```bash
28
+
azlocal start-interception
29
+
```
30
+
31
+
This command points the `az` CLI away from the public Azure management REST API and toward the LocalStack for Azure emulator API.
32
+
To revert this configuration, run:
33
+
34
+
```bash
35
+
azlocal stop-interception
36
+
```
37
+
38
+
This reconfigures the `az` CLI to send commands to the official Azure management REST API.
27
39
28
40
### Create a resource group
29
41
@@ -123,6 +135,132 @@ az provider list --query "[?namespace=='Microsoft.Resources'].{namespace:namespa
123
135
]
124
136
```
125
137
138
+
### Deploy a Bicep template
139
+
140
+
Create a Bicep file named `main.bicep` that provisions a storage account inside the resource group:
The Resource Manager emulator supports the following features:
219
+
220
+
-**Resource group lifecycle**: Create, update, get, list, delete, and check existence of resource groups. Deletion cascades to all contained resources.
221
+
-**Resource listing and filtering**: List resources across a subscription or within a resource group, with support for `$filter` and `$expand` query parameters.
222
+
-**Resource move**: Move top-level resources between resource groups with validation of source and destination groups, resource locks, and resource hierarchy.
223
+
-**ARM template deployments**: Create or update deployments at the resource group scope and at the subscription scope. Templates are parsed and resources are provisioned in dependency order.
224
+
-**Bicep support**: Bicep files compiled by the Azure CLI are accepted as ARM JSON templates. The emulator handles Bicep 2.0 symbolic names, `languageVersion`, and `definitions` sections.
225
+
-**Nested deployments**: Inner-scoped and outer-scoped nested templates (`Microsoft.Resources/deployments`) are supported, including parameter passing between scopes.
226
+
-**ARM template functions**: Over 60 built-in functions are evaluated locally, including `resourceId`, `reference`, `listKeys`, `concat`, `format`, `uniqueString`, `resourceGroup`, `subscription`, `copyIndex`, `if`, `union`, `createObject`, and others.
227
+
-**Template validation**: Validate ARM templates at the resource group scope and subscription scope without creating resources.
228
+
-**Copy loops and conditional resources**: The `copy` element and `condition` property are supported, enabling iterative resource creation and conditional deployment logic.
229
+
-**Deployment operations**: List deployment operations at the resource group scope and at the subscription scope, including provisioning state and target resource details.
230
+
-**Deployment outputs**: Template outputs are evaluated after deployment completes, with full ARM expression resolution.
231
+
-**Subscription management**: List and get subscriptions, and list available Azure locations with metadata.
232
+
-**Tenant listing**: List tenant identifiers associated with the emulator environment.
233
+
-**Provider registry**: List, get, register, and unregister resource providers, including resource type details, API versions, and zone mappings.
234
+
-**Resource group locks**: Lock and unlock resource groups to prevent accidental deletion or modification of contained resources.
235
+
236
+
## Limitations
237
+
238
+
-**Single subscription**: The emulator exposes a single subscription. Multiple subscriptions are not supported.
239
+
-**Template validation is a no-op**: The `deployments validate` and `deployments validate at subscription scope` endpoints return a success response without performing syntactic or semantic validation.
240
+
-**No management group or tenant-scoped deployments**: Deployments are supported only at the resource group and subscription scopes.
241
+
-**No what-if analysis**: The `az deployment group what-if` operation is not implemented.
242
+
-**ARM template function coverage**: While over 60 functions are supported, some less common functions or advanced overloads may not be fully implemented.
243
+
-**No resource tags on generic resource listings**: Tags and extended properties may not be fully populated when listing resources across a subscription.
244
+
-**No RBAC enforcement on resource operations**: All API calls succeed without role-based access control checks.
245
+
-**Deployment concurrency**: Resources within a single deployment are created sequentially with dependency resolution, not in full parallel as in Azure.
246
+
-**No deployment cancellation**: Running deployments cannot be cancelled.
247
+
-**No deployment deletion**: Deployments are retained in memory and cannot be explicitly deleted via the API.
248
+
249
+
## Samples
250
+
251
+
The following samples demonstrate how to use Azure Resource Manager and Bicep with LocalStack for Azure:
252
+
253
+
-[Function App and Storage](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-storage-http/dotnet/)
254
+
-[Function App and Front Door](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-front-door/python/)
255
+
-[Function App and Managed Identities](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-managed-identity/python/)
256
+
-[Function App and Service Bus](https://github.com/localstack/localstack-azure-samples/tree/main/samples/function-app-service-bus/dotnet/)
257
+
-[Web App and Cosmos DB for MongoDB API](https://github.com/localstack/localstack-azure-samples/tree/main/samples/web-app-cosmosdb-mongodb-api/python/)
258
+
-[Web App and Cosmos DB for NoSQL API](https://github.com/localstack/localstack-azure-samples/tree/main/samples/web-app-cosmosdb-nosql-api/python/)
259
+
-[Web App and Managed Identities](https://github.com/localstack/localstack-azure-samples/tree/main/samples/web-app-managed-identity/python/)
260
+
-[Web App and SQL Database](https://github.com/localstack/localstack-azure-samples/tree/main/samples/web-app-sql-database/python/)
261
+
-[ACI and Blob Storage](https://github.com/localstack/localstack-azure-samples/tree/main/samples/aci-blob-storage/python/)
262
+
-[Azure Service Bus with Spring Boot](https://github.com/localstack/localstack-azure-samples/tree/main/samples/servicebus/java/)
0 commit comments