Skip to content

Commit

Permalink
Add bigquery connection resource. (#3424) (#2014)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and emilymye committed Apr 30, 2020
1 parent 1cffb20 commit 55bec0d
Show file tree
Hide file tree
Showing 9 changed files with 1,021 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/3424.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_bigquery_connection`
```
3 changes: 3 additions & 0 deletions google-beta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type Config struct {
AppEngineBasePath string
ArtifactRegistryBasePath string
BigQueryBasePath string
BigqueryConnectionBasePath string
BigqueryDataTransferBasePath string
BigqueryReservationBasePath string
BigtableBasePath string
Expand Down Expand Up @@ -229,6 +230,7 @@ var AccessContextManagerDefaultBasePath = "https://accesscontextmanager.googleap
var AppEngineDefaultBasePath = "https://appengine.googleapis.com/v1/"
var ArtifactRegistryDefaultBasePath = "https://artifactregistry.googleapis.com/v1beta1/"
var BigQueryDefaultBasePath = "https://www.googleapis.com/bigquery/v2/"
var BigqueryConnectionDefaultBasePath = "https://bigqueryconnection.googleapis.com/v1beta1/"
var BigqueryDataTransferDefaultBasePath = "https://bigquerydatatransfer.googleapis.com/v1/"
var BigqueryReservationDefaultBasePath = "https://bigqueryreservation.googleapis.com/v1beta1/"
var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/"
Expand Down Expand Up @@ -750,6 +752,7 @@ func ConfigureBasePaths(c *Config) {
c.AppEngineBasePath = AppEngineDefaultBasePath
c.ArtifactRegistryBasePath = ArtifactRegistryDefaultBasePath
c.BigQueryBasePath = BigQueryDefaultBasePath
c.BigqueryConnectionBasePath = BigqueryConnectionDefaultBasePath
c.BigqueryDataTransferBasePath = BigqueryDataTransferDefaultBasePath
c.BigqueryReservationBasePath = BigqueryReservationDefaultBasePath
c.BigtableBasePath = BigtableDefaultBasePath
Expand Down
14 changes: 12 additions & 2 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ func Provider() terraform.ResourceProvider {
"GOOGLE_BIG_QUERY_CUSTOM_ENDPOINT",
}, BigQueryDefaultBasePath),
},
"bigquery_connection_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BIGQUERY_CONNECTION_CUSTOM_ENDPOINT",
}, BigqueryConnectionDefaultBasePath),
},
"bigquery_data_transfer_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -614,9 +622,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 149
// Generated resources: 150
// Generated IAM resources: 63
// Total generated resources: 212
// Total generated resources: 213
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand All @@ -642,6 +650,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_bigquery_dataset": resourceBigQueryDataset(),
"google_bigquery_dataset_access": resourceBigQueryDatasetAccess(),
"google_bigquery_job": resourceBigQueryJob(),
"google_bigquery_connection": resourceBigqueryConnectionConnection(),
"google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(),
"google_bigquery_reservation": resourceBigqueryReservationReservation(),
"google_bigtable_app_profile": resourceBigtableAppProfile(),
Expand Down Expand Up @@ -1006,6 +1015,7 @@ func providerConfigure(d *schema.ResourceData, p *schema.Provider, terraformVers
config.AppEngineBasePath = d.Get("app_engine_custom_endpoint").(string)
config.ArtifactRegistryBasePath = d.Get("artifact_registry_custom_endpoint").(string)
config.BigQueryBasePath = d.Get("big_query_custom_endpoint").(string)
config.BigqueryConnectionBasePath = d.Get("bigquery_connection_custom_endpoint").(string)
config.BigqueryDataTransferBasePath = d.Get("bigquery_data_transfer_custom_endpoint").(string)
config.BigqueryReservationBasePath = d.Get("bigquery_reservation_custom_endpoint").(string)
config.BigtableBasePath = d.Get("bigtable_custom_endpoint").(string)
Expand Down
Loading

0 comments on commit 55bec0d

Please sign in to comment.