Inkdrop Documentation
  • Getting Started
  • Welcome
  • Integrating Inkdrop with Your CI/CD Pipeline
  • CLI Usage
  • Understanding the Inkdrop UI
Powered by GitBook
On this page
  • GitHub Actions
  • GitLab CI/CD

Integrating Inkdrop with Your CI/CD Pipeline

Inkdrop integrates seamlessly with popular CI/CD platforms, allowing you to visualize your Terraform infrastructure changes directly within pull requests and READMEs. This guide covers setting up Inkdrop with GitHub Actions and GitLab CI/CD.

GitHub Actions

1. Generate and Upload Terraform Plan Artifact

First, generate a Terraform plan file and upload it as an artifact in your GitHub Actions workflow:

jobs:
  plan:
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        
      - name: Setup Terraform
        uses: hashicorp/setup-terraform@v2
        
      - name: Terraform Init and Plan
        run: |
          terraform init
          terraform plan -out=plan.out
          
      - name: Upload Artifact  
        uses: actions/upload-artifact@v3
        with:
          name: terraform-plan
          path: plan.out

2. Run Inkdrop Visualizer

Next, add the Inkdrop visualizer job using the official GitHub Action:

  visualize:
    needs: plan
    uses: inkdrop-org/inkdrop-visualizer/.github/workflows/inkdrop-plan.yml@v2
    with:
      terraform_version: 1.3.7
      plan_artifact: terraform-plan
      plan_file_name: plan.out

This will download the Terraform plan artifact, generate the visualization, and comment it on the pull request.

3. Update README (Optional)

To also update your README with an interactive visualization diagram, add:

with:
  diagram_readme: true

That's it! Your CI/CD pipeline will now automatically visualize Terraform changes on pull/merge requests and keep your documentation up-to-date.

GitLab CI/CD

Coming soon!

PreviousWelcomeNextCLI Usage

Last updated 1 year ago

For full configuration options, see the or

Inkdrop GitHub Action
Inkdrop CLI Usage.