Skip to content

Commit

Permalink
Enhanced documentation and property dependency for quota in `google…
Browse files Browse the repository at this point in the history
…_identity_platform_config` (#12315) (#8869)

[upstream:0b617ed01a5c89bc49592999607ef0141d63043b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Dec 9, 2024
1 parent efdc2b6 commit 03ffb7a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .changelog/12315.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
identityplatform: marked `quota.0.sign_up_quota_config` subfields conditionally required in `google_identity_platform_config` to move errors from apply time up to plan time, and clarified the rule in documentation
```
Original file line number Diff line number Diff line change
Expand Up @@ -286,24 +286,27 @@ If the value is not set, the tenant will be created under the same organization
"sign_up_quota_config": {
Type: schema.TypeList,
Optional: true,
Description: `Quota for the Signup endpoint, if overwritten. Signup quota is measured in sign ups per project per hour per IP.`,
Description: `Quota for the Signup endpoint, if overwritten. Signup quota is measured in sign ups per project per hour per IP. None of quota, startTime, or quotaDuration can be skipped.`,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"quota": {
Type: schema.TypeInt,
Optional: true,
Description: `A sign up APIs quota that customers can override temporarily.`,
Type: schema.TypeInt,
Optional: true,
Description: `A sign up APIs quota that customers can override temporarily. Value can be in between 1 and 1000.`,
RequiredWith: []string{"quota.0.sign_up_quota_config.0.start_time", "quota.0.sign_up_quota_config.0.quota_duration"},
},
"quota_duration": {
Type: schema.TypeString,
Optional: true,
Description: `How long this quota will be active for. It is measurred in seconds, e.g., Example: "9.615s".`,
Type: schema.TypeString,
Optional: true,
Description: `How long this quota will be active for. It is measurred in seconds, e.g., Example: "9.615s".`,
RequiredWith: []string{"quota.0.sign_up_quota_config.0.start_time", "quota.0.sign_up_quota_config.0.quota"},
},
"start_time": {
Type: schema.TypeString,
Optional: true,
Description: `When this quota will take affect.`,
Type: schema.TypeString,
Optional: true,
Description: `When this quota will take affect.`,
RequiredWith: []string{"quota.0.sign_up_quota_config.0.quota", "quota.0.sign_up_quota_config.0.quota_duration"},
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/identity_platform_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ resource "google_identity_platform_config" "default" {
quota {
sign_up_quota_config {
quota = 1000
start_time = ""
start_time = "2014-10-02T15:01:23Z"
quota_duration = "7200s"
}
}
Expand Down Expand Up @@ -293,15 +293,15 @@ The following arguments are supported:

* `sign_up_quota_config` -
(Optional)
Quota for the Signup endpoint, if overwritten. Signup quota is measured in sign ups per project per hour per IP.
Quota for the Signup endpoint, if overwritten. Signup quota is measured in sign ups per project per hour per IP. None of quota, startTime, or quotaDuration can be skipped.
Structure is [documented below](#nested_sign_up_quota_config).


<a name="nested_sign_up_quota_config"></a>The `sign_up_quota_config` block supports:

* `quota` -
(Optional)
A sign up APIs quota that customers can override temporarily.
A sign up APIs quota that customers can override temporarily. Value can be in between 1 and 1000.

* `start_time` -
(Optional)
Expand Down

0 comments on commit 03ffb7a

Please sign in to comment.