-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-env.sh
More file actions
executable file
·23 lines (19 loc) · 998 Bytes
/
setup-env.sh
File metadata and controls
executable file
·23 lines (19 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
set -u
export TF_VAR_project_id=${PROJECT_ID}
export TF_VAR_region=${GCP_REGION}
export TF_VAR_bigquery_dataset_location=${BIGQUERY_REGION}
cd terraform
terraform init && terraform apply
export EVENT_GENERATOR_TEMPLATE=$(terraform output -raw event-generator-template)
export EVENT_GENERATOR_TEMPLATE_WITH_THREATS=$(terraform output -raw event-generator-template-with-threats)
export EVENT_TOPIC=$(terraform output -raw event-topic)
export EVENT_SUB=$(terraform output -raw event-sub)
export SUSPICIOUS_ACTIVITY_TOPIC=$(terraform output -raw suspicious-activity-topic)
export SUSPICIOUS_ACTIVITY_SUB=$(terraform output -raw suspicious-activity-sub)
export DATASET=$(terraform output -raw event-monitoring-dataset)
export DATAFLOW_TEMP_BUCKET=gs://$(terraform output -raw dataflow-temp-bucket)
export METADATA_BUCKET=$(terraform output -raw dataflow-temp-bucket)
export EVENTS_BUCKET=$(terraform output -raw events-bucket)
export REGION=$(terraform output -raw region)
cd ..