Skip to content

A Terraform AWS module to create an AWS Batch Compute Environment SPOT and EC2, and given examples to create AWS Batch Job Queue, Jobs and ECR

License

Notifications You must be signed in to change notification settings

prunux/terraform-aws-module-batch-ce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Batch Environment with Spot or EC2 instances

This module creates an AWS Batch Environment with Spot or EC2 Instances.

Minimal Example

Create an AWS Batch Compute Environment:

module "my-aws-batch-compute-environment" {
  source = "git::ssh://[email protected]/infra/terraform-aws-modules/batch.git?ref=v1.0.0"

  compute_environment_name = "my-aws-batch-compute-environment"

  compute_resources_instance_types = [
    "m5",
    "m4",
  ]

  compute_resources_bid_percentage = 20
  compute_resources_desired_vcpus  = 4
  compute_resources_max_vcpu       = 8
  compute_resources_min_vcpu       = 2
  
  compute_resources_security_group_ids = [ "${aws_security_group.sample.id}" ]
  compute_resources_subnet_ids         = [ "${aws_subnet.sample.id}" ]
  
  compute_resources_vpc_id = "${aws_vpc.sample.id}"

  compute_resources_type = "SPOT"

  type = "MANAGED"

  extra_tags = {
    "Environment" = "Dev",
    "Squad"       = "Ops"  
  }
}

Working Example

See Terraform files in the example folder

About

A Terraform AWS module to create an AWS Batch Compute Environment SPOT and EC2, and given examples to create AWS Batch Job Queue, Jobs and ECR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages