-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
65 lines (53 loc) · 1.47 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "6.9.0"
}
}
}
provider "google" {
impersonate_service_account = var.service_account_email
project = var.project_id
region = var.region
}
# Cloud Storage
resource "google_storage_bucket" "bucket_landing" {
name = var.bucket_landing_name
location = var.bucket_region
force_destroy = true
}
resource "google_storage_bucket" "bucket_staging" {
name = var.bucket_staging_name
location = var.bucket_region
force_destroy = true
}
resource "google_storage_bucket" "bucket_curated" {
name = var.bucket_curated_name
location = var.bucket_region
force_destroy = true
}
# BigQuery
resource "google_bigquery_dataset" "dataset_silver" {
dataset_id = var.dataset_id_silver
location = var.region
delete_contents_on_destroy = true
labels = {
env = var.env
}
}
resource "google_bigquery_dataset" "dataset_gold" {
dataset_id = var.dataset_id_gold
location = var.region
delete_contents_on_destroy = true
labels = {
env = var.env
}
}
# Artifact Registry
resource "google_artifact_registry_repository" "gar-dev" {
location = var.region
repository_id = var.gar_repo_id_dev
description = var.gar_repo_id_dev_desc
format = "DOCKER"
}