Skip to content

Commit 3679cc6

Browse files
author
Filiz Topatan
committed
Use generic file name for blueprint
1 parent 908428e commit 3679cc6

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/Blueprint/Blueprint/Cmdlets/BlueprintDefinition/BlueprintDefinitionCmdletBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ private async Task<string> GetManagementGroupAncestorsAsync(string subscriptionI
100100

101101
protected void ImportBlueprint(string blueprintName, string scope, string inputPath, bool force)
102102
{
103-
var blueprintPath = GetValidatedFilePath(inputPath, blueprintName);
103+
const string blueprintFileName = "Blueprint";
104+
var blueprintPath = GetValidatedFilePath(inputPath, blueprintFileName);
104105

105106
BlueprintModel bpObject;
106107
try
@@ -172,7 +173,7 @@ protected void ImportArtifacts(string blueprintName, string scope, string inputP
172173

173174
var artifactsPath = GetValidatedFolderPath(inputPath, artifacts);
174175

175-
if (artifactsPath == null) return; // if blueprint doesn't contains artifacts don't proceed.
176+
if (artifactsPath == null) return; // if blueprint doesn't contain artifacts don't proceed.
176177

177178
var artifactFiles = AzureSession.Instance.DataStore.GetFiles(artifactsPath, "*.json", SearchOption.TopDirectoryOnly);
178179

src/Blueprint/Blueprint/Cmdlets/BlueprintDefinition/ExportAzureRMBlueprint.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class ExportAzureRmBlueprint : BlueprintDefinitionCmdletBase
4949
#region Cmdlet Overrides
5050
public override void ExecuteCmdlet()
5151
{
52+
const string blueprintFileName = "Blueprint";
53+
5254
// Get serialized blueprint definition
5355
string serializedDefinition = BlueprintClient.GetBlueprintDefinitionJsonFromObject(Blueprint, Version);
5456

@@ -65,7 +67,7 @@ public override void ExecuteCmdlet()
6567
() => CreateFolderIfNotExist(resolvedPath, Blueprint.Name)
6668
);
6769

68-
var blueprintJsonFilePath = Path.Combine(blueprintFolderPath, $"{Blueprint.Name}.json");
70+
var blueprintJsonFilePath = Path.Combine(blueprintFolderPath, $"{blueprintFileName}.json");
6971

7072
AzureSession.Instance.DataStore.WriteFile(blueprintJsonFilePath, serializedDefinition);
7173

src/Blueprint/Blueprint/help/Import-AzBlueprintWithArtifact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Import a blueprint definition with its artifacts.
2424

2525
### Example 1
2626
```powershell
27-
PS C:\> Import-AzBlueprintWithArtifact -Name SimpleBlueprint -SubscriptionId 00000000-1111-0000-1111-000000000000 -InputPath C:\Blueprints\SimpleBlueprint
27+
PS C:\> Import-AzBlueprintWithArtifact -Name MySimpleBlueprint -SubscriptionId 00000000-1111-0000-1111-000000000000 -InputPath C:\Blueprints\SimpleBlueprint
2828
```
2929

3030
Import a blueprint definition with its artifacts and save within a subscription.

0 commit comments

Comments
 (0)