driftctl-slack

command module
v0.0.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

GitHub Actions

driftctl-slack is a golang wrapper to send driftctl scan summary to slack.

We've provided a Terraform module for deployment as a scheduleds ECS Fargate task.

driftctl-slack

import "github.com/nomadops/driftctl-slack"

driftctl-scan driftctl-scan will execute driftctl-scan, send a summary of the report to a slack channel and then copy the report to a S3 bucket.

driftctl will be run by the golang wrapper with the following options:

$ /usr/local/bin/driftctl scan --quiet --from tfstate+s3://"${STATE_BUCKET}"/**/*.tfstate -o json://"${DRIFTCTL_JSON}"

Usage:

$ export SCAN_BUCKET=my-scan-bucket STATE_BUCKET=my-tf-state-bucket TOKEN=my-slack-token CHANNEL="#gitops"
$ driftctl-slack
{"level":"info","service":"driftctl","time":"2021-12-27T14:49:17Z"}
{"level":"info","service":"driftctl","time":"2021-12-27T14:49:17Z","message":"Driftctl scan detected drift."}
{"level":"info","service":"driftctl","time":"2021-12-27T14:49:17Z"}
{"level":"info","service":"driftctl-slack","channel":"#gitops","time":"2021-12-27T14:49:17Z","message":"Message successfully sent to slack."}
{"level":"info","service":"driftctl-slack","total_resources":428,"total_changed":0,"total_unmanaged":307,"total_missing":7,"total_managed":114,"time":"2021-12-27T14:49:17Z","message":"Driftctl scan summary"}
{"level":"info","service":"driftctl-slack","VersionId":"2AgtP5l6bRYGW30DJtT_89K_GueXeW7m","ti

driftctl-slack is licensed under Apache License 2.0.

Index

Generated by gomarkdoc

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL