The "scope" and "parent" properties do not work together.
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
Bicep CLI version 0.4.412 (f1169d063e)
**Describe the bug**
The following snippet should be possible, but it complains with the error "bicep(BCP165)".
```bicep
resource zone 'Microsoft.Network/dnsZones@2018-05-01' existing = {
name: 'some.dns.zone.com'
scope: resourceGroup('00000000-0000-0000-0000-000000000000', 'some-common-dns-rg')
}
resource zoneRecords 'Microsoft.Network/dnsZones/A@2018-05-01' = [for hostname in Hostnames: {
parent: zone
name: hostname
properties: {
TTL: 3600
targetResource: {
id: application_gateway.id
}
}
}]
```
Contributor guide
Research direction
Start by reproducing the BCP165 diagnostic with the supplied Bicep snippet using Bicep CLI 0.4.412. Trace how the compiler handles an existing resource with resource-group scope and a child resource using parent; done means the example compiles without BCP165 while preserving the intended scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100