Skip to content

[Provisioning] Unable to force a list property to an empty list #53346

@ArcturusZhang

Description

@ArcturusZhang

Currently we do not really have a "official" way to assign an empty list.
If we do this:

var resource = new TestResource("r")
{
List = []
};

or

var resource = new TestResource("r");
resource.List.Clear();

the bicep produced by this resource would not have this list property at all.

Currently, if we want an empty list, we will have to assign it as an expression.

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageProvisioning

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions