Skip to content

import from a bicep file in a bicepparam file fails to build #18221

@polatengin

Description

@polatengin

Bicep build-params command fails when extended bicepparam file imports from bicep files.

To Reproduce

consts.bicep

@export()
var someGlobal = 'someValue'

base.bicepparam

import * as consts from 'consts.bicep'

using none

param testParam1 = consts.someGlobal

test.bicepparam

using 'test.bicep'

extends 'base.bicepparam'

param testParam2 =  'someOtherValue'

test.bicep

param testParam1 string
param testParam2 string

Run dotnet run --project ./src/Bicep.Cli -- build-params ./test.bicepparam in terminal, you'll get

WARNING: The following experimental Bicep features have been enabled: Resource-typed parameters and outputs, Enable extendable parameters. Experimental features should be enabled for testing purposes only, as there are no guarantees about the quality or stability of these features. Do not enable these settings for any production usage, or your production environment may be subject to breaking.
test.bicepparam(5,25) : Error BCP338: Failed to evaluate parameter "testParam1": The given key 'WildcardImportPropertyReference { WildcardImport = Bicep.Core.Semantics.WildcardImportSymbol, PropertyName = someGlobal }' was not present in the dictionary. [https://aka.ms/bicep/core-diagnostics#BCP338]

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions