Skip to content

Commit b5ab66b

Browse files
Empty reservations must ignore empty (#3541) (#2089)
Signed-off-by: Modular Magician <[email protected]>
1 parent 4a60e18 commit b5ab66b

File tree

4 files changed

+5
-24
lines changed

4 files changed

+5
-24
lines changed

.changelog/3541.txt

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

google-beta/resource_bigquery_reservation_reservation_generated_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ resource "google_bigquery_reservation" "reservation" {
5151
// Set to 0 for testing purposes
5252
// In reality this would be larger than zero
5353
slot_capacity = 0
54-
ignore_idle_slots = true
54+
ignore_idle_slots = false
5555
}
5656
`, context)
5757
}

google-beta/resource_bigquery_reservation_test.go

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
77
)
88

9-
func TestAccBigqueryReservationReservation_bigqueryReservationUpdate(t *testing.T) {
9+
func TestAccBigqueryReservationReservation_bigqueryReservation(t *testing.T) {
1010
t.Parallel()
1111

1212
location := "asia-northeast1"
@@ -28,33 +28,12 @@ func TestAccBigqueryReservationReservation_bigqueryReservationUpdate(t *testing.
2828
ImportState: true,
2929
ImportStateVerify: true,
3030
},
31-
{
32-
Config: testAccBigqueryReservationReservation_bigqueryReservationUpdate(context),
33-
},
34-
{
35-
ResourceName: "google_bigquery_reservation.reservation",
36-
ImportState: true,
37-
ImportStateVerify: true,
38-
},
3931
},
4032
})
4133
}
4234

4335
func testAccBigqueryReservationReservation_bigqueryReservationBasic(context map[string]interface{}) string {
4436
return Nprintf(`
45-
resource "google_bigquery_reservation" "reservation" {
46-
name = "reservation%{random_suffix}"
47-
location = "%{location}"
48-
// Set to 0 for testing purposes
49-
// In reality this would be larger than zero
50-
slot_capacity = 0
51-
ignore_idle_slots = true
52-
}
53-
`, context)
54-
}
55-
56-
func testAccBigqueryReservationReservation_bigqueryReservationUpdate(context map[string]interface{}) string {
57-
return Nprintf(`
5837
resource "google_bigquery_reservation" "reservation" {
5938
name = "reservation%{random_suffix}"
6039
location = "%{location}"

website/docs/r/bigquery_reservation.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ resource "google_bigquery_reservation" "reservation" {
4949
// Set to 0 for testing purposes
5050
// In reality this would be larger than zero
5151
slot_capacity = 0
52-
ignore_idle_slots = true
52+
ignore_idle_slots = false
5353
}
5454
```
5555

0 commit comments

Comments
 (0)