|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "astra_pcu_group Resource - terraform-provider-astra" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Creates and manages a PCU (Provisioned Capacity Units) group. PCU groups provide dedicated compute capacity for databases in a specific cloud provider and region. |
| 7 | +--- |
| 8 | + |
| 9 | +# astra_pcu_group (Resource) |
| 10 | + |
| 11 | +Creates and manages a PCU (Provisioned Capacity Units) group. PCU groups provide dedicated compute capacity for databases in a specific cloud provider and region. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +# Create a basic PCU group |
| 17 | +# NOTE: This creates a committed reserved-capacity group! Make sure this is what you want! |
| 18 | +resource "astra_pcu_group" "example" { |
| 19 | + title = "production-pcu-group" |
| 20 | + cloud_provider = "AWS" |
| 21 | + region = "us-east-1" |
| 22 | + min_capacity = 2 |
| 23 | + max_capacity = 10 |
| 24 | + reserved_capacity = 2 |
| 25 | + description = "PCU group for production databases" |
| 26 | + # You can uncomment the line below to park the group |
| 27 | + # The group must be created first as a resource before parking can be performed successfully |
| 28 | + # parked = true |
| 29 | +} |
| 30 | +
|
| 31 | +# Create a PCU group with custom settings |
| 32 | +resource "astra_pcu_group" "custom" { |
| 33 | + title = "dev-pcu-group" |
| 34 | + cloud_provider = "GCP" |
| 35 | + region = "us-central1" |
| 36 | + cache_type = "STANDARD" |
| 37 | + provision_type = "SHARED" |
| 38 | + min_capacity = 1 |
| 39 | + max_capacity = 5 |
| 40 | + description = "PCU group for development environment" |
| 41 | +
|
| 42 | + # Disable deletion protection for dev environment |
| 43 | + deletion_protection = false |
| 44 | +
|
| 45 | + # Enable reserved capacity protection |
| 46 | + reserved_protection = true |
| 47 | +} |
| 48 | +
|
| 49 | +output "pcu_group_id" { |
| 50 | + value = astra_pcu_group.example.id |
| 51 | +} |
| 52 | +
|
| 53 | +output "pcu_group_status" { |
| 54 | + value = astra_pcu_group.example.status |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +<!-- schema generated by tfplugindocs --> |
| 59 | +## Schema |
| 60 | + |
| 61 | +### Required |
| 62 | + |
| 63 | +- `cloud_provider` (String) The cloud provider where the PCU group will be provisioned (e.g., AWS, GCP, AZURE). This cannot be changed after creation. |
| 64 | +- `max_capacity` (Number) The maximum capacity units the PCU group may scale to. Must be at least 1 and greater than or equal to min_capacity. |
| 65 | +- `min_capacity` (Number) The minimum capacity units the PCU must be scaled to. Must be at least 1 and greater than or equal to reserved_capacity. |
| 66 | +- `region` (String) The cloud region where the PCU group will be provisioned. This cannot be changed after creation. |
| 67 | +- `title` (String) The user-defined title/name of the PCU group. |
| 68 | + |
| 69 | +### Optional |
| 70 | + |
| 71 | +- `cache_type` (String) The instance type/cache type for the PCU group. Defaults to 'STANDARD'. Changing this value requires replacement. |
| 72 | +- `deletion_protection` (Boolean) When enabled, prevents accidental deletion of the PCU group. Defaults to true. |
| 73 | +- `description` (String) A user-defined description for the PCU group. |
| 74 | +- `park` (Boolean) When set to true, parks the PCU group and any associated databases, reducing costs. When set to false, unparks the group. Defaults to false. |
| 75 | +- `provision_type` (String) The provisioning type for the PCU group (e.g., SHARED, DEDICATED). Defaults to 'SHARED'. Changing this value requires replacement. |
| 76 | +- `reserved_capacity` (Number) The reserved (committed) capacity units for the PCU group. Must be at least 0. Changing this value when reserved_protection is enabled will result in an error. |
| 77 | +- `reserved_protection` (Boolean) When enabled, prevents accidental reserved capacity unit increases. Defaults to true. |
| 78 | +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) |
| 79 | + |
| 80 | +### Read-Only |
| 81 | + |
| 82 | +- `created_at` (String) Timestamp when the PCU group was created. |
| 83 | +- `created_by` (String) The user who created the PCU group. |
| 84 | +- `id` (String) The unique identifier of the PCU group. |
| 85 | +- `org_id` (String) The organization ID that owns this PCU group. |
| 86 | +- `status` (String) The current status of the PCU group (e.g., ACTIVE, PARKED, CREATING, TERMINATING). |
| 87 | +- `updated_at` (String) Timestamp when the PCU group was last updated. |
| 88 | +- `updated_by` (String) The user who last updated the PCU group. |
| 89 | + |
| 90 | +<a id="nestedblock--timeouts"></a> |
| 91 | +### Nested Schema for `timeouts` |
| 92 | + |
| 93 | +Optional: |
| 94 | + |
| 95 | +- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). |
| 96 | +- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). |
| 97 | + |
| 98 | +## Import |
| 99 | + |
| 100 | +Import is supported using the following syntax: |
| 101 | + |
| 102 | +```shell |
| 103 | +# Import an existing PCU group by its ID |
| 104 | +terraform import astra_pcu_group.example 6c57916e-7bd8-4bb6-b264-bae906c8859f |
| 105 | +``` |
0 commit comments