|
| 1 | +# Copyright 2022 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +apiVersion: blueprints.cloud.google.com/v1alpha1 |
| 16 | +kind: BlueprintMetadata |
| 17 | +metadata: |
| 18 | + name: terraform-google-bigquery |
| 19 | + annotations: |
| 20 | + config.kubernetes.io/local-config: "true" |
| 21 | +spec: |
| 22 | + title: terraform-google-bigquery |
| 23 | + source: |
| 24 | + repo: https://github.com/terraform-google-modules/terraform-google-bigquery |
| 25 | + sourceType: git |
| 26 | + version: 5.4.2 |
| 27 | + actuationTool: |
| 28 | + type: Terraform |
| 29 | + version: '>= 0.13' |
| 30 | + subBlueprints: |
| 31 | + - name: authorization |
| 32 | + location: modules/authorization |
| 33 | + - name: scheduled_queries |
| 34 | + location: modules/scheduled_queries |
| 35 | + - name: udf |
| 36 | + location: modules/udf |
| 37 | + examples: |
| 38 | + - name: basic_bq |
| 39 | + location: examples/basic_bq |
| 40 | + - name: basic_view |
| 41 | + location: examples/basic_view |
| 42 | + - name: multiple_tables |
| 43 | + location: examples/multiple_tables |
| 44 | + - name: scheduled_queries |
| 45 | + location: examples/scheduled_queries |
| 46 | + variables: |
| 47 | + - name: access |
| 48 | + description: An array of objects that define dataset access for one or more entities. |
| 49 | + type: any |
| 50 | + default: |
| 51 | + - role: roles/bigquery.dataOwner |
| 52 | + special_group: projectOwners |
| 53 | + required: false |
| 54 | + - name: dataset_id |
| 55 | + description: Unique ID for the dataset being provisioned. |
| 56 | + type: string |
| 57 | + required: true |
| 58 | + - name: dataset_labels |
| 59 | + description: Key value pairs in a map for dataset labels |
| 60 | + type: map(string) |
| 61 | + default: {} |
| 62 | + required: false |
| 63 | + - name: dataset_name |
| 64 | + description: Friendly name for the dataset being provisioned. |
| 65 | + type: string |
| 66 | + required: false |
| 67 | + - name: default_table_expiration_ms |
| 68 | + description: TTL of tables using the dataset in MS |
| 69 | + type: number |
| 70 | + required: false |
| 71 | + - name: delete_contents_on_destroy |
| 72 | + description: (Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present. |
| 73 | + type: bool |
| 74 | + required: false |
| 75 | + - name: deletion_protection |
| 76 | + description: Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply that would delete the instance will fail |
| 77 | + type: bool |
| 78 | + default: false |
| 79 | + required: false |
| 80 | + - name: description |
| 81 | + description: Dataset description. |
| 82 | + type: string |
| 83 | + required: false |
| 84 | + - name: encryption_key |
| 85 | + description: Default encryption key to apply to the dataset. Defaults to null (Google-managed). |
| 86 | + type: string |
| 87 | + required: false |
| 88 | + - name: external_tables |
| 89 | + description: A list of objects which include table_id, expiration_time, external_data_configuration, and labels. |
| 90 | + type: |- |
| 91 | + list(object({ |
| 92 | + table_id = string, |
| 93 | + autodetect = bool, |
| 94 | + compression = string, |
| 95 | + ignore_unknown_values = bool, |
| 96 | + max_bad_records = number, |
| 97 | + schema = string, |
| 98 | + source_format = string, |
| 99 | + source_uris = list(string), |
| 100 | + csv_options = object({ |
| 101 | + quote = string, |
| 102 | + allow_jagged_rows = bool, |
| 103 | + allow_quoted_newlines = bool, |
| 104 | + encoding = string, |
| 105 | + field_delimiter = string, |
| 106 | + skip_leading_rows = number, |
| 107 | + }), |
| 108 | + google_sheets_options = object({ |
| 109 | + range = string, |
| 110 | + skip_leading_rows = number, |
| 111 | + }), |
| 112 | + hive_partitioning_options = object({ |
| 113 | + mode = string, |
| 114 | + source_uri_prefix = string, |
| 115 | + }), |
| 116 | + expiration_time = string, |
| 117 | + labels = map(string), |
| 118 | + })) |
| 119 | + default: [] |
| 120 | + required: false |
| 121 | + - name: location |
| 122 | + description: The regional location for the dataset only US and EU are allowed in module |
| 123 | + type: string |
| 124 | + default: US |
| 125 | + required: false |
| 126 | + - name: materialized_views |
| 127 | + description: A list of objects which includes view_id, view_query, clustering, time_partitioning, range_partitioning, expiration_time and labels |
| 128 | + type: |- |
| 129 | + list(object({ |
| 130 | + view_id = string, |
| 131 | + query = string, |
| 132 | + enable_refresh = bool, |
| 133 | + refresh_interval_ms = string, |
| 134 | + clustering = list(string), |
| 135 | + time_partitioning = object({ |
| 136 | + expiration_ms = string, |
| 137 | + field = string, |
| 138 | + type = string, |
| 139 | + require_partition_filter = bool, |
| 140 | + }), |
| 141 | + range_partitioning = object({ |
| 142 | + field = string, |
| 143 | + range = object({ |
| 144 | + start = string, |
| 145 | + end = string, |
| 146 | + interval = string, |
| 147 | + }), |
| 148 | + }), |
| 149 | + expiration_time = string, |
| 150 | + labels = map(string), |
| 151 | + })) |
| 152 | + default: [] |
| 153 | + required: false |
| 154 | + - name: project_id |
| 155 | + description: Project where the dataset and table are created |
| 156 | + type: string |
| 157 | + required: true |
| 158 | + - name: routines |
| 159 | + description: A list of objects which include routine_id, routine_type, routine_language, definition_body, return_type, routine_description and arguments. |
| 160 | + type: |- |
| 161 | + list(object({ |
| 162 | + routine_id = string, |
| 163 | + routine_type = string, |
| 164 | + language = string, |
| 165 | + definition_body = string, |
| 166 | + return_type = string, |
| 167 | + description = string, |
| 168 | + arguments = list(object({ |
| 169 | + name = string, |
| 170 | + data_type = string, |
| 171 | + argument_kind = string, |
| 172 | + mode = string, |
| 173 | + })), |
| 174 | + })) |
| 175 | + default: [] |
| 176 | + required: false |
| 177 | + - name: tables |
| 178 | + description: A list of objects which include table_id, schema, clustering, time_partitioning, range_partitioning, expiration_time and labels. |
| 179 | + type: |- |
| 180 | + list(object({ |
| 181 | + table_id = string, |
| 182 | + schema = string, |
| 183 | + clustering = list(string), |
| 184 | + time_partitioning = object({ |
| 185 | + expiration_ms = string, |
| 186 | + field = string, |
| 187 | + type = string, |
| 188 | + require_partition_filter = bool, |
| 189 | + }), |
| 190 | + range_partitioning = object({ |
| 191 | + field = string, |
| 192 | + range = object({ |
| 193 | + start = string, |
| 194 | + end = string, |
| 195 | + interval = string, |
| 196 | + }), |
| 197 | + }), |
| 198 | + expiration_time = string, |
| 199 | + labels = map(string), |
| 200 | + })) |
| 201 | + default: [] |
| 202 | + required: false |
| 203 | + - name: views |
| 204 | + description: A list of objects which include view_id and view query |
| 205 | + type: |- |
| 206 | + list(object({ |
| 207 | + view_id = string, |
| 208 | + query = string, |
| 209 | + use_legacy_sql = bool, |
| 210 | + labels = map(string), |
| 211 | + })) |
| 212 | + default: [] |
| 213 | + required: false |
| 214 | + outputs: |
| 215 | + - name: bigquery_dataset |
| 216 | + description: Bigquery dataset resource. |
| 217 | + - name: bigquery_external_tables |
| 218 | + description: Map of BigQuery external table resources being provisioned. |
| 219 | + - name: bigquery_tables |
| 220 | + description: Map of bigquery table resources being provisioned. |
| 221 | + - name: bigquery_views |
| 222 | + description: Map of bigquery view resources being provisioned. |
| 223 | + - name: external_table_ids |
| 224 | + description: Unique IDs for any external tables being provisioned |
| 225 | + - name: external_table_names |
| 226 | + description: Friendly names for any external tables being provisioned |
| 227 | + - name: project |
| 228 | + description: Project where the dataset and tables are created |
| 229 | + - name: routine_ids |
| 230 | + description: Unique IDs for any routine being provisioned |
| 231 | + - name: table_ids |
| 232 | + description: Unique id for the table being provisioned |
| 233 | + - name: table_names |
| 234 | + description: Friendly name for the table being provisioned |
| 235 | + - name: view_ids |
| 236 | + description: Unique id for the view being provisioned |
| 237 | + - name: view_names |
| 238 | + description: friendlyname for the view being provisioned |
| 239 | + roles: |
| 240 | + - level: Project |
| 241 | + roles: |
| 242 | + - roles/bigquery.admin |
| 243 | + - roles/cloudkms.cryptoKeyEncrypterDecrypter |
| 244 | + services: |
| 245 | + - cloudkms.googleapis.com |
| 246 | + - cloudresourcemanager.googleapis.com |
| 247 | + - bigquery.googleapis.com |
| 248 | + - bigquerystorage.googleapis.com |
| 249 | + - serviceusage.googleapis.com |
0 commit comments