Bug: Scripted export doesn't deploy - bicep doesn't notice double definition of same properties
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
0.5.6
**Describe the bug**
Exported SQL server + db which came with RBAC for one user admin, system managed identities. I've genericised it, but the advisors and other bits fail to get created which fails the deployment. It also doesn't notice the administrative users are defined inside server resource properties (along with azureADOnlyAuthentication) and additionally as separate resource definitions of type

Also Bicep attempts to script things that arm template shouldn't support (SQL ADVISORS)
https://github.com/MicrosoftDocs/azure-docs/issues/29684#issuecomment-484838633
Lost a lot of time to stupid arm deployment incompatibilities after exporting templates from existing resources. Makes me think terraform is a better-supported option as it's their primary business focus, but I'm trying to resist as bicep is fairly comfortable to work with for a newcomer to IaC, and works smoothly with github/azure-devops/local.
I know a lot of the problems can be worked around easily enough, do things in separate stages/files, or use post-process commands, but I'd rather the process of writing bicep files was smoother (better linting + snippets).
**Expected Outcome**
I expect the bicep plugin for vscode to detect double definitions of the same effective property. I also dream that it would tell you what cannot be set (it does some) and eventually offer snippets of best practises #4402
Contributor guide
Research direction
Start with the Bicep VS Code plugin and the exported SQL server and database scenario described in the report. Investigate how duplicate effective properties and unsupported SQL ADVISORS are handled during export and deployment. Done should include detecting the duplicate definitions and clearly identifying settings that ARM templates cannot deploy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, vscode
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100