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

Upstream Bigtable seconds #8081

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/4282.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
bigtable: added support for specifying `duration` for `bigtable_gc_policy` to allow durations shorter than a day
```
8 changes: 4 additions & 4 deletions google/resource_bigtable_gc_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func resourceBigtableGCPolicy() *schema.Resource {
Optional: true,
ForceNew: true,
Description: `GC policy that applies to all cells older than the given age.`,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"days": {
Expand Down Expand Up @@ -86,10 +87,9 @@ func resourceBigtableGCPolicy() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"number": {
Type: schema.TypeInt,
Required: true,
Description: `Number of version before applying the GC policy.`,
ValidateFunc: validation.IntAtLeast(1),
Type: schema.TypeInt,
Required: true,
Description: `Number of version before applying the GC policy.`,
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/bigtable_gc_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resource "google_bigtable_gc_policy" "policy" {
column_family = "name"

max_age {
duration = "168h" # 7 days
duration = "168h"
}
}
```
Expand Down Expand Up @@ -89,9 +89,9 @@ The following arguments are supported:

`max_age` supports the following arguments:

* `days` - (Deprecated) Number of days before applying GC policy.
* `days` - (Optional, Deprecated in favor of duration) Number of days before applying GC policy.

* `duration` - (Required) Duration before applying GC policy (ex. "8h"). This is required when `days` isn't set
* `duration` - (Optional) Duration before applying GC policy (ex. "8h"). This is required when `days` isn't set

-----

Expand Down