--- page_title: "ona_warm_pool Resource - ona" subcategory: "Projects" description: |- Ona warm pool. A warm pool keeps pre-created environments available for one project and environment class. The project must have prebuilds enabled for the environment class before the warm pool can be created. --- # ona_warm_pool (Resource) Ona warm pool. A warm pool keeps pre-created environments available for one project and environment class. The project must have prebuilds enabled for the environment class before the warm pool can be created. For product context, see [Warm Pools](https://ona.com/docs/ona/projects/warm-pools) and [Prebuilds](https://ona.com/docs/ona/projects/prebuilds). ## Example Usage ```terraform resource "ona_project" "api" { name = "acme-api" repository_clone_url = "https://github.com/acme/api.git" branch = "main" environment_class { environment_class_id = ona_environment_class.large.id order = 0 } prebuild_configuration { enabled = true environment_class_ids = [ona_environment_class.large.id] timeout = "1h" daily_schedule { hour_utc = 5 } } } resource "ona_warm_pool" "api_large" { project_id = ona_project.api.id environment_class_id = ona_environment_class.large.id min_size = 0 max_size = 5 } ``` ## Schema ### Required - `environment_class_id` (String) Environment class ID whose instances are warmed. - `project_id` (String) Project ID this warm pool belongs to. ### Optional - `max_size` (Number) Maximum number of warm instances to maintain. Must be between 1 and 20 and no smaller than `min_size`. - `min_size` (Number) Minimum number of warm instances to maintain. Must be between 0 and 20 and no larger than `max_size`. ### Read-Only - `created_at` (String) Time when the warm pool was created. - `id` (String) Warm pool ID. Use this value as the Terraform import ID. ## Import Import is supported using the following syntax: The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell #!/usr/bin/env sh terraform import ona_warm_pool.api_large 00000000-0000-0000-0000-000000000000 ```