Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bigquery connection of type CLOUD_RESOURCE & make other examples GA. #11701

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changelog/6020.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:enhancement
bigquery connection: Added connection of type cloud_resource for `google_bigquery_connection`
```
```release-note:enhancement
bigquery connection: Made `google_bigquery_connection` part of GA terraform provider.
```
4 changes: 4 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ type Config struct {
ApigeeBasePath string
AppEngineBasePath string
BigQueryBasePath string
BigqueryConnectionBasePath string
BigqueryDataTransferBasePath string
BigqueryReservationBasePath string
BigtableBasePath string
Expand Down Expand Up @@ -267,6 +268,7 @@ const ActiveDirectoryBasePathKey = "ActiveDirectory"
const ApigeeBasePathKey = "Apigee"
const AppEngineBasePathKey = "AppEngine"
const BigQueryBasePathKey = "BigQuery"
const BigqueryConnectionBasePathKey = "BigqueryConnection"
const BigqueryDataTransferBasePathKey = "BigqueryDataTransfer"
const BigqueryReservationBasePathKey = "BigqueryReservation"
const BigtableBasePathKey = "Bigtable"
Expand Down Expand Up @@ -350,6 +352,7 @@ var DefaultBasePaths = map[string]string{
ApigeeBasePathKey: "https://apigee.googleapis.com/v1/",
AppEngineBasePathKey: "https://appengine.googleapis.com/v1/",
BigQueryBasePathKey: "https://bigquery.googleapis.com/bigquery/v2/",
BigqueryConnectionBasePathKey: "https://bigqueryconnection.googleapis.com/v1/",
BigqueryDataTransferBasePathKey: "https://bigquerydatatransfer.googleapis.com/v1/",
BigqueryReservationBasePathKey: "https://bigqueryreservation.googleapis.com/v1/",
BigtableBasePathKey: "https://bigtableadmin.googleapis.com/v2/",
Expand Down Expand Up @@ -1195,6 +1198,7 @@ func ConfigureBasePaths(c *Config) {
c.ApigeeBasePath = DefaultBasePaths[ApigeeBasePathKey]
c.AppEngineBasePath = DefaultBasePaths[AppEngineBasePathKey]
c.BigQueryBasePath = DefaultBasePaths[BigQueryBasePathKey]
c.BigqueryConnectionBasePath = DefaultBasePaths[BigqueryConnectionBasePathKey]
c.BigqueryDataTransferBasePath = DefaultBasePaths[BigqueryDataTransferBasePathKey]
c.BigqueryReservationBasePath = DefaultBasePaths[BigqueryReservationBasePathKey]
c.BigtableBasePath = DefaultBasePaths[BigtableBasePathKey]
Expand Down
14 changes: 12 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ func Provider() *schema.Provider {
"GOOGLE_BIG_QUERY_CUSTOM_ENDPOINT",
}, DefaultBasePaths[BigQueryBasePathKey]),
},
"bigquery_connection_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BIGQUERY_CONNECTION_CUSTOM_ENDPOINT",
}, DefaultBasePaths[BigqueryConnectionBasePathKey]),
},
"bigquery_data_transfer_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -839,9 +847,9 @@ func Provider() *schema.Provider {
return provider
}

// Generated resources: 219
// Generated resources: 220
// Generated IAM resources: 108
// Total generated resources: 327
// Total generated resources: 328
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -890,6 +898,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_bigquery_table_iam_member": ResourceIamMember(BigQueryTableIamSchema, BigQueryTableIamUpdaterProducer, BigQueryTableIdParseFunc),
"google_bigquery_table_iam_policy": ResourceIamPolicy(BigQueryTableIamSchema, BigQueryTableIamUpdaterProducer, BigQueryTableIdParseFunc),
"google_bigquery_routine": resourceBigQueryRoutine(),
"google_bigquery_connection": resourceBigqueryConnectionConnection(),
"google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(),
"google_bigquery_reservation": resourceBigqueryReservationReservation(),
"google_bigtable_app_profile": resourceBigtableAppProfile(),
Expand Down Expand Up @@ -1428,6 +1437,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.ApigeeBasePath = d.Get("apigee_custom_endpoint").(string)
config.AppEngineBasePath = d.Get("app_engine_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