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

Remove multi_region_auxiliary from google_bigquery_reservation #18922

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
3 changes: 3 additions & 0 deletions .changelog/11304.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
bigqueryreservation: remove `multi_region_auxiliary` from `google_bigquery_reservation`
```
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,6 @@ capacity specified above at most.`,
Examples: US, EU, asia-northeast1. The default value is US.`,
Default: "US",
},
"multi_region_auxiliary": {
Type: schema.TypeBool,
Optional: true,
Deprecated: "`multi_region_auxiliary` is deprecated and will be removed in a future major release. This field is no longer supported by the BigQuery Reservation API.",
Description: `Applicable only for reservations located within one of the BigQuery multi-regions (US or EU).
If set to true, this reservation is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this reservation is placed in the organization's default region.`,
},
"project": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -159,12 +152,6 @@ func resourceBigqueryReservationReservationCreate(d *schema.ResourceData, meta i
} else if v, ok := d.GetOkExists("concurrency"); !tpgresource.IsEmptyValue(reflect.ValueOf(concurrencyProp)) && (ok || !reflect.DeepEqual(v, concurrencyProp)) {
obj["concurrency"] = concurrencyProp
}
multiRegionAuxiliaryProp, err := expandBigqueryReservationReservationMultiRegionAuxiliary(d.Get("multi_region_auxiliary"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("multi_region_auxiliary"); !tpgresource.IsEmptyValue(reflect.ValueOf(multiRegionAuxiliaryProp)) && (ok || !reflect.DeepEqual(v, multiRegionAuxiliaryProp)) {
obj["multiRegionAuxiliary"] = multiRegionAuxiliaryProp
}
editionProp, err := expandBigqueryReservationReservationEdition(d.Get("edition"), d, config)
if err != nil {
return err
Expand Down Expand Up @@ -275,9 +262,6 @@ func resourceBigqueryReservationReservationRead(d *schema.ResourceData, meta int
if err := d.Set("concurrency", flattenBigqueryReservationReservationConcurrency(res["concurrency"], d, config)); err != nil {
return fmt.Errorf("Error reading Reservation: %s", err)
}
if err := d.Set("multi_region_auxiliary", flattenBigqueryReservationReservationMultiRegionAuxiliary(res["multiRegionAuxiliary"], d, config)); err != nil {
return fmt.Errorf("Error reading Reservation: %s", err)
}
if err := d.Set("edition", flattenBigqueryReservationReservationEdition(res["edition"], d, config)); err != nil {
return fmt.Errorf("Error reading Reservation: %s", err)
}
Expand Down Expand Up @@ -322,12 +306,6 @@ func resourceBigqueryReservationReservationUpdate(d *schema.ResourceData, meta i
} else if v, ok := d.GetOkExists("concurrency"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, concurrencyProp)) {
obj["concurrency"] = concurrencyProp
}
multiRegionAuxiliaryProp, err := expandBigqueryReservationReservationMultiRegionAuxiliary(d.Get("multi_region_auxiliary"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("multi_region_auxiliary"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, multiRegionAuxiliaryProp)) {
obj["multiRegionAuxiliary"] = multiRegionAuxiliaryProp
}
autoscaleProp, err := expandBigqueryReservationReservationAutoscale(d.Get("autoscale"), d, config)
if err != nil {
return err
Expand Down Expand Up @@ -356,10 +334,6 @@ func resourceBigqueryReservationReservationUpdate(d *schema.ResourceData, meta i
updateMask = append(updateMask, "concurrency")
}

if d.HasChange("multi_region_auxiliary") {
updateMask = append(updateMask, "multiRegionAuxiliary")
}

if d.HasChange("autoscale") {
updateMask = append(updateMask, "autoscale")
}
Expand Down Expand Up @@ -505,10 +479,6 @@ func flattenBigqueryReservationReservationConcurrency(v interface{}, d *schema.R
return v // let terraform core handle it otherwise
}

func flattenBigqueryReservationReservationMultiRegionAuxiliary(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenBigqueryReservationReservationEdition(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}
Expand Down Expand Up @@ -574,10 +544,6 @@ func expandBigqueryReservationReservationConcurrency(v interface{}, d tpgresourc
return v, nil
}

func expandBigqueryReservationReservationMultiRegionAuxiliary(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}

func expandBigqueryReservationReservationEdition(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}
Expand Down
6 changes: 6 additions & 0 deletions website/docs/guides/version_6_upgrade.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ Description of the change and how users should adjust their configuration (if ne

A `view` can no longer be created when `schema` contains required fields

## Resource: `google_bigquery_reservation`

### `multi_region_auxiliary` is now removed

This field is no longer supported by the BigQuery Reservation API.

## Resource: `google_sql_database_instance`

### `settings.ip_configuration.require_ssl` is now removed
Expand Down
7 changes: 0 additions & 7 deletions website/docs/r/bigquery_reservation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ The following arguments are supported:
(Optional)
Maximum number of queries that are allowed to run concurrently in this reservation. This is a soft limit due to asynchronous nature of the system and various optimizations for small queries. Default value is 0 which means that concurrency will be automatically set based on the reservation size.

* `multi_region_auxiliary` -
(Optional, Deprecated)
Applicable only for reservations located within one of the BigQuery multi-regions (US or EU).
If set to true, this reservation is placed in the organization's secondary region which is designated for disaster recovery purposes. If false, this reservation is placed in the organization's default region.

~> **Warning:** `multi_region_auxiliary` is deprecated and will be removed in a future major release. This field is no longer supported by the BigQuery Reservation API.

* `edition` -
(Optional)
The edition type. Valid values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS
Expand Down