Skip to content

feat: improve interactive configuration UX and prevent empty subscription values for Azure/avm-ptn-alz - #536

Open
Richard Cheney (richeney) wants to merge 2 commits into
Azure:mainfrom
richeney:improve-interactive-configuration
Open

feat: improve interactive configuration UX and prevent empty subscription values for Azure/avm-ptn-alz#536
Richard Cheney (richeney) wants to merge 2 commits into
Azure:mainfrom
richeney:improve-interactive-configuration

Conversation

@richeney

Copy link
Copy Markdown
Contributor

This change improves the interactive configuration experience for accelerator setup and avoids downstream bootstrap issues caused by empty subscription values.

What changed

  • Improved default-selection behavior in the shared menu helper so it respects an existing value before falling back to index ordering.
  • Clarified manual-entry handling and default option behavior for interactive prompts.
  • Added more intuitive subscription selection defaults for workload-style keys such as management, connectivity, identity, and security.
  • Kept optional values truly optional so users can intentionally leave them blank without being forced into a selection.
  • Prevented empty subscription IDs from being passed through to downstream bootstrap and AVM configuration calls, avoiding Terraform/bootstrap failures.

Why

The interactive configuration flow was occasionally forcing unnecessary choices or carrying empty subscription values into later steps. This update makes the prompts more user-friendly while protecting configuration generation from invalid or blank subscription data.

Improve the interactive configuration flow for a smoother user experience.

- clarify the default-selection and manual-entry logic in the menu helper
- make default subscription matching more intuitive for workload-style keys
- preserve optional inputs without forcing a selection when the value is intentionally blank
- avoid empty subscription IDs being passed through to downstream bootstrap and AVM configuration steps, preventing Terraform/bootstrap issues
@richeney Richard Cheney (richeney) changed the title Improve interactive configuration UX and prevent empty subscription values feat: improve interactive configuration UX and prevent empty subscription values for Azure/avm-ptn-alz Aug 12, 2026
@richeney

Copy link
Copy Markdown
Contributor Author

The key fix is for the subscription_ids section of the inputs.yaml. Example:

## Decision 7: Platform Subscriptions
subscription_ids:
  management: "50ace030-4f1f-4792-8efb-f0ccf40f4035"
  identity: ""
  connectivity: "72dab7e3-809b-4b71-b738-847d0e3cf601"
  security: ""

This causes downstream issues. The avm-ptn-alz Terraform module will error on duplicate or non-GUID values in the subscription_placement object.

This PR updates the interactive experience in this module to ensure that any null or empty subscriptions are not created in the input.yaml. E.g.:

## Decision 7: Platform Subscriptions
subscription_ids:
  management: "50ace030-4f1f-4792-8efb-f0ccf40f4035"
  connectivity: "72dab7e3-809b-4b71-b738-847d0e3cf601"

Fixes Azure/Azure-Landing-Zones#4239.

@richeney

Copy link
Copy Markdown
Contributor Author

Additional user experience enhancements:

  • subscription_ids are shown in required order, i.e. management, connectivity, identity, security. Required subscription are always shown first, optional subscriptions last.
  • The required_subscription_ids default of ["management","connectivity"] is set to ["management"] for the Management Only scenario.
  • The defaults are now shown consistently. Previously some defaults were in green, some in cyan, some without highlighting. Now they are always shown in green.
  • More intelligent defaults.
    • The bootstrap_subscription_id now defaults to the subscription from Get-AzContext, rather than just first in the list.
    • The bootstrap region now defaults to AZURE_DEFAULTS_REGION if that environment variable is set.
    • Subscription name matching for the platform subscriptions. Full exact match (e.g. "Management", or word match (e.g. "Platform - Management") if it is the only match. User can always select a different one. Also the platform subscription in the prompt is shown in yellow to make it stand out.
  • Fixed some of the prompts, e.g. the GitHub org prompt mentioned a non-existent default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant