Skip to content

Commit

Permalink
chore: Regenerate BQ table resource names in .tf files with namespace…
Browse files Browse the repository at this point in the history
…d BQ dataset (#208)

* fix: use snake_case for airflow_version

* chore: regenerate .tf files to namespace BQ tables resource names with BQ dataset
  • Loading branch information
adlersantos committed Oct 13, 2021
1 parent 53cca23 commit 5d5e2ea
Show file tree
Hide file tree
Showing 57 changed files with 322 additions and 298 deletions.
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "bikeshare_stations" {
resource "google_bigquery_table" "austin_bikeshare_bikeshare_stations" {
project = var.project_id
dataset_id = "austin_bikeshare"
table_id = "bikeshare_stations"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "bikeshare_stations" {
]
}

output "bigquery_table-bikeshare_stations-table_id" {
value = google_bigquery_table.bikeshare_stations.table_id
output "bigquery_table-austin_bikeshare_bikeshare_stations-table_id" {
value = google_bigquery_table.austin_bikeshare_bikeshare_stations.table_id
}

output "bigquery_table-bikeshare_stations-id" {
value = google_bigquery_table.bikeshare_stations.id
output "bigquery_table-austin_bikeshare_bikeshare_stations-id" {
value = google_bigquery_table.austin_bikeshare_bikeshare_stations.id
}
10 changes: 5 additions & 5 deletions datasets/austin_crime/_terraform/crime_pipeline.tf
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "crime" {
resource "google_bigquery_table" "austin_crime_crime" {
project = var.project_id
dataset_id = "austin_crime"
table_id = "crime"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "crime" {
]
}

output "bigquery_table-crime-table_id" {
value = google_bigquery_table.crime.table_id
output "bigquery_table-austin_crime_crime-table_id" {
value = google_bigquery_table.austin_crime_crime.table_id
}

output "bigquery_table-crime-id" {
value = google_bigquery_table.crime.id
output "bigquery_table-austin_crime_crime-id" {
value = google_bigquery_table.austin_crime_crime.id
}
13 changes: 8 additions & 5 deletions datasets/bls/_terraform/cpsaat18_pipeline.tf
Expand Up @@ -15,22 +15,25 @@
*/


resource "google_bigquery_table" "cpsaat18" {
resource "google_bigquery_table" "bls_cpsaat18" {
project = var.project_id
dataset_id = "bls"
table_id = "cpsaat18"

description = "Current population survey 18: Employed persons by detailed industry, sex, race, and Hispanic or Latino ethnicity"




depends_on = [
google_bigquery_dataset.bls
]
}

output "bigquery_table-cpsaat18-table_id" {
value = google_bigquery_table.cpsaat18.table_id
output "bigquery_table-bls_cpsaat18-table_id" {
value = google_bigquery_table.bls_cpsaat18.table_id
}

output "bigquery_table-cpsaat18-id" {
value = google_bigquery_table.cpsaat18.id
output "bigquery_table-bls_cpsaat18-id" {
value = google_bigquery_table.bls_cpsaat18.id
}
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "mobility_report" {
resource "google_bigquery_table" "covid19_google_mobility_mobility_report" {
project = var.project_id
dataset_id = "covid19_google_mobility"
table_id = "mobility_report"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "mobility_report" {
]
}

output "bigquery_table-mobility_report-table_id" {
value = google_bigquery_table.mobility_report.table_id
output "bigquery_table-covid19_google_mobility_mobility_report-table_id" {
value = google_bigquery_table.covid19_google_mobility_mobility_report.table_id
}

output "bigquery_table-mobility_report-id" {
value = google_bigquery_table.mobility_report.id
output "bigquery_table-covid19_google_mobility_mobility_report-id" {
value = google_bigquery_table.covid19_google_mobility_mobility_report.id
}
10 changes: 5 additions & 5 deletions datasets/covid19_italy/_terraform/data_by_province_pipeline.tf
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "data_by_province" {
resource "google_bigquery_table" "covid19_italy_data_by_province" {
project = var.project_id
dataset_id = "covid19_italy"
table_id = "data_by_province"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "data_by_province" {
]
}

output "bigquery_table-data_by_province-table_id" {
value = google_bigquery_table.data_by_province.table_id
output "bigquery_table-covid19_italy_data_by_province-table_id" {
value = google_bigquery_table.covid19_italy_data_by_province.table_id
}

output "bigquery_table-data_by_province-id" {
value = google_bigquery_table.data_by_province.id
output "bigquery_table-covid19_italy_data_by_province-id" {
value = google_bigquery_table.covid19_italy_data_by_province.id
}
10 changes: 5 additions & 5 deletions datasets/covid19_italy/_terraform/data_by_region_pipeline.tf
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "data_by_region" {
resource "google_bigquery_table" "covid19_italy_data_by_region" {
project = var.project_id
dataset_id = "covid19_italy"
table_id = "data_by_region"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "data_by_region" {
]
}

output "bigquery_table-data_by_region-table_id" {
value = google_bigquery_table.data_by_region.table_id
output "bigquery_table-covid19_italy_data_by_region-table_id" {
value = google_bigquery_table.covid19_italy_data_by_region.table_id
}

output "bigquery_table-data_by_region-id" {
value = google_bigquery_table.data_by_region.id
output "bigquery_table-covid19_italy_data_by_region-id" {
value = google_bigquery_table.covid19_italy_data_by_region.id
}
10 changes: 5 additions & 5 deletions datasets/covid19_italy/_terraform/national_trends_pipeline.tf
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "national_trends" {
resource "google_bigquery_table" "covid19_italy_national_trends" {
project = var.project_id
dataset_id = "covid19_italy"
table_id = "national_trends"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "national_trends" {
]
}

output "bigquery_table-national_trends-table_id" {
value = google_bigquery_table.national_trends.table_id
output "bigquery_table-covid19_italy_national_trends-table_id" {
value = google_bigquery_table.covid19_italy_national_trends.table_id
}

output "bigquery_table-national_trends-id" {
value = google_bigquery_table.national_trends.id
output "bigquery_table-covid19_italy_national_trends-id" {
value = google_bigquery_table.covid19_italy_national_trends.id
}
Expand Up @@ -15,82 +15,94 @@
*/


resource "google_bigquery_table" "facility_boundary_us_all" {
resource "google_bigquery_table" "covid19_vaccination_access_facility_boundary_us_all" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_all"

description = "This table is formed by combining the data from the individual US tables of drive, transit and walk. It represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility within certain duration. It is computed for 3 travel modes of drive, transit and walk and for predetermined time periods."




depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_all-table_id" {
value = google_bigquery_table.facility_boundary_us_all.table_id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_all-table_id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_all.table_id
}

output "bigquery_table-facility_boundary_us_all-id" {
value = google_bigquery_table.facility_boundary_us_all.id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_all-id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_all.id
}

resource "google_bigquery_table" "facility_boundary_us_drive" {
resource "google_bigquery_table" "covid19_vaccination_access_facility_boundary_us_drive" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_drive"

description = "This table represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility by driving within predetermined time periods."




depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_drive-table_id" {
value = google_bigquery_table.facility_boundary_us_drive.table_id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_drive-table_id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_drive.table_id
}

output "bigquery_table-facility_boundary_us_drive-id" {
value = google_bigquery_table.facility_boundary_us_drive.id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_drive-id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_drive.id
}

resource "google_bigquery_table" "facility_boundary_us_transit" {
resource "google_bigquery_table" "covid19_vaccination_access_facility_boundary_us_transit" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_transit"

description = "This table represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility by public transit within predetermined time periods."




depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_transit-table_id" {
value = google_bigquery_table.facility_boundary_us_transit.table_id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_transit-table_id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_transit.table_id
}

output "bigquery_table-facility_boundary_us_transit-id" {
value = google_bigquery_table.facility_boundary_us_transit.id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_transit-id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_transit.id
}

resource "google_bigquery_table" "facility_boundary_us_walk" {
resource "google_bigquery_table" "covid19_vaccination_access_facility_boundary_us_walk" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_walk"

description = "This table represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility by walking within predetermined time periods."




depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_walk-table_id" {
value = google_bigquery_table.facility_boundary_us_walk.table_id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_walk-table_id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_walk.table_id
}

output "bigquery_table-facility_boundary_us_walk-id" {
value = google_bigquery_table.facility_boundary_us_walk.id
output "bigquery_table-covid19_vaccination_access_facility_boundary_us_walk-id" {
value = google_bigquery_table.covid19_vaccination_access_facility_boundary_us_walk.id
}
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "covid19_vaccination_search_insights" {
resource "google_bigquery_table" "covid19_vaccination_search_insights_covid19_vaccination_search_insights" {
project = var.project_id
dataset_id = "covid19_vaccination_search_insights"
table_id = "covid19_vaccination_search_insights"
Expand All @@ -27,7 +27,8 @@ resource "google_bigquery_table" "covid19_vaccination_search_insights" {
require_partition_filter = false
}
clustering = ["sub_region_1_code", "sub_region_2_code", "sub_region_3_code", "place_id"]
schema = <<EOF

schema = <<EOF
[
{
"name": "date",
Expand Down Expand Up @@ -114,10 +115,10 @@ resource "google_bigquery_table" "covid19_vaccination_search_insights" {
]
}

output "bigquery_table-covid19_vaccination_search_insights-table_id" {
value = google_bigquery_table.covid19_vaccination_search_insights.table_id
output "bigquery_table-covid19_vaccination_search_insights_covid19_vaccination_search_insights-table_id" {
value = google_bigquery_table.covid19_vaccination_search_insights_covid19_vaccination_search_insights.table_id
}

output "bigquery_table-covid19_vaccination_search_insights-id" {
value = google_bigquery_table.covid19_vaccination_search_insights.id
output "bigquery_table-covid19_vaccination_search_insights_covid19_vaccination_search_insights-id" {
value = google_bigquery_table.covid19_vaccination_search_insights_covid19_vaccination_search_insights.id
}
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "release_notes" {
resource "google_bigquery_table" "google_cloud_release_notes_release_notes" {
project = var.project_id
dataset_id = "google_cloud_release_notes"
table_id = "release_notes"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "release_notes" {
]
}

output "bigquery_table-release_notes-table_id" {
value = google_bigquery_table.release_notes.table_id
output "bigquery_table-google_cloud_release_notes_release_notes-table_id" {
value = google_bigquery_table.google_cloud_release_notes_release_notes.table_id
}

output "bigquery_table-release_notes-id" {
value = google_bigquery_table.release_notes.id
output "bigquery_table-google_cloud_release_notes_release_notes-id" {
value = google_bigquery_table.google_cloud_release_notes_release_notes.id
}
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "advertiser_declared_stats" {
resource "google_bigquery_table" "google_political_ads_advertiser_declared_stats" {
project = var.project_id
dataset_id = "google_political_ads"
table_id = "advertiser_declared_stats"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "advertiser_declared_stats" {
]
}

output "bigquery_table-advertiser_declared_stats-table_id" {
value = google_bigquery_table.advertiser_declared_stats.table_id
output "bigquery_table-google_political_ads_advertiser_declared_stats-table_id" {
value = google_bigquery_table.google_political_ads_advertiser_declared_stats.table_id
}

output "bigquery_table-advertiser_declared_stats-id" {
value = google_bigquery_table.advertiser_declared_stats.id
output "bigquery_table-google_political_ads_advertiser_declared_stats-id" {
value = google_bigquery_table.google_political_ads_advertiser_declared_stats.id
}
Expand Up @@ -15,7 +15,7 @@
*/


resource "google_bigquery_table" "advertiser_geo_spend" {
resource "google_bigquery_table" "google_political_ads_advertiser_geo_spend" {
project = var.project_id
dataset_id = "google_political_ads"
table_id = "advertiser_geo_spend"
Expand All @@ -30,10 +30,10 @@ resource "google_bigquery_table" "advertiser_geo_spend" {
]
}

output "bigquery_table-advertiser_geo_spend-table_id" {
value = google_bigquery_table.advertiser_geo_spend.table_id
output "bigquery_table-google_political_ads_advertiser_geo_spend-table_id" {
value = google_bigquery_table.google_political_ads_advertiser_geo_spend.table_id
}

output "bigquery_table-advertiser_geo_spend-id" {
value = google_bigquery_table.advertiser_geo_spend.id
output "bigquery_table-google_political_ads_advertiser_geo_spend-id" {
value = google_bigquery_table.google_political_ads_advertiser_geo_spend.id
}

0 comments on commit 5d5e2ea

Please sign in to comment.