|
| 1 | +--- |
| 2 | +page_title: "cloudstack_service_offering_constrained Resource" |
| 3 | +description: |- |
| 4 | + Provides a CloudStack Constrained Service Offering resource. This allows you to create and manage constrained compute offerings in CloudStack. |
| 5 | +--- |
| 6 | + |
| 7 | +# cloudstack_service_offering_constrained |
| 8 | + |
| 9 | +Provides a CloudStack Constrained Service Offering resource. This resource allows you to create and manage service offerings with constrained CPU and memory parameters. |
| 10 | + |
| 11 | +## Example Usage |
| 12 | + |
| 13 | +```hcl |
| 14 | +resource "cloudstack_service_offering_constrained" "example" { |
| 15 | + display_text = "Example Constrained Offering" |
| 16 | + name = "example_constrained" |
| 17 | +
|
| 18 | + cpu_speed = 2500 |
| 19 | + max_cpu_number = 10 |
| 20 | + min_cpu_number = 2 |
| 21 | + max_memory = 4096 |
| 22 | + min_memory = 1024 |
| 23 | +
|
| 24 | + host_tags = "tag1,tag2" |
| 25 | + network_rate = 1024 |
| 26 | + deployment_planner = "UserDispersingPlanner" |
| 27 | +
|
| 28 | + dynamic_scaling_enabled = false |
| 29 | + is_volatile = false |
| 30 | + limit_cpu_use = false |
| 31 | + offer_ha = false |
| 32 | + zone_ids = ["zone-uuid"] |
| 33 | +
|
| 34 | + disk_offering { |
| 35 | + cache_mode = "none" |
| 36 | + disk_offering_strictness = true |
| 37 | + provisioning_type = "thin" |
| 38 | + storage_type = "local" |
| 39 | + } |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +## Argument Reference |
| 44 | + |
| 45 | +The following arguments are supported: |
| 46 | + |
| 47 | +- `display_text` (String, Required) - The display text of the service offering. |
| 48 | +- `name` (String, Required) - The name of the service offering. |
| 49 | +- `cpu_speed` (Int, Required) - CPU speed in MHz. |
| 50 | +- `max_cpu_number` (Int, Required) - Maximum number of CPUs. |
| 51 | +- `min_cpu_number` (Int, Required) - Minimum number of CPUs. |
| 52 | +- `max_memory` (Int, Required) - Maximum memory in MB. |
| 53 | +- `min_memory` (Int, Required) - Minimum memory in MB. |
| 54 | +- `deployment_planner` (String, Optional) - The deployment planner for the service offering. |
| 55 | +- `disk_offering_id` (String, Optional) - The ID of the disk offering. |
| 56 | +- `domain_ids` (Set of String, Optional) - The ID(s) of the containing domain(s), null for public offerings. |
| 57 | +- `dynamic_scaling_enabled` (Bool, Optional, Default: false) - Enable dynamic scaling of the service offering. |
| 58 | +- `host_tags` (String, Optional) - The host tag for this service offering. |
| 59 | +- `is_volatile` (Bool, Optional, Default: false) - Service offering is volatile. |
| 60 | +- `limit_cpu_use` (Bool, Optional, Default: false) - Restrict the CPU usage to committed service offering. |
| 61 | +- `network_rate` (Int, Optional) - Data transfer rate in megabits per second. |
| 62 | +- `offer_ha` (Bool, Optional, Default: false) - Enable HA for the service offering. |
| 63 | +- `zone_ids` (Set of String, Optional) - The ID(s) of the zone(s). |
| 64 | + |
| 65 | +### Nested Blocks |
| 66 | + |
| 67 | +#### `disk_offering` (Block, Optional) |
| 68 | + |
| 69 | +- `cache_mode` (String, Required) - The cache mode to use for this disk offering. One of `none`, `writeback`, or `writethrough`. |
| 70 | +- `disk_offering_strictness` (Bool, Required) - True/False to indicate the strictness of the disk offering association with the compute offering. |
| 71 | +- `provisioning_type` (String, Required) - Provisioning type used to create volumes. Valid values are `thin`, `sparse`, `fat`. |
| 72 | +- `root_disk_size` (Int, Optional) - The root disk size in GB. |
| 73 | +- `storage_type` (String, Required) - The storage type of the service offering. Values are `local` and `shared`. |
| 74 | +- `storage_tags` (String, Optional) - The tags for the service offering. |
| 75 | + |
| 76 | +#### `disk_hypervisor` (Block, Optional) |
| 77 | + |
| 78 | +- `bytes_read_rate` (Int, Required) - IO requests read rate of the disk offering. |
| 79 | +- `bytes_read_rate_max` (Int, Required) - Burst requests read rate of the disk offering. |
| 80 | +- `bytes_read_rate_max_length` (Int, Required) - Length (in seconds) of the burst. |
| 81 | +- `bytes_write_rate` (Int, Required) - IO requests write rate of the disk offering. |
| 82 | +- `bytes_write_rate_max` (Int, Required) - Burst IO requests write rate of the disk offering. |
| 83 | +- `bytes_write_rate_max_length` (Int, Required) - Length (in seconds) of the burst. |
| 84 | + |
| 85 | +#### `disk_storage` (Block, Optional) |
| 86 | + |
| 87 | +- `customized_iops` (Bool, Optional) - True if disk offering uses custom IOPS, false otherwise. |
| 88 | +- `hypervisor_snapshot_reserve` (Int, Optional) - Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware). |
| 89 | +- `max_iops` (Int, Optional) - Max IOPS of the compute offering. |
| 90 | +- `min_iops` (Int, Optional) - Min IOPS of the compute offering. |
| 91 | + |
| 92 | +## Attributes Reference |
| 93 | + |
| 94 | +In addition to the arguments above, the following attributes are exported: |
| 95 | + |
| 96 | +- `id` - The UUID of the service offering. |
0 commit comments