Awesome Reviewers

When a parameter/property is optional in an ARM template, don’t represent “missing” with empty objects or empty strings—these can be treated as real values and fail validation or downstream logic.

Apply these rules:

Example (pattern):

{
  "parameters": {
    "adminPublicKey": { "type": "string" }
  },
  "variables": {
    "adminPublicKeyValue": "[if(empty(parameters('adminPublicKey')), json('null'), parameters('adminPublicKey'))]"
  }
  // Then assign the SSH key only when not null/empty (or handle it in template logic).
}

If you use empty-string defaults for testing, ensure CI/pipeline parameter files still provide valid required values (don’t rely on "" to represent “not provided”).