[Feature Request] [Terraform] Add `timeout` block support
- Dominant language
- Python
- Stars
- 888
- Forks
- 314
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
Several resources in the `aws-tf/aws-parallelcluster` provider are very often used with custom scripts to perform custom actions. These scripts, for perfectly valid business needs, can take considerable time to execute. When running via `pcluster`, this is not an issue. However, when trying to automate via Terraform's `aws-tf/aws-parallelcluster` provider, it's easy to hit the default 1 hour maximum timeout.
In my particular use case, I have to perform a very long compilation process during custom image creation, which means the creation stack takes around 60 minutes to complete. The Terraform `aws-parallelcluster_image` resource has a timeout of 60 minutes. Hence, sometimes Terraform succeeds, but sometimes it hits the clock limit and the resource ends up tainted, although the underlying CloudFormation stack kept going and the image built successfully.
A helpful solution, from the user perspective, would be to allow defining [`timeouts`](https://developer.hashicorp.com/terraform/plugin/framework/resources/timeouts#specifying-timeouts-in-configuration) blocks in resources which are expected to incur into long-running processes. By this I mean `aws-parallelcluster_cluster` and specially `aws-parallelcluster_image`.
Do you think it is sensible to try to add support for this?
Otherwise, what would be the recommended alternative besides managing images outside of Terraform (which would introduce a lot of friction for me)
Best regards,
Contributor guide
Assessment
This issue has not been assessed yet.