Skip to content

v1.51.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 20:27

Release Notes: Readable Azure ABAC Role Assignment Conditions

Azure role assignments can carry an ABAC condition that limits which roles a delegate may assign or remove. In a Terraform plan this condition is a long boolean expression full of role definition GUIDs, and a mistake in it (for example a write clause without a matching delete clause) is easy to miss. This release shows the condition in its own section with resolved names, a delegation summary, warnings, and a readable diff of what an update changes.

✨ Features

  • Dedicated condition section (#696):
    • The condition of azurerm_role_assignment and properties.condition of azapi_resource bodies of type Microsoft.Authorization/roleAssignments, roleEligibilityScheduleRequests and roleAssignmentScheduleRequests are shown in a Condition (ABAC vX.Y) section instead of a raw string in the attribute table.
    • Role definition GUIDs and principal GUIDs in the condition are resolved to names by default, without --resolve-all-guids. Unresolvable GUIDs stay unchanged and are listed as not resolved.
    • Recognised role assignment delegation conditions are summarised as a table of action, allowed roles, allowed principal types and allowed principals. Conditions that do not fully match the known pattern are never guessed at: they show the raw text only.
    • The exact condition text stays available in a collapsed Raw condition view with a Referenced IDs table that maps every GUID to its resolution.
    • On update and replace the section lists what changed per action (added or removed roles and principal types) and offers a raw diff.
  • Delegation warnings: the section warns when a write or delete action is unrestricted, when write and delete constraints differ, when a privileged role (Owner, User Access Administrator, Role Based Access Control Administrator) is allowed, and when an update removes the condition. Resources with warnings are expanded by default with --details auto. Warnings are not code analysis findings: they are not counted in the Code Analysis Summary, not filtered by --code-analysis-minimum-level and do not affect the exit code.
  • A sensitive condition stays masked, and a condition that is known only after apply shows just the heading line, so nothing leaks through the diff.

🐛 Fixes

  • Multi-line azurerm_role_assignment conditions are no longer dropped from the report, because the condition now has its own section (the azurerm_role_assignment case of #695; the broader renderer audit remains with that issue).
  • The condition version is escaped in the section heading.

🛠️ Maintenance

  • Husky git hooks now roll forward to newer installed .NET runtimes.
  • Claude Code settings now allow workflow scripts in auto mode and ask only for merges.

📚 Docs

  • Updated docs/features.md and added the specification, design and UAT plan under docs/features/159-abac-condition-display/.

▶️ Getting started

No new CLI options are required. The condition section appears automatically for supported role assignments:

terraform show -json plan.tfplan | docker run -i oocx/tfplan2md:latest > plan.md

Pass --show-unchanged-values to also show the section for updates whose condition did not change.

📸 Screenshots

Condition section with delegation warnings and the start of the summary table (azurerm_role_assignment):

ABAC condition section with warnings

🔗 Commits

  • feat: parse and recognise ABAC delegation conditions
  • feat: resolve condition GUIDs and raise delegation warnings
  • feat: build and render the ABAC condition section
  • feat: show the ABAC condition section for azurerm_role_assignment
  • feat: show the ABAC condition section for azapi role assignments
  • fix: escape the ABAC condition version in the section heading