Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit a3f7fd7

Browse files
authored
Merge pull request #5 from xfz11/cspell
fix Cspell
2 parents 59959ad + 3f88c40 commit a3f7fd7

File tree

9 files changed

+79
-43
lines changed

9 files changed

+79
-43
lines changed

.vscode/cspell.json

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -165,68 +165,101 @@
165165
"Apim",
166166
"appconfig",
167167
"appservice",
168+
"azapi",
168169
"azmcp",
169-
"azuremcp",
170170
"azsdk",
171+
"aztfmod",
172+
"aztfmod",
173+
"azureaisearch",
174+
"azureaiservices",
175+
"azureapplicationinsights",
176+
"azureappservice",
171177
"azureblob",
178+
"azurebotservice",
179+
"azurecacheforredis",
180+
"azurecaf",
172181
"azurecontainerapp",
182+
"azurecosmosdb",
183+
"azurecosmosdb",
184+
"azuredatabaseformysql",
185+
"azuredatabaseforpostgresql",
186+
"azuredocs",
187+
"azurefunctions",
188+
"azurekeyvault",
173189
"azuremcp",
174-
"azuresdk",
175-
"azuretools",
190+
"azureopenai",
191+
"azureprivateendpoint",
176192
"azureresourcegroups",
193+
"azurerm",
194+
"azuresdk",
195+
"azureservicebus",
196+
"azuresignalrservice",
197+
"azuresqldatabase",
198+
"azurestaticwebapps",
199+
"azurestorage",
177200
"azurestorageaccount",
178201
"azureterraformbestpractices",
179-
"codeium",
180-
"cslschema",
202+
"azuretools",
203+
"azurevirtualnetwork",
204+
"azurewebpubsub",
181205
"bdylan",
182206
"bestpractices",
183207
"bicepschema",
184208
"breathability",
185209
"cicd",
186-
"codesign",
210+
"codeium",
187211
"CODEOWNERS",
212+
"codesign",
213+
"cognitiveservices",
214+
"containerapp",
188215
"containerapps",
216+
"copilotmd",
217+
"cslschema",
189218
"cvzf",
190219
"dataplane",
191220
"datasource",
192221
"datasources",
222+
"dbforpostgresql",
193223
"Distributedtask",
194224
"drawcord",
195225
"enumerables",
226+
"esrp",
227+
"ESRPRELPACMANTEST",
196228
"exfiltration",
229+
"facetable",
197230
"filefilters",
231+
"functionapp",
198232
"gethealth",
199233
"healthmodels",
200-
"kcsb",
201-
"keyspace",
202-
"Kusto",
203-
"loadtest",
204-
"loadtesting",
205-
"loadtests",
206-
"esrp",
207-
"ESRPRELPACMANTEST",
208-
"facetable",
209234
"hnsw",
210235
"idtyp",
236+
"jsonencode",
237+
"kcsb",
238+
"keyspace",
211239
"keyvault",
212240
"Kusto",
241+
"Kusto",
242+
"kvps",
213243
"ligar",
214-
"Linq",
215244
"linkedservices",
245+
"Linq",
216246
"LINUXOS",
217247
"LINUXPOOL",
218248
"LINUXVMIMAGE",
219249
"LLM",
250+
"loadtest",
251+
"loadtesting",
220252
"loadtestrun",
253+
"loadtests",
254+
"MACOS",
255+
"MACPOOL",
256+
"MACVMIMAGE",
221257
"midsole",
222258
"monitoredresources",
223259
"msal",
224260
"myaccount",
225-
"mysvc",
226261
"mycluster",
227-
"MACOS",
228-
"MACPOOL",
229-
"MACVMIMAGE",
262+
"mysvc",
230263
"Newtonsoft",
231264
"Npgsql",
232265
"npmjs",
@@ -252,13 +285,16 @@
252285
"searchdocs",
253286
"servicebus",
254287
"setparam",
288+
"siteextensions",
255289
"skillset",
256-
"syslib",
257290
"skillsets",
291+
"staticwebapp",
258292
"submode",
293+
"syslib",
259294
"testresource",
260295
"testrun",
261296
"testsettings",
297+
"tfvars",
262298
"timespan",
263299
"toolsets",
264300
"vectorizable",

src/Areas/Deploy/Commands/PlanGetCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class PlanGetCommand(ILogger<PlanGetCommand> logger)
2626

2727
public override string Description =>
2828
"""
29-
Entry point to help the agent deploy a service to the cloud. Agent should read its output and generate a deploy plan in '.codetocloud/plan.copilotmd' for execution steps, recommended azure services based on the information agent detected from project. Before calling this tool, please scan this workspace to detect the services to deploy and their dependent services.
29+
Entry point to help the agent deploy a service to the cloud. Agent should read its output and generate a deploy plan in '.azure/plan.copilotmd' for execution steps, recommended azure services based on the information agent detected from project. Before calling this tool, please scan this workspace to detect the services to deploy and their dependent services.
3030
""";
3131

