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

About Cisco

Terraform

AMI 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}" } Note: Here tenant_url is the tenant URL For Example: <customer.batchly.net>/<customer.cmpute.io> Provides a batchly AMI group resource Example Usage # Create a batchly AMI group resource "batchly_aws_ami_group" "worker" { name = "app_name" account_resource_id = "A-XXXXXXX" region = "us-east-1" restrict_instance_type = true minOnDemandCount = 0 minCount = 1 maxCount = 2 desired = 2 instance_type = "m4. »

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}" } Note: Here tenant_url is the tenant URL 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. »

Elastic Beanstalk 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}" } Note: Here tenant_url is the tenant URL For Example: <customer.batchly.net>/<customer.cmpute.io> Provides a batchly EB group resource Example Usage #Create an batchly eb group resource "batchly_aws_eb_group" "workers" { name = "app_name" account_resource_id = "A-XXXXXXX" region = "us-east-1" eb_env_id = "e-xxxxxxxx" restrict_instance_type = true minOnDemandCount = 0 minCount = 1 desired = 2 maxCount = 2 health_grace_period = 300 replace_unhealthy_instances = false } Argument Reference name - (Required) Name of the asg job in batchly to be created. »

Hadoop 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}" } Note: Here tenant_url is the tenant URL For Example: <customer.batchly.net>/<customer.cmpute.io> Provides a batchly Hadoop group resource Example Usage # Create a batchly Hadoop group resource "batchly_aws_hadoop_group" "workers" { name = "app_name" account_resource_id = "A-XXXXXXX" region = "us-east-1" cluster_id = "cluster id" jar_location = "s3 location of jar" action_on_failure = "Continue" instanceTypes = ["c1. »

Install CMPUTE plugin

How to install CMPUTE plugin for Terraform In this post we will demonstrate how to create a cost-efficient Auto-Scaling in AWS using batchly Terraform plugin. This post assumes that you already have a batchly account, and that you have connected your AWS account with batchly . Download the binary file terraform-provider-batchly. Please download the proper binary file for your operating system and architecture and put it somewhere on your filesystem: »

Terraform - Batchly Provider

The batchly provider is used to interact with the resources supported by batchly. The provider needs to be configured with the proper credentials before it can be used. Example Usage Configure the batchly Provider provider "batchly" { tenant_url = "${var.tenant_url}" api_key = "${var.api_key}" secret_key = "${var.secret_key}" } Create an AWS Group provider "batchly" { resource "batchly_aws_asg_group" "workers" { ... } } Argument Reference The following arguments are supported: »