< Back
Import-AzureBlueprintArtifact
Post
NAME Import-AzureBlueprintArtifact
SYNOPSIS
Imports an ARM Template to a Blueprint.
SYNTAX
Import-AzureBlueprintArtifact [-NewBlueprintName <String>] [-TargetDirectory <DirectoryInfo>] [-ARMTemplateJson
<FileInfo>] -ArtifactName <String> -ResourceGroup <String> [<CommonParameters>]
Import-AzureBlueprintArtifact [-NewBlueprintName <String>] [-TargetDirectory <DirectoryInfo>] -ResourceGroup
<String> [-ARMTemplateDirectory <DirectoryInfo>] [<CommonParameters>]
DESCRIPTION
Imports an ARM Template to a Blueprint. If the Blueprint does not exist, it gets created. Parameters are
transformed and added to the Blueprint in the same style as in the GUI in the portal. An artifact is created with
the appropriate parameters in both the template and the parameter section.
Parameter types are carried over and securestring variables are automatically created with a Azure Vault reference
in the bl????ueprint.
PARAMETERS
-NewBlueprintName <String>
Name of the blueprint.json file - blueprint is default
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-TargetDirectory <DirectoryInfo>
The target directory for the blueprint and artifact files
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ARMTemplateJson <FileInfo>
The path to the ARM template to transform
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ArtifactName <String>
Name of the Artifact and the name of the artifactfile
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroup <String>
Name of the Resource Group in the Blueprint
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ARMTemplateDirectory <DirectoryInfo>
Imports all ARM templates of the directory to one single Resource Group
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Import-AzureBlueprintArtifact -ARMTemplateJson C:\\dev\\ARMTemplates\\azuredeploy.json -TargetDirectory
C:\\Dev\\NewBlueprint\\ -ResourceGroup Network -ArtifactName HUBNet
Creates 2 files in the C:\\Dev\\NewBlueprint\\ folder: blueprint.json HUBNet.json
The blueprint.json file will hold the Network resource group and all the parameters needed to deploy the
HUBNet.json template. The HUBNet.json template will contain the original ARM template, but only with the
stub-parameters and a parameter section referencing the Blueprint parameters.
-------------------------- Example 2 --------------------------
PS C:\\> Import-AzureBlueprintArtifact -ARMTemplateDirectory C:\\Dev\\ARMTemplates -ResourceGroup MyRG
-TargetDirectory C:\\dev\\MultipleTemplates\\
Imports all ARM templates from C:\\Dev\\ARMTemplates and creates a blueprint in C:\\dev\\MultipleTemplates\\ with all
the artifacts in Resource Group MyRG
RELATED LINKS
SYNOPSIS
Imports an ARM Template to a Blueprint.
SYNTAX
Import-AzureBlueprintArtifact [-NewBlueprintName <String>] [-TargetDirectory <DirectoryInfo>] [-ARMTemplateJson
<FileInfo>] -ArtifactName <String> -ResourceGroup <String> [<CommonParameters>]
Import-AzureBlueprintArtifact [-NewBlueprintName <String>] [-TargetDirectory <DirectoryInfo>] -ResourceGroup
<String> [-ARMTemplateDirectory <DirectoryInfo>] [<CommonParameters>]
DESCRIPTION
Imports an ARM Template to a Blueprint. If the Blueprint does not exist, it gets created. Parameters are
transformed and added to the Blueprint in the same style as in the GUI in the portal. An artifact is created with
the appropriate parameters in both the template and the parameter section.
Parameter types are carried over and securestring variables are automatically created with a Azure Vault reference
in the bl????ueprint.
PARAMETERS
-NewBlueprintName <String>
Name of the blueprint.json file - blueprint is default
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-TargetDirectory <DirectoryInfo>
The target directory for the blueprint and artifact files
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ARMTemplateJson <FileInfo>
The path to the ARM template to transform
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ArtifactName <String>
Name of the Artifact and the name of the artifactfile
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroup <String>
Name of the Resource Group in the Blueprint
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ARMTemplateDirectory <DirectoryInfo>
Imports all ARM templates of the directory to one single Resource Group
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Import-AzureBlueprintArtifact -ARMTemplateJson C:\\dev\\ARMTemplates\\azuredeploy.json -TargetDirectory
C:\\Dev\\NewBlueprint\\ -ResourceGroup Network -ArtifactName HUBNet
Creates 2 files in the C:\\Dev\\NewBlueprint\\ folder: blueprint.json HUBNet.json
The blueprint.json file will hold the Network resource group and all the parameters needed to deploy the
HUBNet.json template. The HUBNet.json template will contain the original ARM template, but only with the
stub-parameters and a parameter section referencing the Blueprint parameters.
-------------------------- Example 2 --------------------------
PS C:\\> Import-AzureBlueprintArtifact -ARMTemplateDirectory C:\\Dev\\ARMTemplates -ResourceGroup MyRG
-TargetDirectory C:\\dev\\MultipleTemplates\\
Imports all ARM templates from C:\\Dev\\ARMTemplates and creates a blueprint in C:\\dev\\MultipleTemplates\\ with all
the artifacts in Resource Group MyRG
RELATED LINKS