3232
public override string Title => CommandTitle;

src/Areas/Deploy/Models/InfraCodeRulesParameters.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ namespace AzureMcp.Areas.Deploy.Models;
55

66
public static class DeploymentTool
77
{
8-
public const string Azd = "azd";
9-
public const string AzCLI = "azcli";
8+
public const string Azd = "AZD";
9+
public const string AzCli = "AzCli";
1010
}
1111

1212
public static class IacType

src/Areas/Deploy/Options/DeployOptionDefinitions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static class PlanGet
131131

132132
public static readonly Option<string> ProvisioningTool = new(
133133
$"--{ProvisioningToolName}",
134-
"The tool to use for provisioning Azure resources. Valid values: azd, azcli. Use azcli if TargetAppService is AKS."
134+
"The tool to use for provisioning Azure resources. Valid values: AZD, AzCli. Use AzCli if TargetAppService is AKS."
135135
)
136136
{
137137
IsRequired = true
@@ -153,7 +153,7 @@ public static class QuotaCheck
153153

154154
public static readonly Option<string> Region = new(
155155
$"--{RegionName}",
156-
"The valid Azure region where the resources will be deployed. E.g. 'eastus', 'westus', 'westeurope', etc."
156+
"The valid Azure region where the resources will be deployed. E.g. 'eastus', 'westus', etc."
157157
)
158158
{
159159
IsRequired = true
@@ -214,7 +214,7 @@ public static class InfraCodeRules
214214
{
215215
public static readonly Option<string> DeploymentTool = new(
216216
"--deployment-tool",
217-
"The deployment tool to use. Valid values: azd, azcli")
217+
"The deployment tool to use. Valid values: AZD, AzCli")
218218
{
219219
IsRequired = true
220220
};
@@ -319,7 +319,7 @@ public static class AppTopologySchema
319319
["name"] = new JsonObject
320320
{
321321
["type"] = "string",
322-
["description"] = "The name of the dependent service. Can be arbitary, or must reference another service in the services array if referencing azureappservice, azurecontainerapp, azurestaticwebapps, or azurefunctions."
322+
["description"] = "The name of the dependent service. Can be arbitrary, or must reference another service in the services array if referencing azureappservice, azurecontainerapp, azurestaticwebapps, or azurefunctions."
323323
},
324324
["serviceType"] = new JsonObject
325325
{

src/Areas/Deploy/Services/Util/DeploymentPlanTemplateUtil.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ 2. Build and Deploy the Application
4040
1. Verify pods are running and services are exposed
4141
""";
4242

43-
var summary = "Summarize the deployment result and save to '.codetocloud/summary.copilotmd'. It should list all changes deployment files and brief description of each file. Then have a diagram showing the provisioned azure resource.";
43+
var summary = "Summarize the deployment result and save to '.azure/summary.copilotmd'. It should list all changes deployment files and brief description of each file. Then have a diagram showing the provisioned azure resource.";
4444
var steps = new List<string>();
4545

4646
if (provisioningTool.ToLowerInvariant() == "azd")
@@ -49,7 +49,7 @@ 1. Verify pods are running and services are exposed
4949
1. Provision Azure Infrastructure
5050
1. Based on following required Azure resources in plan, get the infra code rules from the tool infra-code-rules-get
5151
2. Generate IaC ({azdIacOptions} files) for required azure resources based on the plan.
52-
3. Precheck: use get_errors tool to check generated Bicep grammar errors. Fix the errors if exist.
52+
3. Pre-check: use get_errors tool to check generated Bicep grammar errors. Fix the errors if exist.
5353
4. Run the AZD command `azd provision` to provision the resources and confirm each resource is created or already exists.
5454
5. Check the deployment output to ensure the resources are provisioned successfully.
5555
""");
@@ -71,7 +71,7 @@ 5. Check the deployment output to ensure the resources are provisioned successfu
7171

7272

7373
}
74-
else if (provisioningTool.ToLowerInvariant() == "azcli")
74+
else if (provisioningTool.Equals(DeploymentTool.AzCli, StringComparison.OrdinalIgnoreCase))
7575
{
7676
steps.Add("""
7777
1. Provision Azure Infrastructure:
@@ -106,7 +106,7 @@ 1. Verify command output to ensure the application is deployed successfully
106106
: $"Azure Deployment Plan for {projectName} Project";
107107

108108
return $$"""
109-
{Agent should fill in and polish the markdown template below to generate a deployment plan for the project. Then save it to '.codetocloud/plan.copilotmd' file.}
109+
{Agent should fill in and polish the markdown template below to generate a deployment plan for the project. Then save it to '.azure/plan.copilotmd' file.}
110110
111111
#Title: {{title}}
112112
## **Goal**

src/Areas/Deploy/Services/Util/InfraCodeRuleRetriever.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public static class InfraCodeRuleRetriever
66
{
77
public static void PopulateAZDPrompts(string iacType, string[] resourceTypes, List<string> llmResponse)
88
{
9-
llmResponse.Add("- Ensure an User-Assigned Managed Identity (UAMI) exists.");
9+
llmResponse.Add("- Ensure an User-Assigned Managed Identity exists.");
1010
llmResponse.Add("- Resource Group resource (if exists) must have tag \"azd-env-name\" = environmentName. Apply this tag to resource group resource ONLY.");
1111
llmResponse.Add($"- Expected parameters in {iacType} parameters: environmentName='${{AZURE_ENV_NAME}}', location='${{AZURE_LOCATION}}'. resourceGroupName='rg-${{AZURE_ENV_NAME}}' is required if scope is subscription.");
1212
llmResponse.Add("- All container apps, app services, function apps, static web apps (and nothing else) must have tag \"azd-service-name\" matching the service name in azure.yaml.");
@@ -19,7 +19,7 @@ public static void PopulateAZDPrompts(string iacType, string[] resourceTypes, Li
1919
}
2020
}
2121

22-
public static void PopulateAZCLIPrompts(List<string> llmResponse)
22+
public static void PopulateAzCliPrompts(List<string> llmResponse)
2323
{
2424
// TODO: Enrich Me
2525
llmResponse.Add("- No additional rules.");
@@ -43,7 +43,7 @@ public static string AddPromptForRoleAssignment(string roleId, string roleName,
4343
var roleAssignmentResourceName = iacType == IacType.Bicep ? "Microsoft.Authorization/roleAssignments" : "azurerm_role_assignment";
4444

4545
var returnString = $"- MANDATORY: Add a {roleAssignmentResourceName} resource to assign the {roleName} ({roleId}) role to the user-assigned managed identity";
46-
46+
4747
if (!string.IsNullOrEmpty(additionalInstructions))
4848
{
4949
returnString += $" ({additionalInstructions})";
@@ -89,7 +89,7 @@ public static void PopulateFunctionAppPrompts(string iacType, List<string> llmRe
8989
{
9090
llmResponse.Add("=== Additional requirements for Function Apps:");
9191
llmResponse.Add("- Attach User-Assigned Managed Identity.");
92-
92+
9393
var requiredRoles = new[]
9494
{
9595
new { RoleId = "b7e6dc6d-f1e8-4753-8033-0f276bb0955b", Name = "Storage Blob Data Owner" },
@@ -125,13 +125,13 @@ public static List<string> GetInfraCodeRules(string deploymentTool, string iacTy
125125
$"Deployment Tool {deploymentTool} rules:"
126126
};
127127

128-
if (deploymentTool == DeploymentTool.Azd)
128+
if (deploymentTool.Equals(DeploymentTool.Azd, StringComparison.OrdinalIgnoreCase))
129129
{
130130
PopulateAZDPrompts(iacType, resourceTypes, llmResponse);
131131
}
132-
else if (deploymentTool == DeploymentTool.AzCLI)
132+
else if (deploymentTool.Equals(DeploymentTool.AzCli, StringComparison.OrdinalIgnoreCase))
133133
{
134-
PopulateAZCLIPrompts(llmResponse);
134+
PopulateAzCliPrompts(llmResponse);
135135
}
136136

137137
llmResponse.Add($"IaC Type: {iacType} rules:");

src/Areas/Deploy/Services/Util/PipelineGenerationUtil.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public static string GeneratePipelineGuidelines(PipelineGenerateOptions options)
1515
}
1616
else
1717
{
18-
return AZCLIPipelinePrompt(options);
18+
return AzCliPipelinePrompt(options);
1919
}
2020
}
2121

2222
private static readonly string AZDPipelinePrompt = "Run \"azd pipeline config\" to help the user create a deployment pipeline.\n";
2323

24-
private static string AZCLIPipelinePrompt(PipelineGenerateOptions options)
24+
private static string AzCliPipelinePrompt(PipelineGenerateOptions options)
2525
{
2626
const string defaultEnvironment = "dev";
2727
var environmentNamePrompt = !string.IsNullOrEmpty(options.GithubEnvironmentName)

src/Areas/Deploy/Services/Util/QuotaChecker/AzureQuotaChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public static async Task<Dictionary<string, List<QuotaInfo>>> GetAzureQuotaAsync
173173

174174
// Flatten the results into a single dictionary
175175
return results
176-
.SelectMany(kvps => kvps)
176+
.SelectMany(i => i)
177177
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
178178
}
179179
}

tests/Areas/Deploy/LiveTests/DeployCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public async Task Should_get_azd_app_logs()
153153
{
154154
{ "subscription", _subscriptionId },
155155
{ "workspace-folder", "C:/Users/" },
156-
{ "azd-env-name", "dotnetdeo" },
156+
{ "azd-env-name", "dotnet-demo" },
157157
{ "limit", 10 }
158158
});
159159

0 commit comments

Comments
 (0)