abcxyz / guardian

Apache License 2.0
16 stars 1 forks source link

feat: add policy enforcement violations comment #407

Closed gjonathanhong closed 2 weeks ago

gjonathanhong commented 2 weeks ago

This changes improves the UX for policy enforcement by providing details for policy violations and how to resolve them.

github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱

Guardian will run for the following directories

Update terraform/project1

Destroy terraform/project2

Help Deleted directories are removed from source control without modification. To destroy an entire directory, add one or more modifier comments to the pull request body instructing Guardian to destroy the directory. ``` GUARDIAN_DESTROY=path/to/directory ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 PLAN (DESTROY) 🟩 SUCCESS [logs]

Entrypoint: terraform/project2

Details ```diff null_resource.empty: Refreshing state... [id=1292705121200075626] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: - destroy Terraform will perform the following actions: # null_resource.empty will be destroyed - resource "null_resource" "empty" { - id = "1292705121200075626" -> null } Plan: 0 to add, 0 to change, 1 to destroy. ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 APPLY (DESTROY) 🟩 SUCCESS [logs]

Entrypoint: terraform/project2

Details ```diff null_resource.empty: Destroying... [id=1292705121200075626] null_resource.empty: Destruction complete after 0s Apply complete! Resources: 0 added, 0 changed, 1 destroyed. ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 PLAN 🟩 SUCCESS [logs]

Entrypoint: terraform/project1

Details ```diff Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # null_resource.empty will be created + resource "null_resource" "empty" { + id = (known after apply) } Plan: 1 to add, 0 to change, 0 to destroy. ```
github-actions[bot] commented 2 weeks ago

🔱 Guardian 🔱 APPLY 🟩 SUCCESS [logs]

Entrypoint: terraform/project1

Details ```diff null_resource.empty: Creating... null_resource.empty: Creation complete after 0s [id=7241674208132504264] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ```