https://github.com/edsoncelio/digger-demo
Demo with https://digger.dev/
https://github.com/edsoncelio/digger-demo
Last synced: 3 months ago
JSON representation
Demo with https://digger.dev/
- Host: GitHub
- URL: https://github.com/edsoncelio/digger-demo
- Owner: edsoncelio
- Created: 2023-06-08T22:24:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-20T18:28:57.000Z (almost 3 years ago)
- Last Synced: 2025-10-04T15:36:48.704Z (9 months ago)
- Language: HCL
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# digger-demo
Demo for https://digger.dev/
## Requirements to run
* Change workflow permissions (at repo settings -> actions) to "Read and Write Permissions"
* Add the following variables to the action secrets:
* AWS_ACCESS_KEY_ID: aws access key
* AWS_SECRET_ACCESS_KEY: aws secret key
* INFRACOST_API_KEY: infracost api key
## How it works
This repo contains the following structure:
```
.
├── README.md
├── digger.yml
└── projects
├── prod
│ ├── backend.tf
│ └── main.tf
└── staging
├── backend.tf
└── main.tf
```
When,
* `projects`: dir with environments (`staging`, `prod`)
* `digger.yml`: config file for digger
## digger.yml configs
For this demo, there's a customized workflow called `staging_workflow` that will run for each PR in `projects/sandbox`:
* init
* validate
* fmt
* tfsec checks
* infracost checks (and post a comment and edit for each change)
## Examples
* To plan the project `projects/sandbox` in a PR:
`digger plan -p staging`
* To apply:
`digger apply -p staging`
### infracost comment

### tfsec report