Skip to content

Commit

Permalink
Add tfmermaid
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirrezaNasiri committed Jan 5, 2024
1 parent 4380da2 commit 87bafdf
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/terraform-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:

format:
runs-on: ubuntu-22.04
name: Formate Terraform
name: Format Terraform
permissions:
contents: write
pull-requests: write
contents: write
pull-requests: write
steps:
-
name: Checkout
Expand All @@ -55,6 +55,32 @@ jobs:
# Delete PR branch if diff is resolved anyhow
delete-branch: true
labels: |
bot
kind/cleanup
bot
kind/cleanup
tfmermaid:
runs-on: ubuntu-22.04
name: Update Terraform Diagram
permissions:
contents: write
pull-requests: write
steps:
-
name: Checkout
uses: actions/checkout@v3
- uses: asannou/tfmermaid-action@v1
with:
file: README.md
-
name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: "📊 Generate Terraform diagrams using `tfmermaid`"
title: "📊 Generate Terraform Diagrams"
body: Update Terraform diagrams in README using `tfmermaid-action`
branch: refactor/tfmermaid
# Delete PR branch if diff is resolved anyhow
delete-branch: true
labels: |
bot
kind/cleanup
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
## Overview
This Terraform configuration automates the setup of Azure CDN resources, streamlining the deployment and management of CDN infrastructure.

### Terraform Architecture
```mermaid
%%tfmermaid
```

## Features
- **Resource Group Management**: Creates and manages Azure resource groups.
- **DNS Zone Configuration**: Handles the setup and configuration of Azure DNS zones.
Expand All @@ -26,4 +31,4 @@ For usage examples, refer to the [`example`](./example) directory.
## Workflows
| Name | Description |
|---|---|
| [terraform-ci.yaml](.github/workflows/terraform-ci.yaml) | A workflow for linting and auto-formatting Terraform code. Triggered by pushes to `main` and `dev` branches or on pull requests, it consists of two jobs: `tflint` for lint checks and `format` for code formatting and automated pull requests. |
| [terraform-ci.yaml](.github/workflows/terraform-ci.yaml) | A workflow for linting and auto-formatting Terraform code. Triggered by pushes to `main` and `dev` branches or on pull requests, it consists of two jobs: `tflint` for lint checks, `format` for code formatting and submit a PR, and `tfmermaid` to update architecture graph and submit a PR. |

0 comments on commit 87bafdf

Please sign in to comment.