diff --git a/.changelog/11304.txt b/.changelog/11304.txt new file mode 100644 index 00000000000..60f9fff9817 --- /dev/null +++ b/.changelog/11304.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +bigqueryreservation: remove `multi_region_auxiliary` from `google_bigquery_reservation` +``` \ No newline at end of file diff --git a/google/services/bigqueryreservation/resource_bigquery_reservation.go b/google/services/bigqueryreservation/resource_bigquery_reservation.go index c0392df667f..d46f8adb0ed 100644 --- a/google/services/bigqueryreservation/resource_bigquery_reservation.go +++ b/google/services/bigqueryreservation/resource_bigquery_reservation.go @@ -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, @@ -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 @@ -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) } @@ -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 @@ -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") } @@ -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 } @@ -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 } diff --git a/website/docs/guides/version_6_upgrade.html.markdown b/website/docs/guides/version_6_upgrade.html.markdown index d961765c3c9..ed159e6a7bd 100644 --- a/website/docs/guides/version_6_upgrade.html.markdown +++ b/website/docs/guides/version_6_upgrade.html.markdown @@ -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 diff --git a/website/docs/r/bigquery_reservation.html.markdown b/website/docs/r/bigquery_reservation.html.markdown index 89af961cbf0..7fd23494599 100644 --- a/website/docs/r/bigquery_reservation.html.markdown +++ b/website/docs/r/bigquery_reservation.html.markdown @@ -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