Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ This module provisions a dataset and a list of tables with associated JSON schem
| bigquery\_external\_tables | Map of BigQuery external table resources being provisioned. |
| bigquery\_tables | Map of bigquery table resources being provisioned. |
| bigquery\_views | Map of bigquery view resources being provisioned. |
| env\_vars | Exported environment variables |
| external\_table\_ids | Unique IDs for any external tables being provisioned |
| external\_table\_names | Friendly names for any external tables being provisioned |
| project | Project where the dataset and tables are created |
Expand Down
10 changes: 10 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,16 @@ spec:
type:
- object
- {}
- name: env_vars
description: Exported environment variables
type:
- object
- BIGQUERY_DATASET: string
BIGQUERY_EXTERNAL_TABLES: string
BIGQUERY_MATERIALIZED_VIEWS: string
BIGQUERY_ROUTINES: string
BIGQUERY_TABLES: string
BIGQUERY_VIEWS: string
- name: external_table_ids
description: Unique IDs for any external tables being provisioned
type:
Expand Down
12 changes: 12 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,15 @@ output "routine_ids" {
]
description = "Unique IDs for any routine being provisioned"
}

output "env_vars" {
value = {
"BIGQUERY_DATASET" = google_bigquery_dataset.main.dataset_id
"BIGQUERY_TABLES" = jsonencode([for table in google_bigquery_table.main : table.table_id])
"BIGQUERY_VIEWS" = jsonencode([for table in google_bigquery_table.view : table.table_id])
"BIGQUERY_MATERIALIZED_VIEWS" = jsonencode([for table in google_bigquery_table.materialized_view : table.table_id])
"BIGQUERY_EXTERNAL_TABLES" = jsonencode([for table in google_bigquery_table.external_table : table.table_id])
"BIGQUERY_ROUTINES" = jsonencode([for routine in google_bigquery_routine.routine : routine.routine_id])
}
description = "Exported environment variables"
}