-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
49 lines (41 loc) · 1.02 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "5.34.0"
}
}
}
provider "google" {
credentials = file(var.creds)
project = var.project_id
region = var.region
}
resource "google_storage_bucket" "reddit-bucket" {
name = var.google_storage_bucket_name
location = var.location
force_destroy = true
lifecycle_rule {
condition {
age = 1
}
action {
type = "AbortIncompleteMultipartUpload"
}
}
}
resource "google_bigquery_dataset" "redit-bq" {
dataset_id = var.bq_dataset_name
location = var.location
delete_contents_on_destroy = true
}
resource "google_bigquery_dataset" "bq_prod" {
dataset_id = var.bq_prod
location = var.location
delete_contents_on_destroy = true
}
resource "google_bigquery_dataset" "bq_dbt" {
dataset_id = var.bq_dbt
location = var.location
delete_contents_on_destroy = true
}