Skip to content

Commit 40f9805

Browse files
committed
update
1 parent db4cd0d commit 40f9805

File tree

1 file changed

+5
-4
lines changed
  • articles/azure-resource-manager/bicep/diagnostics

1 file changed

+5
-4
lines changed

articles/azure-resource-manager/bicep/diagnostics/bcp139.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: BCP139
33
description: Error - A resource's scope must match the scope of the Bicep file for it to be deployable. You must use modules to deploy resources to a different scope.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 09/19/2024
6+
ms.date: 09/20/2024
77
---
88

99
# Bicep error code - BCP139
@@ -31,6 +31,7 @@ The following example deploys a storage account resource to a different resource
3131
param otherResourceGroup string
3232
param location string
3333
34+
// resource deployed to a different resource group in the same subscription
3435
resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
3536
name: uniqueString(resourceGroup().id)
3637
scope: resourceGroup(otherResourceGroup)
@@ -47,7 +48,7 @@ You can fix the error by using the `module` declaration type:
4748
```bicep
4849
param otherResourceGroup string
4950
50-
// module deployed to resource group in the same subscription
51+
// module deployed to a different resource group in the same subscription
5152
module exampleModule 'module.bicep' = {
5253
name: 'deployStorageToAnotherRG'
5354
scope: resourceGroup(otherResourceGroup)
@@ -61,7 +62,7 @@ targetScope = 'subscription'
6162
6263
param otherSubscriptionID string
6364
64-
// module deployed at subscription level but in a different subscription
65+
// resource deployed to a different subscription
6566
resource exampleResource 'Microsoft.Resources/resourceGroups@2024-03-01' = {
6667
name: 'deployToDifferentSub'
6768
scope: subscription(otherSubscriptionID)
@@ -76,7 +77,7 @@ targetScope = 'subscription'
7677
7778
param otherSubscriptionID string
7879
79-
// module deployed at subscription level but in a different subscription
80+
// module deployed to a different subscription
8081
module exampleModule 'module.bicep' = {
8182
name: 'deployToDifferentSub'
8283
scope: subscription(otherSubscriptionID)

0 commit comments

Comments
 (0)