https://github.com/anderseknert/opa-cicd-demo
Examples of OPA running in CI/CD contexts
https://github.com/anderseknert/opa-cicd-demo
Last synced: over 1 year ago
JSON representation
Examples of OPA running in CI/CD contexts
- Host: GitHub
- URL: https://github.com/anderseknert/opa-cicd-demo
- Owner: anderseknert
- Created: 2021-06-07T19:23:27.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-22T08:05:00.000Z (about 5 years ago)
- Last Synced: 2025-03-14T20:50:41.675Z (over 1 year ago)
- Language: HCL
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# styra-tf-demo
## Running
Run `plan.sh`, or:
```shell
terraform plan --out tfplan.binary
terraform show -json tfplan.binary > tfplan.json
```
## Testing state changes
### opa eval
```shell
opa eval --format pretty --fail-defined --input tfplan.json --data policy/main.rego 'data.main.deny[x]'
```
### conftest test
```shell
conftest test tfplan.json
```
### Styra
```shell
styra vet tfplan.json
```