Skip to content

Instantly share code, notes, and snippets.

@ugwis
Created June 24, 2025 01:10
Show Gist options
  • Save ugwis/967c59a1e0eb4733d6e28ef9b1f287e1 to your computer and use it in GitHub Desktop.
Save ugwis/967c59a1e0eb4733d6e28ef9b1f287e1 to your computer and use it in GitHub Desktop.
Diagram:
DefinitionFiles:
- Type: URL
Url: "https://raw.githubusercontent.com/awslabs/diagram-as-code/main/definitions/definition-for-aws-icons-light.yaml"
#- Type: LocalFile
# LocalFile: ./definitions/definition-for-aws-icons-light.yaml
Resources:
Canvas:
Type: AWS::Diagram::Canvas
Direction: vertical
Children:
{{- range $i := seq 16}}
- Instances{{$i}}
{{- end}}
{{- range $i := seq 16}}
Instances{{$i}}:
Type: AWS::Diagram::HorizontalStack
Children:
{{- range $j := seq 16}}
- Instance{{$i}}to{{$j}}
{{- end}}
{{- end}}
{{- range $i := seq 16}}
{{- range $j := seq 16}}
Instance{{$i}}to{{$j}}:
Type: AWS::EC2::Instance
{{- end}}
{{- end}}
Links:
{{- range $i := seq 16}}
{{- range $j := seq 16}}
- Source: Instance{{$i}}to{{$j}}
SourcePosition: {{index (mkarr "N" "NNE" "NE" "ENE" "E" "ESE" "SE" "SSE" "S" "SSW" "SW" "WSW" "W" "WNW" "NW" "NNW") $i}}
Target: Instance{{$i}}to{{$j}}
TargetPosition: {{index (mkarr "N" "NNE" "NE" "ENE" "E" "ESE" "SE" "SSE" "S" "SSW" "SW" "WSW" "W" "WNW" "NW" "NNW") $j}}
TargetArrowHead:
Type: Open
Type: orthogonal
{{- end}}
{{- end}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment