Skip to content

Commit 9088cc5

Browse files
authored
Merge pull request #16 from kiran002/master
Variables for Location and Storage class
2 parents 667a2eb + ff03b00 commit 9088cc5

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

modules/bigquery/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "google_project_service" "enable_destination_api" {
3838
resource "google_bigquery_dataset" "dataset" {
3939
dataset_id = "${var.dataset_name}"
4040
project = "${google_project_service.enable_destination_api.project}"
41-
41+
location = "${var.location}"
4242
# Delete all tables in dataset on destroy.
4343
# This is required because a dataset cannot be deleted if it contains any data.
4444
provisioner "local-exec" {

modules/bigquery/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ variable "log_sink_writer_identity" {
2525
variable "project_id" {
2626
description = "The ID of the project in which the bigquery dataset will be created."
2727
}
28+
29+
variable "location" {
30+
description = "The location of the storage bucket."
31+
default = "US"
32+
}

modules/storage/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ resource "google_project_service" "enable_destination_api" {
3434
resource "google_storage_bucket" "bucket" {
3535
name = "${var.storage_bucket_name}"
3636
project = "${google_project_service.enable_destination_api.project}"
37-
storage_class = "MULTI_REGIONAL"
38-
location = "US"
37+
storage_class = "${var.storage_class}"
38+
location = "${var.location}"
3939
force_destroy = true
4040
}
4141

modules/storage/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ variable "project_id" {
2525
variable "storage_bucket_name" {
2626
description = "The name of the storage bucket to be created and used for log entries matching the filter."
2727
}
28+
29+
variable "location" {
30+
description = "The location of the storage bucket."
31+
default = "US"
32+
}
33+
34+
variable "storage_class" {
35+
description = "The storage class of the storage bucket."
36+
default = "MULTI_REGIONAL"
37+
}

0 commit comments

Comments
 (0)