-
Notifications
You must be signed in to change notification settings - Fork 7
YACHT-962: terraform templates for SLI views #37
Conversation
you can execute it providing env variables as following (swap project-xs with your projects): |
@@ -0,0 +1,83 @@ | |||
resource "google_bigquery_table" "census_data_3_days_ago_view" { | |||
project = "${var.slos_views_destination_project}" | |||
dataset_id = "SLO_views_legacy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you create dataset with TF, you could reference also dataset_id, so that it's configured in one place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
resource "google_bigquery_dataset" "SLO_views_legacy_dataset" { | ||
dataset_id = "SLO_views_legacy" | ||
project = "${var.slos_views_destination_project}" | ||
location = "EU" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
location could also be exported as variable and configured default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -0,0 +1,121 @@ | |||
variable "bbq_project" {} //it is needed to filter out backups from SLI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables have description fields, you don't need to use comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
variable "slos_views_destination_project" {} //all SLO views will be created in this view | ||
variable "census_project" {} //project where census data resides. More specifically we need bigquery.table_metadata_v1_0 and bigquery.partition_metadata_v1_0 table from that project | ||
variable "datastore_export_project" {} //project where datastore export tables can be get from (also datastore export views will be stored here) | ||
variable "datastore_export_dataset" {} //dataset in project ${var.datastore_export_project} where datastore export tables can be get from (also datastore export views will be stored here) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move all variables and provide config to vars.tf file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.