Skip to content

Add Set-AzBootstrapConfig and Get-AzBootstrapConfig public functions#45

Draft
kewalaka with Copilot wants to merge 9 commits into
mainfrom
copilot/fix-44
Draft

Add Set-AzBootstrapConfig and Get-AzBootstrapConfig public functions#45
kewalaka with Copilot wants to merge 9 commits into
mainfrom
copilot/fix-44

Conversation

Copilot AI commented May 24, 2025

Copy link
Copy Markdown

This PR adds two new public functions to help manage the .az-bootstrap.jsonc configuration file:

Set-AzBootstrapConfig

This helper function allows users to easily add or update template aliases in the configuration file:

# Add a new template alias
Set-AzBootstrapConfig -TemplateAlias "terraform" -Value "https://github.com/kewalaka/terraform-azure-starter-template"

# The same command can be used to update an existing alias
Set-AzBootstrapConfig -TemplateAlias "terraform" -Value "https://github.com/my-org/terraform-template"

Get-AzBootstrapConfig

This function displays the existing configuration including template aliases and default location:

Get-AzBootstrapConfig

Example output:

[az-bootstrap] Configuration file path: C:\Users\username\.az-bootstrap.jsonc

[az-bootstrap] Template Aliases:
  terraform -> https://github.com/kewalaka/terraform-azure-starter-template
  bicep -> https://github.com/kewalaka/bicep-azure-starter-template

[az-bootstrap] Default Location: eastus

The function also returns the configuration object for use in pipelines or scripts.

Implementation Details

  • Both functions follow established patterns in the module
  • Full test coverage with Pester tests
  • Properly handles JSON comments in the configuration file
  • Creates the configuration file if it doesn't exist
  • Shows configuration file path for easier manual editing

These new functions provide users with a more convenient way to manage their default template repositories without directly editing the configuration file.

Fixes #44.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 8 commits May 24, 2025 18:18
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Co-authored-by: kewalaka <3146590+kewalaka@users.noreply.github.com>
Copilot AI changed the title [WIP] set-Azbconfig public function Add Set-AzBootstrapConfig and Get-AzBootstrapConfig public functions May 24, 2025
Copilot AI requested a review from kewalaka May 24, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set-Azbconfig public function

2 participants