Skip to content

[FEATURE REQ] FromExisting methods should support setting scopes #47980

Open
@captainsafia

Description

@captainsafia

Library name

Azure.Provisioning 1.0.0

Please describe the feature.

The FromExisting methods that are exposed on resource types in the library take a resource identifier and a version.

public static CassandraTableThroughputSetting FromExisting(string bicepIdentifier, string? resourceVersion = default) =>
new(bicepIdentifier, resourceVersion) { IsExistingResource = true };
}

As a result, it's not possible to reference existing resources that have been scoped to a resource group or subscription as defined in https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-scope.

Also, it doesn't appear like there are properties to set on the resulting resource types to configure the scope after the fact.

It's possible to manually workaround this issue by building out the expression manually but a helper would be nice.

Would it be possible to expand the behavior of FromExisting so that scopes can be set on the target resource?

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Provisioning

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions