Skip to content

Commit

Permalink
fix ExactlyOneOf
Browse files Browse the repository at this point in the history
  • Loading branch information
eraac authored and slevenick committed Dec 22, 2020
1 parent 99c9fe7 commit a98e7fe
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions third_party/terraform/resources/resource_bigtable_gc_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,25 @@ func resourceBigtableGCPolicy() *schema.Resource {
},

"max_age": {
Type: schema.TypeList,
Optional: true,
ForceNew: true,
Description: `GC policy that applies to all cells older than the given age.`,
ExactlyOneOf: []string{"max_age.0.days", "max_age.0.duration"},
Type: schema.TypeList,
Optional: true,
ForceNew: true,
Description: `GC policy that applies to all cells older than the given age.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"days": {
Type: schema.TypeInt,
Optional: true,
Deprecated: "Deprecated in favor of duration",
Description: `Number of days before applying GC policy.`,
Type: schema.TypeInt,
Optional: true,
Deprecated: "Deprecated in favor of duration",
Description: `Number of days before applying GC policy.`,
ExactlyOneOf: []string{"max_age.0.days", "max_age.0.duration"},
},
"duration": {
Type: schema.TypeString,
Optional: true,
Description: `Duration before applying GC policy`,
ValidateFunc: validateDuration(),
ExactlyOneOf: []string{"max_age.0.days", "max_age.0.duration"},
},
},
},
Expand Down

0 comments on commit a98e7fe

Please sign in to comment.