bicep
bicep copied to clipboard
staticSites/config 'appsettings': The property "parent" is not allowed on objects of type "Microsoft.Web/staticSites/config@2021-03-01"
Bicep version Bicep CLI version 0.2.265 (184313e702)
Describe the bug A clear and concise description of what the bug is vs what you expected to happen Wish to use appSettings resource, associated to an SWA resource via parent attribute.
When using the default code given as an example in the docs I am given the below error message:
Error BCP038: The property "parent" is not allowed on objects of type "Microsoft.Web/staticSites/config@2021-03-01". Permissible properties include "dependsOn", "eTag", "extendedLocation", "identity", "location", "managedBy", "managedByExtended", "plan", "scale", "scope", "sku", "tags", "zones".
To Reproduce
- Create generic staticSites resources such as:
resource adminSWA 'Microsoft.Web/staticSites@2021-03-01' = if (Deploy) {
name: name
location: location
sku: {
name: skuName
tier: skuTier
}
tags: CoreTags
properties: {
stagingEnvironmentPolicy: stagingEnvironmentPolicy
allowConfigFileUpdates: true
provider: 'None'
enterpriseGradeCdnStatus: 'Disabled'
}
}
-
Use the default appSettings resource, with parent name matching that of the staticSite's symbolic name
-
Deploy to Azure DevOps
Additional context The SWA is a Blazor application. It is necessary to use the appSettings as there are secret values stored as variables in our Azure DevOps pipeline which need to be imported for use, in replacement of launchSettings.json locally.
Can you share the full repro with the resource that is trying to use the parent
property?
Hi @alex-frankel
The below is the script that's erroring (not including the param/var declarations) - in this instance I've literally copied/pasted the example code from the docs, hence it still being called "symbolicname":
var CoreTags = {
Company: Company
Application: Application
Stage: Stage
Approver: Approver
NHQOwner: NHQOwner
SLA: ServiceClass
CreateDate: CreateDate
Lifecycle: Lifecycle
}
resource adminSWA 'Microsoft.Web/staticSites@2021-03-01' = if (Deploy) {
name: name
location: location
sku: {
name: skuName
tier: skuTier
}
tags: CoreTags
properties: {
stagingEnvironmentPolicy: stagingEnvironmentPolicy
allowConfigFileUpdates: true
provider: 'None'
enterpriseGradeCdnStatus: 'Disabled'
}
}
resource symbolicname 'Microsoft.Web/staticSites/config@2021-03-01' = {
name: 'appsettings'
kind: 'string'
parent: adminSWA
properties: {}
}
TIA!
Rich
Hi jacksorjacksor, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! :smile: :mechanical_arm: