Skip to content

Commit

Permalink
fixup! Parquet to BigQuery import for GCP-backed AnVIL snapshots (#6355)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Jul 12, 2024
1 parent 611010a commit a32a308
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/post_deploy_tdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def verify_source(self,
) -> None:
source = self.tdr.lookup_source(source_spec)
log.info('TDR client is authorized for API access to %s.', source_spec)
require(source.project == source_spec.project,
require(source_spec.project in (source.project, config.google_project()),
'Actual Google project of TDR source differs from configured one',
source.project, source_spec.project)
source.project, source_spec.project, config.google_project())
# Uppercase is standard for multi-regions in the documentation but TDR
# returns 'us' in lowercase
require(source.location.lower() == config.tdr_source_location.lower(),
Expand Down
2 changes: 1 addition & 1 deletion src/azul/terra.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def oauth2_scopes(self) -> Sequence[str]:
return [
*super().oauth2_scopes(),
'https://www.googleapis.com/auth/devstorage.read_only',
'https://www.googleapis.com/auth/bigquery.readonly'
'https://www.googleapis.com/auth/bigquery'
]


Expand Down
3 changes: 3 additions & 0 deletions terraform/authentication.tf.json.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
"title": f"azul_{config.deployment_stage}",
"permissions": [
"bigquery.jobs.create",
"bigquery.datasets.create",
"bigquery.tables.create",
"bigquery.tables.updateData",
*[
f'bigquery.{resource}.{action}'
for resource in ('capacityCommitments', 'reservations')
Expand Down

0 comments on commit a32a308

Please sign in to comment.