reference(resourceName or resourceIdentifier, [apiVersion], ['Full'])
- Returns an object representing a resource's runtime state.
resourceId([subscriptionId], [resourceGroupName], resourceType, resourceName1, [resourceName2], ...)
- Returns the unique identifier of a resource.
- subscriptionResourceId([subscriptionId], resourceType, resourceName1, [resourceName2], ...)
- Returns the unique identifier for a resource deployed at the subscription level.
tenant() // returns the tenant scope
managementGroup() // returns the current management group scope (only from managementGroup deployments)
managementGroup(name: string) // returns the scope for a named management group
subscription() // returns the subscription scope for the current deployment (only from subscription & resourceGroup deployments)
subscription(subscriptionId: string) // returns a named subscription scope (only from subscription & resourceGroup deployments)
resourceGroup() // returns the current resource group scope (only from resourceGroup deployments)
resourceGroup(resourceGroupName: string) // returns a named resource group scope (only from subscription & resourceGroup deployments)
resourceGroup(subscriptionId: string, resourceGroupName: string) // returns a named resource group scope (only from subscription & resourceGroup deployments)
- Accepts results of scope functions or symbolic reference to a scope
- Resource reference created with resource keyword
- Existing resource reference created with resource + exising keywords
- resource id not accepted? TBD
- Extension method scope must have same root resource scope than the bicep file
- e.g. Bicep file with resource group scoping will fail directly to create a new role assignment into some other resource group
- Is it possible to do deployment of extension resource when bicep scope is subscription?
- Scope can be selected freely