@ahmadnassri/terraform-unidiff

4.0.3 • Public • Published

Terraform Plan Unidiff

Generate a human readable diff of Terraform Plan changes, using Unified format (unidiff)

license release semantic

Usage

CLI

npx @ahmadnassri/terraform-unidiff /path/to/plan.json

Library

Installation

npm install @ahmadnassri/terraform-unidiff

API

const unidiff = require('@ahmadnassri/terraform-unidiff')

const plan = fs.readFileSync('path/to/plan.json')

const { summary, patches } = unidiff(plan)

console.log(patches) // array of changes in unidiff format
console.log(summary) // object with changes counts { create: 1, update: 3, delete: 0 }

Plan JSON

to obtain a Terraform plan in JSON format, run the following command:

terraform plan -out terraform.plan && terraform show -json terraform.plan > terraform.json

Author: Ahmad Nassri • Twitter: @AhmadNassri

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.361latest

Version History

VersionDownloads (Last 7 Days)Published
4.0.361
4.0.228
4.0.10
4.0.00
3.0.116
3.0.100
3.0.90
3.0.80
3.0.70
3.0.60
3.0.50
3.0.40
3.0.30
3.0.20
3.0.10
3.0.00
2.0.130
2.0.120
2.0.110
2.0.100
2.0.90
2.0.80
2.0.73
2.0.60
2.0.50
2.0.40
2.0.30
2.0.20
2.0.10
2.0.00
1.1.00
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @ahmadnassri/terraform-unidiff

Weekly Downloads

98

Version

4.0.3

License

ISC

Unpacked Size

6.58 kB

Total Files

6

Last publish

Collaborators

  • ahmadnassri