Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 1.89 KB

README.md

File metadata and controls

53 lines (46 loc) · 1.89 KB

Setup GCP audit trail GCS bucket

Audit log data can be used to map and illustrate the following:

  • conceptual relationships
  • causes and effects
  • interactions between GCP entities

And is useful to answer PCI needs such as tracking:

  • Successful login
  • Unsuccessful login
  • Creating user
  • Deleting user
  • Adding user to strong groups (admin)

Prerequisites:

Deployment

# Customize the following variables
export tag="feature-branch-foo"
export project="my-project"

# Create terraform remote state bucket
cd ./modules/backend_bucket/
terraform init --reconfigure
terraform apply -var "gcp_project=$project" --auto-approve
bucketname=$(terraform output -json | jq -r '.bucket_name.value')

# Apply project terraform
cd ../../
echo $PWD
terraform init -backend-config="bucket=$bucketname" --reconfigure
terraform apply -var "gcp_project=$project" -refresh=true -var "tag=$tag"