Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

YACHT-962: terraform templates for SLI views #37

Merged
merged 10 commits into from
Aug 24, 2018
Merged

Conversation

jarekdrabek
Copy link
Contributor

No description provided.

@jarekdrabek
Copy link
Contributor Author

you can execute it providing env variables as following (swap project-xs with your projects):
TF_VAR_bbq_project=project-a TF_VAR_census_project=project-b TF_VAR_datastore_export_project=project-c TF_VAR_datastore_export_dataset=dataset-c TF_VAR_slos_views_destination_project=project-d terraform apply

@coveralls
Copy link

coveralls commented Aug 22, 2018

Pull Request Test Coverage Report for Build 454

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 80.943%

Totals Coverage Status
Change from base Build 444: 0.0%
Covered Lines: 2162
Relevant Lines: 2671

💛 - Coveralls

@przemyslaw-jasinski przemyslaw-jasinski merged commit c2513fd into master Aug 24, 2018
@przemyslaw-jasinski przemyslaw-jasinski deleted the YACHT-962 branch August 24, 2018 09:13
@@ -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"
Copy link
Contributor

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

Copy link
Contributor Author

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"
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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)
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jarekdrabek jarekdrabek restored the YACHT-962 branch August 29, 2018 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants