PlantUML – Extensions

PlantUML supports different extension. This article focuses on the C4 and Azure extension.

PlantUML C4 Extension

The C4 extension provides a simple way to create C4 diagrams using PlantUML.

Usage

Getting Started

To use the C4 extension, you need to include the C4 puml files at the top.

Elements

System Context & System Landscape diagrams

  • Person to represent and actor
  • System to show a system as a black-box
  • System_Ext represent an external system
  • Boundary for a generic boundary
  • System_Boundary to show a system as a white-box with its components
  • Enterprise_Boundary

Container diagram

  • Component for a generic component not specified in detail
  • Container_Boundary

Layout Options

  • LAYOUT_TOP_DOWN() or LAYOUT_LEFT_RIGHT()
  • LAYOUT_WITH_LEGEND()
  • LAYOUT_AS_SKETCH()
  • HIDE_STEREOTYPE()

Mapping

Syntax C4 Notes
a -> b : label Rel_Neibhor(a, b, alias, "label") A close relationship with a label
a --> b : label Rel(a, b, alias, "label") Relationship with an arrow
-down-> Rel_D / Rel_Down Relationships with a placement
not available No direction
--->, ---->, -----> Components further away
->> Rel

 

Further Resources

Libraries

PlantUML Azure Extension

Usage

Symbols

A list of all supported Azure services can be found in the Azure-PlantUML Azure Symbols Documentation.

Azure Simplified Mode

The Azure extension supports a simplified mode that can be used to hide some details.

To simplify include AzureSimplified.puml can be used.

!include AzurePuml/AzureCommon.puml
!include AzurePuml/AzureSimplified.puml
!include AzurePuml/AzureC4Integration.puml

Examples

Further Resources