Skip to content

Commit 190dc99

Browse files
modular-magicianemilymye
authored andcommitted
Add bigquery connection resource. (#3424) (#2014)
Signed-off-by: Modular Magician <[email protected]>
1 parent 838330f commit 190dc99

9 files changed

+1021
-2
lines changed

.changelog/3424.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_bigquery_connection`
3+
```

google-beta/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ type Config struct {
8282
AppEngineBasePath string
8383
ArtifactRegistryBasePath string
8484
BigQueryBasePath string
85+
BigqueryConnectionBasePath string
8586
BigqueryDataTransferBasePath string
8687
BigqueryReservationBasePath string
8788
BigtableBasePath string
@@ -229,6 +230,7 @@ var AccessContextManagerDefaultBasePath = "https://accesscontextmanager.googleap
229230
var AppEngineDefaultBasePath = "https://appengine.googleapis.com/v1/"
230231
var ArtifactRegistryDefaultBasePath = "https://artifactregistry.googleapis.com/v1beta1/"
231232
var BigQueryDefaultBasePath = "https://www.googleapis.com/bigquery/v2/"
233+
var BigqueryConnectionDefaultBasePath = "https://bigqueryconnection.googleapis.com/v1beta1/"
232234
var BigqueryDataTransferDefaultBasePath = "https://bigquerydatatransfer.googleapis.com/v1/"
233235
var BigqueryReservationDefaultBasePath = "https://bigqueryreservation.googleapis.com/v1beta1/"
234236
var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/"
@@ -750,6 +752,7 @@ func ConfigureBasePaths(c *Config) {
750752
c.AppEngineBasePath = AppEngineDefaultBasePath
751753
c.ArtifactRegistryBasePath = ArtifactRegistryDefaultBasePath
752754
c.BigQueryBasePath = BigQueryDefaultBasePath
755+
c.BigqueryConnectionBasePath = BigqueryConnectionDefaultBasePath
753756
c.BigqueryDataTransferBasePath = BigqueryDataTransferDefaultBasePath
754757
c.BigqueryReservationBasePath = BigqueryReservationDefaultBasePath
755758
c.BigtableBasePath = BigtableDefaultBasePath

google-beta/provider.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ func Provider() terraform.ResourceProvider {
141141
"GOOGLE_BIG_QUERY_CUSTOM_ENDPOINT",
142142
}, BigQueryDefaultBasePath),
143143
},
144+
"bigquery_connection_custom_endpoint": {
145+
Type: schema.TypeString,
146+
Optional: true,
147+
ValidateFunc: validateCustomEndpoint,
148+
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
149+
"GOOGLE_BIGQUERY_CONNECTION_CUSTOM_ENDPOINT",
150+
}, BigqueryConnectionDefaultBasePath),
151+
},
144152
"bigquery_data_transfer_custom_endpoint": {
145153
Type: schema.TypeString,
146154
Optional: true,
@@ -614,9 +622,9 @@ func Provider() terraform.ResourceProvider {
614622
return provider
615623
}
616624

617-
// Generated resources: 149
625+
// Generated resources: 150
618626
// Generated IAM resources: 63
619-
// Total generated resources: 212
627+
// Total generated resources: 213
620628
func ResourceMap() map[string]*schema.Resource {
621629
resourceMap, _ := ResourceMapWithErrors()
622630
return resourceMap
@@ -642,6 +650,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
642650
"google_bigquery_dataset": resourceBigQueryDataset(),
643651
"google_bigquery_dataset_access": resourceBigQueryDatasetAccess(),
644652
"google_bigquery_job": resourceBigQueryJob(),
653+
"google_bigquery_connection": resourceBigqueryConnectionConnection(),
645654
"google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(),
646655
"google_bigquery_reservation": resourceBigqueryReservationReservation(),
647656
"google_bigtable_app_profile": resourceBigtableAppProfile(),
@@ -1006,6 +1015,7 @@ func providerConfigure(d *schema.ResourceData, p *schema.Provider, terraformVers
10061015
config.AppEngineBasePath = d.Get("app_engine_custom_endpoint").(string)
10071016
config.ArtifactRegistryBasePath = d.Get("artifact_registry_custom_endpoint").(string)
10081017
config.BigQueryBasePath = d.Get("big_query_custom_endpoint").(string)
1018+
config.BigqueryConnectionBasePath = d.Get("bigquery_connection_custom_endpoint").(string)
10091019
config.BigqueryDataTransferBasePath = d.Get("bigquery_data_transfer_custom_endpoint").(string)
10101020
config.BigqueryReservationBasePath = d.Get("bigquery_reservation_custom_endpoint").(string)
10111021
config.BigtableBasePath = d.Get("bigtable_custom_endpoint").(string)

0 commit comments

Comments
 (0)