VM Autoscaling Group
vm_autoscaling_group
This is a module that supports creating, updating or destroying VM Autoscaling Groups
Example Syntax
Returned object
For more examples please check out the tests here.
NOTE: If you are using a versions 7.0.0 and up: modules can replace resources if certain set parameters differ from the results found in the API!
Parameters that can trigger a resource replacement:
datacenter
state: present
Available parameters for state present:
Name | Required | Description |
---|---|---|
max_replica_count int | True | The maximum value for the number of replicas for 'targetReplicaCount'. Must be >= 0 and <= 200. Will be enforced for both automatic and manual changes. |
min_replica_count int | True | The minimum value for the number of replicas for 'targetReplicaCount'. Must be >= 0 and <= 200. Will be enforced for both automatic and manual changes |
name str | True | The name of the VM Auto Scaling Group. This field must not be null or blank. |
datacenter str | True | The VMs for this VM Auto Scaling Description are created in this virtual data center. |
metric str | True | The metric that triggers the scaling actions. Metric values are checked at fixed intervals. Options: ['INSTANCE_CPU_UTILIZATION_AVERAGE', 'INSTANCE_NETWORK_IN_BYTES', 'INSTANCE_NETWORK_IN_PACKETS', 'INSTANCE_NETWORK_OUT_BYTES', 'INSTANCE_NETWORK_OUT_PACKETS'] |
range str | False | Specifies the time range for which the samples are to be aggregated. Must be >= 2 minutes. |
unit str | False | The units of the applied metric. 'TOTAL' can only be combined with 'INSTANCE_CPU_UTILIZATION_AVERAGE'. Options: ['PER_HOUR', 'PER_MINUTE', 'PER_SECOND', 'TOTAL'] |
scale_in_threshold int | True | The lower threshold for the value of the 'metric'. Used with the `less than` (<) operator. When this value is exceeded, a scale-in action is triggered, specified by the 'scaleInAction' property. The value must have a higher minimum delta to the 'scaleOutThreshold', depending on the 'metric', to avoid competing for actions at the same time. |
scale_out_threshold int | True | The upper threshold for the value of the 'metric'. Used with the 'greater than' (>) operator. A scale-out action is triggered when this value is exceeded, specified by the 'scaleOutAction' property. The value must have a lower minimum delta to the 'scaleInThreshold', depending on the metric, to avoid competing for actions simultaneously. If 'properties.policy.unit=TOTAL', a value >= 40 must be chosen. |
scale_in_action dict | True | Defines the action to be taken when the 'scaleInThreshold' is exceeded. Here, scaling is always about removing VMs associated with this VM Auto Scaling Group. By default, the termination policy is 'OLDEST_SERVER_FIRST' is effective. |
scale_out_action dict | True | Defines the action to be performed when the 'scaleOutThreshold' is exceeded. Here, scaling is always about adding new VMs to this VM Auto Scaling Group. |
nics list | False | The list of NICs associated with this replica. |
volumes list | False | List of volumes associated with this Replica. |
availability_zone str | False | The zone where the VMs are created. The availability zone is always automatically set to 'AUTO' for performance reasons. Even if you set another value, e.g. 'null', or leave it empty. |
cores str | True | The total number of cores for the VMs. |
cpu_family str | False | The CPU family for the VMs created with this configuration. If the value is 'null', the VM is created with the default CPU family for the assigned site. Options: ['AMD_OPTERON', 'INTEL_SKYLAKE', 'INTEL_XEON'] |
ram int | True | The size of the memory for the VMs in MB. The size must be in multiples of 256 MB, with a minimum of 256 MB; if you set 'ramHotPlug=TRUE', you must use at least 1024 MB. If you set the RAM size to more than 240 GB, 'ramHotPlug=FALSE' is fixed. |
do_not_replace bool | False | Boolean indicating if the resource should not be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a differentvalue to an immutable property. An error will be thrown instead Default: True |
api_url str | False | The Ionos API base URL. |
certificate_fingerprint str | False | The Ionos API certificate fingerprint. |
username str | False | The Ionos username. Overrides the IONOS_USERNAME environment variable. |
password str | False | The Ionos password. Overrides the IONOS_PASSWORD environment variable. |
token str | False | The Ionos token. Overrides the IONOS_TOKEN environment variable. |
wait bool | False | Wait for the resource to be created before returning. Default: True Options: [True, False] |
wait_timeout int | False | How long before wait gives up, in seconds. Default: 600 |
state str | False | Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update'] |
state: absent
Available parameters for state absent:
Name | Required | Description |
---|---|---|
vm_autoscaling_group str | True | The ID or name of an existing VM Autoscaling Group. |
api_url str | False | The Ionos API base URL. |
certificate_fingerprint str | False | The Ionos API certificate fingerprint. |
username str | False | The Ionos username. Overrides the IONOS_USERNAME environment variable. |
password str | False | The Ionos password. Overrides the IONOS_PASSWORD environment variable. |
token str | False | The Ionos token. Overrides the IONOS_TOKEN environment variable. |
wait bool | False | Wait for the resource to be created before returning. Default: True Options: [True, False] |
wait_timeout int | False | How long before wait gives up, in seconds. Default: 600 |
state str | False | Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update'] |
state: update
Available parameters for state update:
Name | Required | Description |
---|---|---|
max_replica_count int | False | The maximum value for the number of replicas for 'targetReplicaCount'. Must be >= 0 and <= 200. Will be enforced for both automatic and manual changes. |
min_replica_count int | False | The minimum value for the number of replicas for 'targetReplicaCount'. Must be >= 0 and <= 200. Will be enforced for both automatic and manual changes |
name str | False | The name of the VM Auto Scaling Group. This field must not be null or blank. |
datacenter str | False | The VMs for this VM Auto Scaling Description are created in this virtual data center. |
metric str | False | The metric that triggers the scaling actions. Metric values are checked at fixed intervals. Options: ['INSTANCE_CPU_UTILIZATION_AVERAGE', 'INSTANCE_NETWORK_IN_BYTES', 'INSTANCE_NETWORK_IN_PACKETS', 'INSTANCE_NETWORK_OUT_BYTES', 'INSTANCE_NETWORK_OUT_PACKETS'] |
range str | False | Specifies the time range for which the samples are to be aggregated. Must be >= 2 minutes. |
unit str | False | The units of the applied metric. 'TOTAL' can only be combined with 'INSTANCE_CPU_UTILIZATION_AVERAGE'. Options: ['PER_HOUR', 'PER_MINUTE', 'PER_SECOND', 'TOTAL'] |
scale_in_threshold int | False | The lower threshold for the value of the 'metric'. Used with the `less than` (<) operator. When this value is exceeded, a scale-in action is triggered, specified by the 'scaleInAction' property. The value must have a higher minimum delta to the 'scaleOutThreshold', depending on the 'metric', to avoid competing for actions at the same time. |
scale_out_threshold int | False | The upper threshold for the value of the 'metric'. Used with the 'greater than' (>) operator. A scale-out action is triggered when this value is exceeded, specified by the 'scaleOutAction' property. The value must have a lower minimum delta to the 'scaleInThreshold', depending on the metric, to avoid competing for actions simultaneously. If 'properties.policy.unit=TOTAL', a value >= 40 must be chosen. |
scale_in_action dict | False | Defines the action to be taken when the 'scaleInThreshold' is exceeded. Here, scaling is always about removing VMs associated with this VM Auto Scaling Group. By default, the termination policy is 'OLDEST_SERVER_FIRST' is effective. |
scale_out_action dict | False | Defines the action to be performed when the 'scaleOutThreshold' is exceeded. Here, scaling is always about adding new VMs to this VM Auto Scaling Group. |
nics list | False | The list of NICs associated with this replica. |
volumes list | False | List of volumes associated with this Replica. |
availability_zone str | False | The zone where the VMs are created. The availability zone is always automatically set to 'AUTO' for performance reasons. Even if you set another value, e.g. 'null', or leave it empty. |
cores str | False | The total number of cores for the VMs. |
cpu_family str | False | The CPU family for the VMs created with this configuration. If the value is 'null', the VM is created with the default CPU family for the assigned site. Options: ['AMD_OPTERON', 'INTEL_SKYLAKE', 'INTEL_XEON'] |
ram int | False | The size of the memory for the VMs in MB. The size must be in multiples of 256 MB, with a minimum of 256 MB; if you set 'ramHotPlug=TRUE', you must use at least 1024 MB. If you set the RAM size to more than 240 GB, 'ramHotPlug=FALSE' is fixed. |
vm_autoscaling_group str | True | The ID or name of an existing VM Autoscaling Group. |
do_not_replace bool | False | Boolean indicating if the resource should not be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a differentvalue to an immutable property. An error will be thrown instead Default: True |
api_url str | False | The Ionos API base URL. |
certificate_fingerprint str | False | The Ionos API certificate fingerprint. |
username str | False | The Ionos username. Overrides the IONOS_USERNAME environment variable. |
password str | False | The Ionos password. Overrides the IONOS_PASSWORD environment variable. |
token str | False | The Ionos token. Overrides the IONOS_TOKEN environment variable. |
wait bool | False | Wait for the resource to be created before returning. Default: True Options: [True, False] |
wait_timeout int | False | How long before wait gives up, in seconds. Default: 600 |
state str | False | Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update'] |
Last updated