Skip to content

Commit

Permalink
Azure.Provisioning: API cleanup (#46735)
Browse files Browse the repository at this point in the history
- Removing features that won't be shipping as GA (like preview versions, `IClientCreator`, `StorageResources`, etc.) and hiding them behind a feature flag
- Fixes #46559 to correctly serialize ISO8601 duration `TimeSpan`s by adding a `Format` to `BicepValue`.
- Fixes #46558 to change string interpolation to use `InterpolatedStringHandler` and also add a `BicepStringBuilder`
  • Loading branch information
tg-msft authored Oct 21, 2024
1 parent 8f98f23 commit 3fadc42
Show file tree
Hide file tree
Showing 284 changed files with 640 additions and 1,530 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public enum ContainerAppAccessMode
Expand Down Expand Up @@ -112,7 +111,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppAuthPlatform : Azure.Provisioning.Primitives.ProvisionableConstruct
Expand Down Expand Up @@ -228,7 +226,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppConnectedEnvironmentCertificate : Azure.Provisioning.Primitives.ProvisionableResource
Expand All @@ -247,7 +244,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppConnectedEnvironmentDaprComponent : Azure.Provisioning.Primitives.ProvisionableResource
Expand All @@ -271,7 +267,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public enum ContainerAppConnectedEnvironmentProvisioningState
Expand Down Expand Up @@ -299,7 +294,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppContainer : Azure.Provisioning.Primitives.ProvisionableConstruct
Expand Down Expand Up @@ -632,7 +626,6 @@ public static partial class ResourceVersions
{
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppJobConfiguration : Azure.Provisioning.Primitives.ProvisionableConstruct
Expand Down Expand Up @@ -733,7 +726,6 @@ public static partial class ResourceVersions
{
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppManagedEnvironment : Azure.Provisioning.Primitives.ProvisionableResource
Expand Down Expand Up @@ -771,7 +763,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppManagedEnvironmentCertificate : Azure.Provisioning.Primitives.ProvisionableResource
Expand All @@ -791,7 +782,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppManagedEnvironmentDaprComponent : Azure.Provisioning.Primitives.ProvisionableResource
Expand All @@ -816,7 +806,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public enum ContainerAppManagedEnvironmentOutBoundType
Expand All @@ -839,7 +828,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public partial class ContainerAppOpenIdConnectClientCredential : Azure.Provisioning.Primitives.ProvisionableConstruct
Expand Down Expand Up @@ -990,7 +978,6 @@ public static partial class ResourceVersions
public static readonly string V2022_10_01;
public static readonly string V2023_05_01;
public static readonly string V2024_03_01;
public static readonly string V2024_08_02_preview;
}
}
public enum ContainerAppSourceControlOperationState
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public static partial class ResourceVersions
public static readonly string V2014_08_01;
public static readonly string V2015_05_01;
public static readonly string V2020_02_02;
public static readonly string V2020_02_02_preview;
}
}
public enum ApplicationInsightsPublicNetworkAccessType
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal static void Init(string infraDirectory, CloudMachineInfrastructure cmi)

Infrastructure mainBicep = new("main")
{
TargetScope = "subscription"
TargetScope = DeploymentScope.Subscription
};
ModuleImport import = new("cm", $"cm.bicep")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ public CloudMachineInfrastructure(string cmId)
UserAssignedIdentities = { { BicepFunction.Interpolate($"{Identity.Id}").Compile().ToString(), new UserAssignedIdentityDetails() } }
};

_storage = StorageResources.CreateAccount("cm_storage");
_storage =
new StorageAccount("cm_storage", StorageAccount.ResourceVersions.V2023_01_01)
{
Kind = StorageKind.StorageV2,
Sku = new StorageSku { Name = StorageSkuName.StandardLrs },
IsHnsEnabled = true,
AllowBlobPublicAccess = false
};
_storage.Identity = managedServiceIdentity;
_storage.Name = _cmid;

Expand Down Expand Up @@ -110,7 +117,7 @@ public CloudMachineInfrastructure(string cmId)
Name = "cm_servicebus_topic_private",
Parent = _serviceBusNamespace,
MaxMessageSizeInKilobytes = 256,
DefaultMessageTimeToLive = new StringLiteralExpression("P14D"),
DefaultMessageTimeToLive = TimeSpan.FromDays(14),
RequiresDuplicateDetection = false,
EnableBatchedOperations = true,
SupportOrdering = true,
Expand All @@ -121,9 +128,9 @@ public CloudMachineInfrastructure(string cmId)
Name = SB_PRIVATE_SUB,
Parent = _serviceBusTopic_private,
IsClientAffine = false,
LockDuration = new StringLiteralExpression("PT30S"),
LockDuration = TimeSpan.FromSeconds(30),
RequiresSession = false,
DefaultMessageTimeToLive = new StringLiteralExpression("P14D"),
DefaultMessageTimeToLive = TimeSpan.FromDays(14),
DeadLetteringOnFilterEvaluationExceptions = true,
DeadLetteringOnMessageExpiration = true,
MaxDeliveryCount = 10,
Expand All @@ -135,7 +142,7 @@ public CloudMachineInfrastructure(string cmId)
Name = "cm_servicebus_default_topic",
Parent = _serviceBusNamespace,
MaxMessageSizeInKilobytes = 256,
DefaultMessageTimeToLive = new StringLiteralExpression("P14D"),
DefaultMessageTimeToLive = TimeSpan.FromDays(14),
RequiresDuplicateDetection = false,
EnableBatchedOperations = true,
SupportOrdering = true,
Expand All @@ -146,9 +153,9 @@ public CloudMachineInfrastructure(string cmId)
Name = "cm_servicebus_subscription_default",
Parent = _serviceBusTopic_default,
IsClientAffine = false,
LockDuration = new StringLiteralExpression("PT30S"),
LockDuration = TimeSpan.FromSeconds(30),
RequiresSession = false,
DefaultMessageTimeToLive = new StringLiteralExpression("P14D"),
DefaultMessageTimeToLive = TimeSpan.FromDays(14),
DeadLetteringOnFilterEvaluationExceptions = true,
DeadLetteringOnMessageExpiration = true,
MaxDeliveryCount = 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public static partial class ResourceVersions
{
public static readonly string V2023_03_31;
public static readonly string V2023_04_01;
public static readonly string V2023_06_01_preview;
}
}
public partial class CommunicationService : Azure.Provisioning.Primitives.ProvisionableResource
Expand Down Expand Up @@ -50,7 +49,6 @@ public static partial class ResourceVersions
public static readonly string V2020_08_20;
public static readonly string V2023_03_31;
public static readonly string V2023_04_01;
public static readonly string V2023_06_01_preview;
}
}
public partial class CommunicationServiceKeys : Azure.Provisioning.Primitives.ProvisionableConstruct
Expand Down Expand Up @@ -153,7 +151,6 @@ public static partial class ResourceVersions
{
public static readonly string V2023_03_31;
public static readonly string V2023_04_01;
public static readonly string V2023_06_01_preview;
}
}
public enum EmailServicesProvisioningState
Expand Down Expand Up @@ -184,7 +181,6 @@ public static partial class ResourceVersions
{
public static readonly string V2023_03_31;
public static readonly string V2023_04_01;
public static readonly string V2023_06_01_preview;
}
}
public enum UserEngagementTracking
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3fadc42

Please sign in to comment.