Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "FabricTools PowerShell Dev",
"features": {
"ghcr.io/devcontainers/features/powershell:1": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},

"customizations": {
"vscode": {
"extensions": [
"davidanson.vscode-markdownlint",
"ms-vscode.powershell",
"streetsidesoftware.code-spell-checker",
"redhat.vscode-yaml"
]
}
},

"settings": {
"terminal.integrated.defaultProfile.linux": "pwsh"
},

"postCreateCommand": "pwsh .devcontainer/post-create.ps1"
}
36 changes: 36 additions & 0 deletions .devcontainer/post-create.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# post-create.ps1

Write-Host "Running DevContainer post-create setup..."

# Ensure scripts can run
Set-ExecutionPolicy RemoteSigned -Scope Process -Force

# Install/update PSResourceGet side-by-side
Write-Host "Installing PSResourceGet..."
Install-Module Microsoft.PowerShell.PSResourceGet -Force -AllowClobber

# Install common modules used in this environment
$requiredModules = @(
"Pester",
"Az.Accounts"
)

Write-Host "Installing required modules..."
foreach ($module in $requiredModules) {
Install-Module $module -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
}

# Validate installation
foreach ($module in $requiredModules) {
if (-not (Get-Module -ListAvailable -Name $module)) {
Write-Warning "Module [$module] did NOT install successfully!"
}
}

# Display installed versions for debugging
Write-Host "Installed module versions:"

Get-Module -ListAvailable |
Where-Object { $_.Name -in $requiredModules + "Microsoft.PowerShell.PSResourceGet" } |
Sort-Object Name, Version |
Format-Table Name, Version, ModuleBase
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added GitHub Codespaces and DevContainerSupport (Non Functional Change)
- Added function `Update-FabricCapacity`
- Added Error Detailed Info in `Test-FabricApiResponse` (Debug mode) when `response.error` exists

Expand Down
Loading