Cmpute.io is now a part of Cisco. Learn More

About Cisco

ASG Group Resource

Create a new Terraform template

Configure the batchly provider

                provider "batchly" 
                {
                    tenant_url = "${var.tenant_url}"
                    api_key = "${var.api_key}"
                    secret_key = "${var.secret_key}" 
                }

For Example: <customer.cmpute.net>/<customer.cmpute.io>

Provides a batchly ASG group resource

Example Usage

                #Create a batchly ASG Group

                resource "batchly_aws_asg_group" "workers" 
                {
                    name = "app_name"
                    account_resource_id = "A-XXXXXXX"
                    region = "us-east-1"
                    asg_name = "asg_name"
                    restrict_instance_type = true
                    minOnDemandCount = 1
                    replace_unhealthy_instances = true
                    restore_on_stop = true
                }

Argument Reference

  • name - (Required) Name of the asg job in batchly to be created.

  • region - (Required) aws region.

  • account_resource_id - (Required) The resource id created while adding an account in batchly.

  • asg_name - (Required) autoscaling group to be attached to job.

  • restrict_instance_type - (Required) To restrict the instance type as specified in the launch configuration of the asg used.

  • minOnDemandCount - (Required) The minimum number of on demand instances the group should have at any time.

  • replace_unhealthy_instances - (Required) To replace the unhealthy instances behind elb’s or not.

  • restore_on_stop - (Required) Should asg be restored to its initial state or not after job termination.

  • suspend_scaling_operations - (Optional) Suspend the scaling on an autoscaling group