Skip to content

A PoC repo for converting DriftCtl results into events transferred on Amazon EventBridge

Notifications You must be signed in to change notification settings

JoshArmi/driftctl2eventbridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DriftCtl to Amazon EventBridge

This repository contains Python that converts the summary data from a DriftCtl scan into an Amazon EventBridge event.

It additionally includes the required Terraform to capture and forward the event to and Amazon EventBridge bus of your choosing.

Prerequisites

  • Pipenv (developed with v2022.8.15)
  • Terraform (developed with v1.3)
  • DriftCtl (developed with v0.35)
  • Make (developed with v3.81)

To scan an account and produce the event

  1. Assume a role in the target account
  2. Set a STATEFILES environment variable containing a space delimited list of state file locations. E.g. export STATEFILES="terraform.tfstate s3://my-state-bucket/terraform.tfstate"
  3. make run

To forward the event centrally

  1. Create a terraform.tfvars file
  2. Add variables for centralised_account_id and target_bus_name as required
  3. Ensure the target Amazon EventBridge bus will accept events from the account
  4. Validate your configuration with make plan
  5. make deploy

About

A PoC repo for converting DriftCtl results into events transferred on Amazon EventBridge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published