S3 buckets
You will select read and write buckets for data. Terraform will configure permissions.
Batch queue
Terraform will create a queue for compute jobs. You can specify some configuration parameters.
IAM users and roles
Terraform will create users and roles to configure AWS permissions.
Launch template
Terraform will create a launch template to configure compute instances.
Prerequisites
Steps
- Create a new directory for your Terraform configuration and navigate to it.
- Create a
main.tffile in your directory with the following contents:
Mantle Terraform Example
- Edit the
main.tffile to include:
- The AWS region you want to use (
<your-region>) - Your Mantle tenant ID (
<your-tenant-id>) - The S3 bucket where you want Mantle to store results and logs (
<your-read-write-bucket>) - At least one S3 bucket where you store data you want to use in Mantle (
["<your-read-bucket-1>", "<your-read-bucket-2>"]) - Any other settings you want to change (see variables below)
- Inside your Terraform directory, run
terraform initto download the necessary plugins. - Inside your Terraform directory, run
terraform applyto create the resources in your AWS account. - When the resources are created, you will see the outputs of the
terraform applycommand. These outputs will include the ARN of the IAM role that Mantle will use to access your resources.
Variables
The Terraform configuration has a few variables that you can set to customize the resources that are created.Basic
AWS region to set up resources in
Your AWS account ID (if using the example template above, this will be automatically populated)
Your tenant ID in Mantle (from the URL
<tenant>.app.mantlebio.com)S3 buckets
A list of buckets Mantle should have read access to (anywhere where you store data that needs to be processed)
The bucket Mantle should have read-write access to. This is where results and logs will be stored.
If
true, Terraform will attempt to create a new bucket for the read_write_bucket.
If false, it assumes it exists already and updates permissions accordingly.Batch queue
The maximum number of CPU the Batch queue can use at any given time. NOTE: Make sure this number is less than your accounts maximum.
The minimum number of CPU the Batch queue can use at any given time.
List of security groups to attach to the Batch queue. If not set, default AWS security groups are used.
List of subnets to attach to the Batch queue. If not set, default AWS subnets are used.