Azure / Azure/azure-powershell
Import-AzBlueprintWithArtifact not finding artifact's folder and not importing artifacts
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### 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
/
- deploy.ps1
- /-Dev-SoftwareEngineering
- blueprint.json
- /artifact #note. got error: import-azblueprintwithartifact: 'artifact' cannot be null, when this folder was named 'artifacts'
- vnet.json
- policy-assignment.json
- etc
### Issue script & Debug output
```PowerShell
> Import-AzBlueprintWithArtifact -Name -Dev-SoftwareEngineering -ManagementGroupId "" -InputPath .\-Dev-SoftwareEngineering -Force
>
```
### Environment data
```PowerShell
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
```PowerShell
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
```PowerShell
no errors from command run.
```
Contributor guide
Research direction
Start by reproducing Import-AzBlueprintWithArtifact with the shown folder structure and Az.Blueprint 0.4.0 on PowerShell 7.2.5. Investigate how the command resolves the InputPath, blueprint.json, and the artifact versus artifacts folder. Done means the blueprint definition includes the artifacts and the command no longer reports that the artifact value is null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100