-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.tf
More file actions
57 lines (44 loc) · 1.09 KB
/
main.tf
File metadata and controls
57 lines (44 loc) · 1.09 KB
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
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.51.0"
}
}
}
provider "google" {
credentials = file("/home/gbotemi/Downloads/dataeng-375609-fac7ec0c9b2b.json")
project = var.project
region = var.region
}
//resources to create ubuntu 22.04 with 30gb of space
resource "google_compute_instance" "default" {
name = var.compute_instance
machine_type = var.machine_type
zone = "${var.region}-c"
boot_disk {
initialize_params {
image = "ubuntu-2204-jammy-v20230302"
size=30
}
}
network_interface {
network = "default"
access_config {
// Ephemeral public IP
}
}
}
//resources to create a cloud storage bucket
resource "google_storage_bucket" "data-lake-bucket" {
name = var.cloud_storage
location = var.region
storage_class = "STANDARD"
uniform_bucket_level_access = true
}
//resources to create a bigquery dataset
resource "google_bigquery_dataset" "dataset" {
dataset_id = var.BQ_DATASET
project = var.project
# location = var.region
}