Skip to content

[Provisioning] BicepList and BicepDictionary is not assigning _self to its elements #52263

@ArcturusZhang

Description

@ArcturusZhang

For other ProvisionableConstruct or ProvisionableResource, if I assign something as a value of their properties, like this:

var kvSku = new KeyVaultSku { Name = skuName, Family = KeyVaultSkuFamily.A, };
var kvProperties = new KeyVaultProperties();
kvProperties.Sku = kvSku;

There is a kvSku instance, once I assign that as a property of kvProperties, some internal status changed for this instance, which tracks where this instance is used as its context of usage.

But BicepList and BicepDictionary currently does not have that mechanism.
If I do this:

var policy = new KeyVaultAccessPolicy();
kvProperties.AccessPolicies.Add(policy);

the policy instance is as clean as it is newly created - it never leaves a mark on this instance that this instance has been used as an item of a BicepList.

This bug creates challenges when we are trying to support more complicated scenarios of bicep building.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MgmtThis issue is related to a management package.Provisioning

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions