Skip to content

Commit

Permalink
fix: Verify google_cloud_run_v2_{service,job} 'timeout' field with …
Browse files Browse the repository at this point in the history
…regex (#10611) (#18260)

[upstream:be365d7a2466aebe55fafcb2fa317ff60eb87b45]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored May 28, 2024
1 parent c8c391d commit 9a7bc21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions google/services/cloudrunv2/resource_cloud_run_v2_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ If omitted, a port number will be chosen and passed to the container through the
Description: `Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.`,
},
"timeout": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Type: schema.TypeString,
Computed: true,
Optional: true,
ValidateFunc: verify.ValidateRegexp(`^[0-9]+(?:\.[0-9]{1,9})?s$`),
Description: `Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".`,
Expand Down
7 changes: 4 additions & 3 deletions google/services/cloudrunv2/resource_cloud_run_v2_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,10 @@ All system labels in v1 now have a corresponding field in v2 RevisionTemplate.`,
Description: `Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity`,
},
"timeout": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Type: schema.TypeString,
Computed: true,
Optional: true,
ValidateFunc: verify.ValidateRegexp(`^[0-9]+(?:\.[0-9]{1,9})?s$`),
Description: `Max allowed time for an instance to respond to a request.
A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".`,
Expand Down

0 comments on commit 9a7bc21

Please sign in to comment.