Azure / Azure/bicep

Resource type in resource definition should accept parameter or variable

Open
#1,761 4 comments 1 reaction 0 assignees View on GitHub
enhancement revisit
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
When I define new resource I must use static string for resource type. E.g.

```bicep
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' existing = {
name: resourceName
}
```

**Describe the solution you'd like**
Instead I'd like to do something like this

```bicep
resource storageAccount storageType existing = {
name: resourceName
}
```

where storageType is parameter or variable.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how Bicep resource definitions handle the resource type expression in the examples shown. Determine whether parameter or variable values can be accepted while preserving the existing static resource-type syntax; done means the requested example compiles and existing-resource behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.