Skip to content

Az.Compute: add UseLocalFileRules support to Set-AzVMProxyAgentSetting - #29919

Draft
haagha with Copilot wants to merge 2 commits into
mainfrom
copilot/az-compute-proxyagentsettings-uselocalfilerules
Draft

Az.Compute: add UseLocalFileRules support to Set-AzVMProxyAgentSetting#29919
haagha with Copilot wants to merge 2 commits into
mainfrom
copilot/az-compute-proxyagentsettings-uselocalfilerules

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Set-AzVMProxyAgentSetting did not expose host-endpoint useLocalFileRules, so VM proxy agent configuration could not opt into local file rules for WireServer/IMDS. This PR adds first-class parameter support and maps it through to the compute model payload.

  • Cmdlet surface: new parameters

    • Added -WireServerUseLocalFileRules <bool?>
    • Added -ImdsUseLocalFileRules <bool?>
    • Updated endpoint object construction so these flags are honored even when mode/profile are not provided.
  • Model mapping: HostEndpointSettings

    • Added SDK customization partial for HostEndpointSettings with:
      • UseLocalFileRules serialized as useLocalFileRules.
  • Docs: command help

    • Updated Set-AzVMProxyAgentSetting syntax and parameter docs.
    • Added the new flags to examples.
  • Scenario coverage

    • Added Test-VirtualMachineProxyAgentUseLocalFileRules to validate:
      • each flag independently,
      • both flags together,
      • coexistence with endpoint mode settings.
    • Wired scenario into VirtualMachineTests.cs check-in test list.
$vm = New-AzVMConfig -VMName $vmName -VMSize "Standard_D2s_v3"
$vm = Set-AzVMProxyAgentSetting -VM $vm `
  -EnableProxyAgent $true `
  -WireServerMode Audit -WireServerUseLocalFileRules $true `
  -ImdsMode Enforce -ImdsUseLocalFileRules $false

Verification Checklist

  • Cmdlet implementation updated with the new/changed parameter(s)
  • Model class updated to represent the API schema.
  • Help content regenerated: new parameter appears in the SYNTAX section and in alphabetical order in the PARAMETERS section.
  • Examples updated to cover the new parameter(s).
  • If adding a new command, add it to the help/Az.Compute.md file
  • If adding a new command, register it in Az.Compute.psd1 (CmdletsToExport, alphabetical order).
  • New scenario tests cover the full matrix: each new parameter exercised alone and in combination (may share a single test), every affected cmdlet, Update merge semantics, removal/disable paths, and negative/edge cases (mutually exclusive params; $null/empty inputs validated per [ValidateNotNullOrEmpty] or other validation attributes).
  • Test assertions check concrete sub-properties (type/enum, collection counts and membership, computed fields) and re-read the resource with a follow-up Get-* call to confirm the values persisted.
  • Every new .ps1 scenario function is wired into the .cs file as a [Fact] check-in test.
  • ChangeLog.md updated with a concise, user-focused entry under ## Upcoming Release.

Copilot AI requested review from Copilot and removed request for Copilot July 28, 2026 19:58
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI requested review from Copilot and removed request for Copilot July 28, 2026 20:05
Copilot AI changed the title [WIP] Add cmdlet syntax for ProxyAgentSettings UseLocalFileRules Az.Compute: add UseLocalFileRules support to Set-AzVMProxyAgentSetting Jul 28, 2026
Copilot AI requested a review from haagha July 28, 2026 20:06
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.

2 participants