|
| 1 | +--- |
| 2 | +layout: "cloudstack" |
| 3 | +page_title: "CloudStack: cloudstack_autoscale_vm_profile" |
| 4 | +sidebar_current: "docs-cloudstack-data-source-autoscale-vm-profile" |
| 5 | +description: |- |
| 6 | + Gets information about a CloudStack autoscale VM profile. |
| 7 | +--- |
| 8 | + |
| 9 | +# cloudstack_autoscale_vm_profile |
| 10 | + |
| 11 | +Use this data source to get information about a CloudStack autoscale VM profile. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```hcl |
| 16 | +# Get VM profile by ID |
| 17 | +data "cloudstack_autoscale_vm_profile" "existing_profile" { |
| 18 | + id = "a596f7a2-95b8-4f0e-9f15-88f4091f18fe" |
| 19 | +} |
| 20 | +
|
| 21 | +# Get VM profile by filter |
| 22 | +data "cloudstack_autoscale_vm_profile" "web_profile" { |
| 23 | + filter { |
| 24 | + name = "service_offering" |
| 25 | + value = "Small Instance" |
| 26 | + } |
| 27 | +} |
| 28 | +
|
| 29 | +# Use in an autoscale VM group |
| 30 | +resource "cloudstack_autoscale_vm_group" "vm_group" { |
| 31 | + name = "web-autoscale" |
| 32 | + lbrule_id = cloudstack_loadbalancer_rule.lb.id |
| 33 | + min_members = 1 |
| 34 | + max_members = 5 |
| 35 | + vm_profile_id = data.cloudstack_autoscale_vm_profile.existing_profile.id |
| 36 | + |
| 37 | + scaleup_policy_ids = [cloudstack_autoscale_policy.scale_up.id] |
| 38 | + scaledown_policy_ids = [cloudstack_autoscale_policy.scale_down.id] |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +## Argument Reference |
| 43 | + |
| 44 | +The following arguments are supported: |
| 45 | + |
| 46 | +* `id` - (Optional) The ID of the autoscale VM profile. |
| 47 | + |
| 48 | +* `filter` - (Optional) One or more name/value pairs to filter off of. You can apply filters on any exported attributes. |
| 49 | + |
| 50 | +## Attributes Reference |
| 51 | + |
| 52 | +The following attributes are exported: |
| 53 | + |
| 54 | +* `id` - The autoscale VM profile ID. |
| 55 | + |
| 56 | +* `service_offering` - The service offering name or ID. |
| 57 | + |
| 58 | +* `template` - The template name or ID. |
| 59 | + |
| 60 | +* `zone` - The zone name or ID. |
| 61 | + |
| 62 | +* `destroy_vm_grace_period` - The grace period for VM destruction. |
| 63 | + |
| 64 | +* `counter_param_list` - Counter parameters for monitoring. |
| 65 | + |
| 66 | +* `user_data` - User data for VM initialization. |
| 67 | + |
| 68 | +* `user_data_details` - Additional user data details. |
| 69 | + |
| 70 | +* `account_name` - The account name that owns the profile. |
| 71 | + |
| 72 | +* `domain_id` - The domain ID where the profile exists. |
| 73 | + |
| 74 | +* `display` - Whether the profile is displayed to end users. |
| 75 | + |
| 76 | +* `other_deploy_params` - Additional deployment parameters. |
0 commit comments