diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln b/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln index 4a3ca5dfef4e7..82d692c72b964 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/Azure.CloudMachine.sln @@ -7,6 +7,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CloudMac EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CloudMachine.Tests", "tests\Azure.Provisioning.CloudMachine.Tests.csproj", "{46DCEF27-4157-4FB6-A283-B8484EC45665}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.CloudMachine", "..\..\cloudmachine\Azure.CloudMachine\src\Azure.CloudMachine.csproj", "{AE9C0E9B-27D9-4220-98DA-0CB6A7936277}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.CloudMachine.Tests", "..\..\cloudmachine\Azure.CloudMachine\tests\Azure.CloudMachine.Tests.csproj", "{246D5F77-0151-40C5-8644-26A468A57CDC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.Deployment", "..\Azure.Provisioning.Deployment\src\Azure.Provisioning.Deployment.csproj", "{4562F8C1-9FE3-4B68-BBB2-D052B49C915A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +27,18 @@ Global {46DCEF27-4157-4FB6-A283-B8484EC45665}.Debug|Any CPU.Build.0 = Debug|Any CPU {46DCEF27-4157-4FB6-A283-B8484EC45665}.Release|Any CPU.ActiveCfg = Release|Any CPU {46DCEF27-4157-4FB6-A283-B8484EC45665}.Release|Any CPU.Build.0 = Release|Any CPU + {AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Release|Any CPU.Build.0 = Release|Any CPU + {246D5F77-0151-40C5-8644-26A468A57CDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {246D5F77-0151-40C5-8644-26A468A57CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {246D5F77-0151-40C5-8644-26A468A57CDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {246D5F77-0151-40C5-8644-26A468A57CDC}.Release|Any CPU.Build.0 = Release|Any CPU + {4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs index 41daf588304a5..676f2554d7831 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/AzureSdkExtensions/OpenAIFeature.cs @@ -44,7 +44,7 @@ public override void AddTo(CloudMachineInfrastructure cloudMachine) CognitiveServicesAccountDeployment? chat = default; if (Chat != default) { - chat = new("openai_deployment_chat", "2023-05-01") + chat = new("openai_deployment_chat", "2024-06-01-preview") { Parent = cognitiveServices, Name = cloudMachine.Id, @@ -55,15 +55,22 @@ public override void AddTo(CloudMachineInfrastructure cloudMachine) Name = Chat.Model, Format = "OpenAI", Version = Chat.ModelVersion - } + }, + VersionUpgradeOption = DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable, + RaiPolicyName = "Microsoft.DefaultV2", }, + Sku = new CognitiveServicesSku + { + Capacity = 120, + Name = "Standard" + } }; cloudMachine.AddResource(chat); } if (Embeddings != null) { - CognitiveServicesAccountDeployment embeddings = new("openai_deployment_embedding", "2023-05-01") + CognitiveServicesAccountDeployment embeddings = new("openai_deployment_embedding", "2024-06-01-preview") { Parent = cognitiveServices, Name = $"{cloudMachine.Id}-embedding", @@ -76,6 +83,11 @@ public override void AddTo(CloudMachineInfrastructure cloudMachine) Version = Embeddings.ModelVersion } }, + Sku = new CognitiveServicesSku + { + Capacity = 120, + Name = "Standard" + } }; // Ensure that additional deployments, are chained using DependsOn. diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs index ac9f5093a161a..913169a1dbdb5 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/src/CDKLevel3/CloudMachineInfrastructure.cs @@ -168,7 +168,11 @@ public CloudMachineInfrastructure(string cmId) { TopicType = "Microsoft.Storage.StorageAccounts", Source = _storage.Id, - Identity = managedServiceIdentity, + Identity = new() + { + ManagedServiceIdentityType = ManagedServiceIdentityType.UserAssigned, + UserAssignedIdentities = { { BicepFunction.Interpolate($"{Identity.Id}").Compile().ToString(), new UserAssignedIdentityDetails() } } + }, Name = _cmid }; _eventGridSubscription_blobs = new("cm_eventgrid_subscription_blob", "2022-06-15") diff --git a/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs b/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs index 123937308de65..3a8a6f8d20c24 100644 --- a/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs +++ b/sdk/provisioning/Azure.Provisioning.CloudMachine/tests/CloudMachineTests.cs @@ -18,7 +18,7 @@ public class CloudMachineTests { [Theory] [TestCase([new string[] { "-bicep" }])] - [TestCase([new string[] { "" }])] + [TestCase([new string[] { }])] public void Provisioning(string[] args) { CloudMachineInfrastructure.Configure(args, (cm) =>