Skip to content

Commit

Permalink
google_bigquery_connection - add missing output fields (GoogleCloudPl…
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 authored and ericayyliu committed Jul 26, 2023
1 parent 7fb7a87 commit a022c05
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mmv1/products/bigqueryconnection/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ objects:
True if the connection has credential assigned.
- !ruby/object:Api::Type::NestedObject
name: 'cloudSql'
description: Connection properties specific to the Cloud SQL.
exactly_one_of:
- cloud_sql
- aws
Expand Down Expand Up @@ -113,6 +114,10 @@ objects:
- :DATABASE_TYPE_UNSPECIFIED
- :POSTGRES
- :MYSQL
- !ruby/object:Api::Type::String
name: 'serviceAccountId'
description: When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
output: true
- !ruby/object:Api::Type::NestedObject
name: aws
description: Connection properties specific to Amazon Web Services.
Expand Down Expand Up @@ -166,6 +171,10 @@ objects:
name: 'redirectUri'
output: true
description: The URL user will be redirected to after granting consent during connection setup.
- !ruby/object:Api::Type::String
name: 'identity'
description: A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
output: true
- !ruby/object:Api::Type::NestedObject
name: cloudSpanner
description: Connection properties specific to Cloud Spanner
Expand All @@ -183,6 +192,9 @@ objects:
- !ruby/object:Api::Type::Boolean
name: 'useParallelism'
description: If parallelism should be used when reading from Cloud Spanner
- !ruby/object:Api::Type::Boolean
name: 'useServerlessAnalytics'
description: If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics
- !ruby/object:Api::Type::NestedObject
name: cloudResource
description: Container for connection properties for delegation of access to GCP resources.
Expand Down
8 changes: 8 additions & 0 deletions mmv1/products/bigqueryconnection/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ overrides: !ruby/object:Overrides::ResourceOverrides
vars:
connection_id: "my-connection"
database: "projects/project/instances/instance/databases/database"
- !ruby/object:Provider::Terraform::Examples
name: "bigquery_connection_cloudspanner_analytics"
pull_external: true
skip_docs: true
primary_resource_id: "connection"
vars:
connection_id: "my-connection"
database: "projects/project/instances/instance/databases/database"
# This is for copying files over
files: !ruby/object:Provider::Config::Files
# These files have templating (ERB) code that will be run.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "google_bigquery_connection" "<%= ctx[:primary_resource_id] %>" {
connection_id = "<%= ctx[:vars]['connection_id'] %>"
location = "US"
friendly_name = "👋"
description = "a riveting description"
cloud_spanner {
database = "<%= ctx[:vars]['database'] %>"
use_serverless_analytics = true
use_parallelism = true
}
}

0 comments on commit a022c05

Please sign in to comment.