Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.18k stars 3.79k forks source link

Import-AzBlueprintWithArtifact not finding artifact's folder and not importing artifacts #19181

Open PhelixPhoenix opened 2 years ago

PhelixPhoenix commented 2 years ago

Description

When running the command Import-AzBlueprintWithArtifact and pointing it to the folder containing blueprint.json the blueprint is imported, confirmed by the creation of the RG defined in the blueprint, but none of the artifacts are created, confirmed by looking at the blueprint definition in the portal.

Folder structure /

Issue script & Debug output

> Import-AzBlueprintWithArtifact -Name <somecompany>-Dev-SoftwareEngineering -ManagementGroupId "<somemgmtgroup>" -InputPath .\<sometext>-Dev-SoftwareEngineering -Force
>

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.9.1                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     0.4.0                 Az.Blueprint                        {Export-AzBlueprintWithArtifact, Get-AzBlueprint, Get-AzBlueprintArtifact, Get-AzBlueprintAssignment…}
Script     6.1.0                 Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}

Error output

no errors from command run.
PhelixPhoenix commented 2 years ago

I worked with a MSFT Support engineer with Azure and got this working, however working from the documentation https://docs.microsoft.com/en-us/azure/governance/blueprints/ there is inadequate information to actually deploy a Blueprint with Artifacts. I was directed here https://docs.microsoft.com/en-us/azure/templates/microsoft.blueprint/blueprints/artifacts?pivots=deployment-language-arm-template#blueprintsartifacts-objects-1, where the only reference to what you needed to add to your ARM templates was the TemplateArtiface and TemplateArtifactProperties sections. A link between the two documents at minimum would be nice. However, there was still no error message from the PowerShell command indicating anything was wrong with the import or returned any useful information that might lead one to investigate the Blueprint Artifacts attempting to be imported.

ghost commented 2 years ago

Thank you for your feedback. This has been routed to the support team for assistance.

microsoft-github-policy-service[bot] commented 10 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @alex-frankel, @filizt.