Open
Description
Library name
Azure.Provisioning 1.0.0
Please describe the feature.
The ContainerApp
resource does not currently support being able to emit the kind
property on the container app resource.
I'd like to be able to emit the following Bicep resource definition:
resource myapp 'Microsoft.App/containerApps@2024-10-02-preview' = {
{
...
kind: 'foobar'
}
This currently requires a workaround like the following:
/// <summary>
/// Container app with kind.
/// </summary>
public class ContainerAppWithKind : ContainerApp
{
/// <summary>
/// The kind of the container app.
/// </summary>
public BicepValue<string> Kind
{
get { Initialize(); return _kind!; }
set { Initialize(); _kind!.Assign(value); }
}
private BicepValue<string>? _kind;
/// <summary>
/// Creates a new instance of <see cref="ContainerAppWithKind"/>.
/// </summary>
public ContainerAppWithKind(string bicepIdentifier, string? resourceVersion = null) : base(bicepIdentifier, resourceVersion) { }
/// <summary>
/// Overrides provisionable properties.
/// </summary>
protected override void DefineProvisionableProperties()
{
base.DefineProvisionableProperties();
_kind = DefineProperty<string>(nameof(Kind), ["kind"]);
}
}