Use this when making one job reusable with parameters.
Parameters · Automation Design
Parameters are named inputs that make one automation reusable for many cases, such as hostname, size or environment. Give them types, validation and defaults instead of editing the script each time.
1. Parameters are the public interface of automation.
2. Typed, validated, documented.
3. Required vs optional.
4. Sensible defaults.
5. Backward compatibility.
caller → parameters → validated → execution
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as implicit defaults, hidden dependencies, duplicate dispatch, worker drift, timeout without cancellation, retries against non-idempotent operations and confusing control-plane completion with target convergence, choosing the cases most relevant to schema/typing, defaults, required/optional inputs, validation, secret parameters and immutable request capture for audit/replay.
Step 2 Common mistakes Narrow the fault
- Free-text parameters used directly in commands (injection).
- No validation of allowed values.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Parameters make one job reusable for many cases.
- Typed and validated parameters reject bad input early.
- Defaults should be safe.
- Parameter definitions with types and defaults — interface
<script> --help— documented parameters- Validation of parameters — safety
ReferenceWhy it matters1 section · depth on demand
What it is
Parameters are the inputs a user or caller passes to a run (CLI arguments, workflow inputs, job options). Validate them strictly and keep the set small; everything else should come from configuration.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Parameters are the inputs a caller passes to an automation when running it: which targets, which version, which action. Clear parameters make a tool reusable and safe; vague ones lead to wrong runs.
Design guidance:
- Required parameters for anything with real impact (environment, targets).
- Validate type, format and allowed values before any work starts.
- Use enumerations instead of free text where the set of values is known.
- Echo the effective parameters at the start of the run so logs show exactly what was requested.
param(
[Parameter(Mandatory)][ValidateSet('test','prod')][string]$Environment,
[Parameter(Mandatory)][ValidatePattern('^SW-\d{3}$')][string[]]$Device,
[switch]$Apply
)
Write-Host "Env=$Environment Devices=$($Device -join ',') Apply=$Apply"
Example
./deploy.sh --env staging --version 1.4.2 --dry-run
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation Design > Parameters. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/enable-automation · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For schema/typing, defaults, required/optional inputs, validation, secret parameters and immutable request capture for audit/replay, prefer typed fields and stable IDs over human presentation text.