From df3a2b02bc6d493ea60814472e93b6ee2c23dccf Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 23 Dec 2020 12:29:52 -0800 Subject: [PATCH] Add ga version of bigquery reservation (#4342) (#8079) Signed-off-by: Modular Magician --- .changelog/4342.txt | 3 + google/config.go | 3 + google/provider.go | 14 +- ...source_bigquery_reservation_reservation.go | 336 ++++++++++++++++++ ..._reservation_reservation_generated_test.go | 98 +++++ ...ry_reservation_reservation_sweeper_test.go | 124 +++++++ .../docs/r/bigquery_reservation.html.markdown | 3 - 7 files changed, 576 insertions(+), 5 deletions(-) create mode 100644 .changelog/4342.txt create mode 100644 google/resource_bigquery_reservation_reservation.go create mode 100644 google/resource_bigquery_reservation_reservation_generated_test.go create mode 100644 google/resource_bigquery_reservation_reservation_sweeper_test.go diff --git a/.changelog/4342.txt b/.changelog/4342.txt new file mode 100644 index 00000000000..22a1a7e79ca --- /dev/null +++ b/.changelog/4342.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +bigquery: promoted bigquery reservation to GA. +``` diff --git a/google/config.go b/google/config.go index e2ce973cf53..28fc4f796f6 100644 --- a/google/config.go +++ b/google/config.go @@ -89,6 +89,7 @@ type Config struct { AppEngineBasePath string BigQueryBasePath string BigqueryDataTransferBasePath string + BigqueryReservationBasePath string BigtableBasePath string BillingBasePath string BinaryAuthorizationBasePath string @@ -166,6 +167,7 @@ var ActiveDirectoryDefaultBasePath = "https://managedidentities.googleapis.com/v var AppEngineDefaultBasePath = "https://appengine.googleapis.com/v1/" var BigQueryDefaultBasePath = "https://bigquery.googleapis.com/bigquery/v2/" var BigqueryDataTransferDefaultBasePath = "https://bigquerydatatransfer.googleapis.com/v1/" +var BigqueryReservationDefaultBasePath = "https://bigqueryreservation.googleapis.com/v1/" var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/" var BillingDefaultBasePath = "https://billingbudgets.googleapis.com/v1/" var BinaryAuthorizationDefaultBasePath = "https://binaryauthorization.googleapis.com/v1/" @@ -953,6 +955,7 @@ func ConfigureBasePaths(c *Config) { c.AppEngineBasePath = AppEngineDefaultBasePath c.BigQueryBasePath = BigQueryDefaultBasePath c.BigqueryDataTransferBasePath = BigqueryDataTransferDefaultBasePath + c.BigqueryReservationBasePath = BigqueryReservationDefaultBasePath c.BigtableBasePath = BigtableDefaultBasePath c.BillingBasePath = BillingDefaultBasePath c.BinaryAuthorizationBasePath = BinaryAuthorizationDefaultBasePath diff --git a/google/provider.go b/google/provider.go index b647c7c32db..53cd90095d5 100644 --- a/google/provider.go +++ b/google/provider.go @@ -183,6 +183,14 @@ func Provider() *schema.Provider { "GOOGLE_BIGQUERY_DATA_TRANSFER_CUSTOM_ENDPOINT", }, BigqueryDataTransferDefaultBasePath), }, + "bigquery_reservation_custom_endpoint": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateCustomEndpoint, + DefaultFunc: schema.MultiEnvDefaultFunc([]string{ + "GOOGLE_BIGQUERY_RESERVATION_CUSTOM_ENDPOINT", + }, BigqueryReservationDefaultBasePath), + }, "bigtable_custom_endpoint": { Type: schema.TypeString, Optional: true, @@ -695,9 +703,9 @@ func Provider() *schema.Provider { return provider } -// Generated resources: 177 +// Generated resources: 178 // Generated IAM resources: 75 -// Total generated resources: 252 +// Total generated resources: 253 func ResourceMap() map[string]*schema.Resource { resourceMap, _ := ResourceMapWithErrors() return resourceMap @@ -732,6 +740,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) { "google_bigquery_table_iam_policy": ResourceIamPolicy(BigQueryTableIamSchema, BigQueryTableIamUpdaterProducer, BigQueryTableIdParseFunc), "google_bigquery_routine": resourceBigQueryRoutine(), "google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(), + "google_bigquery_reservation": resourceBigqueryReservationReservation(), "google_bigtable_app_profile": resourceBigtableAppProfile(), "google_billing_budget": resourceBillingBudget(), "google_binary_authorization_attestor": resourceBinaryAuthorizationAttestor(), @@ -1150,6 +1159,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr config.AppEngineBasePath = d.Get("app_engine_custom_endpoint").(string) config.BigQueryBasePath = d.Get("big_query_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) config.BillingBasePath = d.Get("billing_custom_endpoint").(string) config.BinaryAuthorizationBasePath = d.Get("binary_authorization_custom_endpoint").(string) diff --git a/google/resource_bigquery_reservation_reservation.go b/google/resource_bigquery_reservation_reservation.go new file mode 100644 index 00000000000..caf84ee5f54 --- /dev/null +++ b/google/resource_bigquery_reservation_reservation.go @@ -0,0 +1,336 @@ +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package google + +import ( + "fmt" + "log" + "reflect" + "strconv" + "strings" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func resourceBigqueryReservationReservation() *schema.Resource { + return &schema.Resource{ + Create: resourceBigqueryReservationReservationCreate, + Read: resourceBigqueryReservationReservationRead, + Update: resourceBigqueryReservationReservationUpdate, + Delete: resourceBigqueryReservationReservationDelete, + + Importer: &schema.ResourceImporter{ + State: resourceBigqueryReservationReservationImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(4 * time.Minute), + Update: schema.DefaultTimeout(4 * time.Minute), + Delete: schema.DefaultTimeout(4 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the reservation. This field must only contain alphanumeric characters or dash.`, + }, + "slot_capacity": { + Type: schema.TypeInt, + Required: true, + Description: `Minimum slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the +unit of parallelism. Queries using this reservation might use more slots during runtime if ignoreIdleSlots is set to false.`, + }, + "ignore_idle_slots": { + Type: schema.TypeBool, + Optional: true, + Description: `If false, any query using this reservation will use idle slots from other reservations within +the same admin project. If true, a query using this reservation will execute with the slot +capacity specified above at most.`, + Default: false, + }, + "location": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The geographic location where the transfer config should reside. +Examples: US, EU, asia-northeast1. The default value is US.`, + Default: "US", + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + } +} + +func resourceBigqueryReservationReservationCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + userAgent, err := generateUserAgentString(d, config.userAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + slotCapacityProp, err := expandBigqueryReservationReservationSlotCapacity(d.Get("slot_capacity"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("slot_capacity"); !isEmptyValue(reflect.ValueOf(slotCapacityProp)) && (ok || !reflect.DeepEqual(v, slotCapacityProp)) { + obj["slotCapacity"] = slotCapacityProp + } + ignoreIdleSlotsProp, err := expandBigqueryReservationReservationIgnoreIdleSlots(d.Get("ignore_idle_slots"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("ignore_idle_slots"); !isEmptyValue(reflect.ValueOf(ignoreIdleSlotsProp)) && (ok || !reflect.DeepEqual(v, ignoreIdleSlotsProp)) { + obj["ignoreIdleSlots"] = ignoreIdleSlotsProp + } + + url, err := replaceVars(d, config, "{{BigqueryReservationBasePath}}projects/{{project}}/locations/{{location}}/reservations?reservationId={{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new Reservation: %#v", obj) + billingProject := "" + + project, err := getProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Reservation: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := getBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := sendRequestWithTimeout(config, "POST", billingProject, url, userAgent, obj, d.Timeout(schema.TimeoutCreate)) + if err != nil { + return fmt.Errorf("Error creating Reservation: %s", err) + } + + // Store the ID now + id, err := replaceVars(d, config, "projects/{{project}}/locations/{{location}}/reservations/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + log.Printf("[DEBUG] Finished creating Reservation %q: %#v", d.Id(), res) + + return resourceBigqueryReservationReservationRead(d, meta) +} + +func resourceBigqueryReservationReservationRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + userAgent, err := generateUserAgentString(d, config.userAgent) + if err != nil { + return err + } + + url, err := replaceVars(d, config, "{{BigqueryReservationBasePath}}projects/{{project}}/locations/{{location}}/reservations/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := getProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Reservation: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := getBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := sendRequest(config, "GET", billingProject, url, userAgent, nil) + if err != nil { + return handleNotFoundError(err, d, fmt.Sprintf("BigqueryReservationReservation %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading Reservation: %s", err) + } + + if err := d.Set("slot_capacity", flattenBigqueryReservationReservationSlotCapacity(res["slotCapacity"], d, config)); err != nil { + return fmt.Errorf("Error reading Reservation: %s", err) + } + if err := d.Set("ignore_idle_slots", flattenBigqueryReservationReservationIgnoreIdleSlots(res["ignoreIdleSlots"], d, config)); err != nil { + return fmt.Errorf("Error reading Reservation: %s", err) + } + + return nil +} + +func resourceBigqueryReservationReservationUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + userAgent, err := generateUserAgentString(d, config.userAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := getProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Reservation: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + slotCapacityProp, err := expandBigqueryReservationReservationSlotCapacity(d.Get("slot_capacity"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("slot_capacity"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, slotCapacityProp)) { + obj["slotCapacity"] = slotCapacityProp + } + ignoreIdleSlotsProp, err := expandBigqueryReservationReservationIgnoreIdleSlots(d.Get("ignore_idle_slots"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("ignore_idle_slots"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, ignoreIdleSlotsProp)) { + obj["ignoreIdleSlots"] = ignoreIdleSlotsProp + } + + url, err := replaceVars(d, config, "{{BigqueryReservationBasePath}}projects/{{project}}/locations/{{location}}/reservations/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating Reservation %q: %#v", d.Id(), obj) + updateMask := []string{} + + if d.HasChange("slot_capacity") { + updateMask = append(updateMask, "slotCapacity") + } + + if d.HasChange("ignore_idle_slots") { + updateMask = append(updateMask, "ignoreIdleSlots") + } + // updateMask is a URL parameter but not present in the schema, so replaceVars + // won't set it + url, err = addQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := getBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := sendRequestWithTimeout(config, "PATCH", billingProject, url, userAgent, obj, d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return fmt.Errorf("Error updating Reservation %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating Reservation %q: %#v", d.Id(), res) + } + + return resourceBigqueryReservationReservationRead(d, meta) +} + +func resourceBigqueryReservationReservationDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + userAgent, err := generateUserAgentString(d, config.userAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := getProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Reservation: %s", err) + } + billingProject = project + + url, err := replaceVars(d, config, "{{BigqueryReservationBasePath}}projects/{{project}}/locations/{{location}}/reservations/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + log.Printf("[DEBUG] Deleting Reservation %q", d.Id()) + + // err == nil indicates that the billing_project value was found + if bp, err := getBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := sendRequestWithTimeout(config, "DELETE", billingProject, url, userAgent, obj, d.Timeout(schema.TimeoutDelete)) + if err != nil { + return handleNotFoundError(err, d, "Reservation") + } + + log.Printf("[DEBUG] Finished deleting Reservation %q: %#v", d.Id(), res) + return nil +} + +func resourceBigqueryReservationReservationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*Config) + if err := parseImportId([]string{ + "projects/(?P[^/]+)/locations/(?P[^/]+)/reservations/(?P[^/]+)", + "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", + "(?P[^/]+)/(?P[^/]+)", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := replaceVars(d, config, "projects/{{project}}/locations/{{location}}/reservations/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenBigqueryReservationReservationSlotCapacity(v interface{}, d *schema.ResourceData, config *Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenBigqueryReservationReservationIgnoreIdleSlots(v interface{}, d *schema.ResourceData, config *Config) interface{} { + return v +} + +func expandBigqueryReservationReservationSlotCapacity(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) { + return v, nil +} + +func expandBigqueryReservationReservationIgnoreIdleSlots(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) { + return v, nil +} diff --git a/google/resource_bigquery_reservation_reservation_generated_test.go b/google/resource_bigquery_reservation_reservation_generated_test.go new file mode 100644 index 00000000000..b57a7cb910b --- /dev/null +++ b/google/resource_bigquery_reservation_reservation_generated_test.go @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package google + +import ( + "fmt" + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" +) + +func TestAccBigqueryReservationReservation_bigqueryReservationBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": randString(t, 10), + } + + vcrTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + ExternalProviders: map[string]resource.ExternalProvider{ + "random": {}, + }, + CheckDestroy: testAccCheckBigqueryReservationReservationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccBigqueryReservationReservation_bigqueryReservationBasicExample(context), + }, + { + ResourceName: "google_bigquery_reservation.reservation", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"location", "name"}, + }, + }, + }) +} + +func testAccBigqueryReservationReservation_bigqueryReservationBasicExample(context map[string]interface{}) string { + return Nprintf(` +resource "google_bigquery_reservation" "reservation" { + name = "reservation%{random_suffix}" + location = "asia-northeast1" + // Set to 0 for testing purposes + // In reality this would be larger than zero + slot_capacity = 0 + ignore_idle_slots = false +} +`, context) +} + +func testAccCheckBigqueryReservationReservationDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_bigquery_reservation" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := googleProviderConfig(t) + + url, err := replaceVarsForTest(config, rs, "{{BigqueryReservationBasePath}}projects/{{project}}/locations/{{location}}/reservations/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = sendRequest(config, "GET", billingProject, url, config.userAgent, nil) + if err == nil { + return fmt.Errorf("BigqueryReservationReservation still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/resource_bigquery_reservation_reservation_sweeper_test.go b/google/resource_bigquery_reservation_reservation_sweeper_test.go new file mode 100644 index 00000000000..4f256bb301c --- /dev/null +++ b/google/resource_bigquery_reservation_reservation_sweeper_test.go @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package google + +import ( + "context" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func init() { + resource.AddTestSweepers("BigqueryReservationReservation", &resource.Sweeper{ + Name: "BigqueryReservationReservation", + F: testSweepBigqueryReservationReservation, + }) +} + +// At the time of writing, the CI only passes us-central1 as the region +func testSweepBigqueryReservationReservation(region string) error { + resourceName := "BigqueryReservationReservation" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + config, err := sharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + return err + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + return err + } + + t := &testing.T{} + billingId := getTestBillingAccountFromEnv(t) + + // Setup variables to replace in list template + d := &ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": config.Project, + "region": region, + "location": region, + "zone": "-", + "billing_account": billingId, + }, + } + + listTemplate := strings.Split("https://bigqueryreservation.googleapis.com/v1/projects/{{project}}/locations/{{location}}/reservations", "?")[0] + listUrl, err := replaceVars(d, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + return nil + } + + res, err := sendRequest(config, "GET", config.Project, listUrl, config.userAgent, nil) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + return nil + } + + resourceList, ok := res["reservations"] + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Nothing found in response.") + return nil + } + + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj := ri.(map[string]interface{}) + if obj["name"] == nil { + log.Printf("[INFO][SWEEPER_LOG] %s resource name was nil", resourceName) + return nil + } + + name := GetResourceNameFromSelfLink(obj["name"].(string)) + // Skip resources that shouldn't be sweeped + if !isSweepableTestResource(name) { + nonPrefixCount++ + continue + } + + deleteTemplate := "https://bigqueryreservation.googleapis.com/v1/projects/{{project}}/locations/{{location}}/reservations/{{name}}" + deleteUrl, err := replaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + return nil + } + deleteUrl = deleteUrl + name + + // Don't wait on operations as we may have a lot to delete + _, err = sendRequest(config, "DELETE", config.Project, deleteUrl, config.userAgent, nil) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", deleteUrl, err) + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + } + + if nonPrefixCount > 0 { + log.Printf("[INFO][SWEEPER_LOG] %d items were non-sweepable and skipped.", nonPrefixCount) + } + + return nil +} diff --git a/website/docs/r/bigquery_reservation.html.markdown b/website/docs/r/bigquery_reservation.html.markdown index 1c56045724f..2eaae3b01b2 100644 --- a/website/docs/r/bigquery_reservation.html.markdown +++ b/website/docs/r/bigquery_reservation.html.markdown @@ -24,8 +24,6 @@ description: |- A reservation is a mechanism used to guarantee BigQuery slots to users. -~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. -See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. To get more information about Reservation, see: @@ -43,7 +41,6 @@ To get more information about Reservation, see: ```hcl resource "google_bigquery_reservation" "reservation" { - provider = google-beta name = "reservation" location = "asia-northeast1" // Set to 0 for testing purposes