Skip to content

Add architecture diagrams - #17

Merged
mengesb merged 4 commits into
mainfrom
docs/architecture-diagrams
Jul 2, 2026
Merged

Add architecture diagrams#17
mengesb merged 4 commits into
mainfrom
docs/architecture-diagrams

Conversation

@mengesb

@mengesb mengesb commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add high-level system architecture diagram showing the 11-step flow: TFE Runner → EC2 IMDS → Vault IAM Auth → AWS STS verification → Vault Secrets Engine → JIT AWS credentials
  • Add component-detail diagram showing internal script interactions (aws-credentials.sh, aws4-sign.sh, parse-url.sh) and how they map to Terraform providers and Vault API endpoints
  • Include cross-workspace pattern (remote_state + run triggers) for credential delegation
  • Provide both Mermaid source files and native draw.io XML for editing, plus pre-rendered PNGs

Files

File Purpose
docs/diagrams/architecture-high-level.mmd Mermaid source (system level)
docs/diagrams/architecture-high-level.drawio Editable draw.io XML
docs/diagrams/architecture-high-level.png Mermaid render
docs/diagrams/architecture-high-level-drawio.png draw.io render
docs/diagrams/architecture-component.mmd Mermaid source (component level)
docs/diagrams/architecture-component.drawio Editable draw.io XML
docs/diagrams/architecture-component.png Mermaid render
docs/diagrams/architecture-component-drawio.png draw.io render

Test plan

  • Open .drawio files in draw.io to confirm editability
  • Verify PNGs render correctly in GitHub PR view
  • Confirm diagram accurately represents the vault-iam-auth flow

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds high-level and component-detail architecture diagrams (Mermaid + draw.io) documenting the vault-iam-auth flow in Terraform Enterprise, including AWS IMDS credential retrieval, Vault AWS auth verification via STS, and Vault AWS secrets engine issuance of temporary credentials.

Changes:

  • Added a high-level Mermaid flowchart describing the end-to-end 11-step authentication/credential flow.
  • Added a high-level draw.io diagram equivalent for editable diagram maintenance.
  • Added component-level Mermaid + draw.io diagrams mapping internal scripts/libraries and Vault/AWS API interactions.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated 9 comments.

File Description
docs/diagrams/architecture-high-level.mmd Mermaid source for the high-level 11-step system flow.
docs/diagrams/architecture-high-level.drawio Editable draw.io version of the high-level diagram (needs flow correction for step 6).
docs/diagrams/architecture-component.mmd Mermaid source for component/script-level interactions (needs login payload field alignment).
docs/diagrams/architecture-component.drawio Editable draw.io version of the component diagram (needs edge/label corrections and payload field alignment).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/diagrams/architecture-component.mmd Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
Comment thread docs/diagrams/architecture-high-level.drawio Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
Comment thread docs/diagrams/architecture-component.mmd Outdated
Comment thread docs/diagrams/architecture-component.mmd Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
mengesb added 2 commits July 2, 2026 08:44
Add high-level and component-detail diagrams documenting the AWS IAM
authentication flow through Terraform Enterprise, Vault, and AWS STS.
Includes Mermaid sources, rendered PNGs, and editable draw.io XML files.
- Use correct repo path aws/vault-iam-auth.sh in all diagrams
- Add iam_http_request_method to Vault auth login payload fields
- Fix IMDS response edge to target aws-credentials.sh (not aws4-sign.sh)
- Remove incorrect "executes" label on tf_ext -> tf_vault edge
- Fix step 6 in high-level draw.io to return token to external data
  source before it passes to Vault provider in step 7
@mengesb
mengesb force-pushed the docs/architecture-diagrams branch from 4f9591a to 3d1b013 Compare July 2, 2026 15:44
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 2, 2026
@mengesb
mengesb requested a review from Copilot July 2, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 8 changed files in this pull request and generated 7 comments.

Comment thread docs/diagrams/architecture-component.mmd Outdated
Comment thread docs/diagrams/architecture-component.mmd Outdated
Comment thread docs/diagrams/architecture-component.mmd Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
Comment thread docs/diagrams/architecture-component.drawio Outdated
Comment thread docs/diagrams/architecture-high-level.mmd Outdated
Comment thread docs/diagrams/architecture-high-level.drawio Outdated
- Correct the authentication flow: the external data source outputs a
  signed login payload, NOT a Vault token. The Vault provider is the
  component that calls /auth/aws/login and receives the token.
- Fix parse-url.sh label to functions/parse-url.sh (actual repo path)
- Update Vault provider label from "token from external" to
  "login via signed payload"
- Renumber high-level diagram steps to reflect correct flow

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.

Comment thread docs/diagrams/architecture-high-level.mmd Outdated
Comment thread docs/diagrams/architecture-high-level.drawio Outdated
@mengesb
mengesb merged commit da4ad41 into main Jul 2, 2026
4 checks passed
@mengesb
mengesb deleted the docs/architecture-diagrams branch July 2, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants