Ensure infrastructure/code templates explicitly and correctly handle the two most common security failure points: (1) required authorization for identities to perform discovery/monitoring, and (2) strict validation of user-supplied parameters.
Apply this as a checklist:
Example (Bicep/ARM-style validation + scoped RBAC intent):
param healthModelName string(minLength: 3, maxLength: 50) // validate required inputs
// RBAC (conceptual): assign the managed identity the needed monitoring/discovery permissions
// at the smallest practical scope (resource group / subscription) instead of per-resource.
// (Implement using the template’s RBAC assignment constructs and the correct role definition.)
This prevents silent security/authorization failures (no effective access) and reduces misconfiguration risk by rejecting invalid inputs early.