Skip to content

Commit

Permalink
Merge pull request #2 from PashmakGuru/refactor/tfmermaid
Browse files Browse the repository at this point in the history
📊 Generate Terraform Diagrams
AmirrezaNasiri authored Jan 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 7d31399 + 1571b14 commit 8eac3e4
Showing 2 changed files with 188 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,92 @@ This Terraform module is designed to set up an Azure Kubernetes Service (AKS) cl
### Terraform Architecture
```mermaid
%%tfmermaid
%%{init:{"theme":"default","themeVariables":{"lineColor":"#6f7682","textColor":"#6f7682"}}}%%
flowchart LR
classDef r fill:#5c4ee5,stroke:#444,color:#fff
classDef v fill:#eeedfc,stroke:#eeedfc,color:#5c4ee5
classDef ms fill:none,stroke:#dce0e6,stroke-width:2px
classDef vs fill:none,stroke:#dce0e6,stroke-width:4px,stroke-dasharray:10
classDef ps fill:none,stroke:none
classDef cs fill:#f7f8fa,stroke:#dce0e6,stroke-width:2px
n0["azapi_resource.ssh_public_key"]:::r
n1["azapi_resource_action.<br/>ssh_public_key_gen"]:::r
subgraph "n2"["Key Vault"]
n3["azurerm_key_vault.this"]:::r
n4["azurerm_key_vault_secret.<br/>admin_ssh_private_key"]:::r
end
class n2 cs
subgraph "n5"["Container"]
n6["azurerm_kubernetes_cluster.<br/>this"]:::r
end
class n5 cs
subgraph "n7"["Base"]
n8["azurerm_resource_group.this"]:::r
n9{{"data.<br/>azurerm_client_config.<br/>current"}}:::r
end
class n7 cs
subgraph "na"["Authorization"]
nb["azurerm_role_assignment.<br/>aks_nodes_rg_roles"]:::r
nc["azurerm_role_assignment.<br/>aks_rg_roles"]:::r
nd["azurerm_role_assignment.<br/>kv_allow_current_sp"]:::r
ne["azurerm_role_assignment.<br/>kv_allow_platform_engineers"]:::r
end
class na cs
subgraph "nf"["Network"]
ng["azurerm_subnet.cluster"]:::r
nh["azurerm_virtual_network.this"]:::r
end
class nf cs
subgraph "ni"["Groups"]
nj{{"data.<br/>azuread_group.<br/>platform_engineers"}}:::r
end
class ni cs
subgraph "nk"["Compute"]
nl{{"data.<br/>azurerm_ssh_public_key.<br/>admin_ssh_public_key"}}:::r
end
class nk cs
nm["random_string.<br/>azurerm_key_vault_name"]:::r
subgraph "nn"["Input Variables"]
no(["var.environment"]):::v
np(["var.location"]):::v
nq(["var.name"]):::v
nr(["var.resource_group_name"]):::v
end
class nn vs
ns(["local.common_tags"]):::v
nt(["local.aks_nodes_rg_roles"]):::v
nu(["local.aks_rg_roles"]):::v
subgraph "nv"["Output Values"]
nw(["output.kubernetes_cluster"]):::v
nx(["output.resource_group"]):::v
end
class nv vs
n8-->n0
n0-->n1
n8-->n3
n9-->n3
nm-->n3
n1-->n4
nd-->n4
ng-->n6
nl-->n6
ns-->n8
np--->n8
nr--->n8
n6-->nb
nt-->nb
n6-->nc
nu-->nc
n3-->nd
n3-->ne
nj-->ne
nh-->ng
n8-->nh
n1-->nl
no--->ns
nq--->ns
n6--->nw
n8--->nx
```

## Features

0 comments on commit 8eac3e4

Please sign in to comment.