Skip to content

Commit

Permalink
Add environment variables to 8,16,64G job defs. Fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Mar 9, 2021
1 parent 21ac6f3 commit 120f22b
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions terraform/batch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ resource "aws_batch_job_definition" "calcloud_8g" {
container_properties = <<CONTAINER_PROPERTIES
{
"command": ["Ref::command", "Ref::dataset", "Ref::input_path", "Ref::s3_output_path", "Ref::crds_config"],
"environment": [],
"environment": [
{"name": "AWSDPVER", "value": "${var.awsdpver}"},
{"name": "AWSYSVER", "value": "${var.awsysver}"},
{"name": "CSYS_VER", "value": "${var.csys_ver}"}
],
"image": "${aws_ecr_repository.caldp_ecr.repository_url}:${data.aws_ecr_image.caldp_latest.image_tag}",
"jobRoleArn": "${data.aws_ssm_parameter.batch_job_role.value}",
"mountPoints": [],
Expand Down Expand Up @@ -211,12 +215,16 @@ resource "aws_batch_job_definition" "calcloud_16g" {
container_properties = <<CONTAINER_PROPERTIES
{
"command": ["Ref::command", "Ref::dataset", "Ref::input_path", "Ref::s3_output_path", "Ref::crds_config"],
"environment": [],
"environment": [
{"name": "AWSDPVER", "value": "${var.awsdpver}"},
{"name": "AWSYSVER", "value": "${var.awsysver}"},
{"name": "CSYS_VER", "value": "${var.csys_ver}"}
],
"image": "${aws_ecr_repository.caldp_ecr.repository_url}:${data.aws_ecr_image.caldp_latest.image_tag}",
"jobRoleArn": "${data.aws_ssm_parameter.batch_job_role.value}",
"mountPoints": [],
"resourceRequirements": [
{"value": "${16*(1024-128)}", "type": "MEMORY"},
{"value": "${16*(1024-128)}", "type": "MEMORY"},
{"value": "8", "type": "VCPU"}
],
"ulimits": [],
Expand All @@ -241,12 +249,16 @@ resource "aws_batch_job_definition" "calcloud_64g" {
container_properties = <<CONTAINER_PROPERTIES
{
"command": ["Ref::command", "Ref::dataset", "Ref::input_path", "Ref::s3_output_path", "Ref::crds_config"],
"environment": [],
"environment": [
{"name": "AWSDPVER", "value": "${var.awsdpver}"},
{"name": "AWSYSVER", "value": "${var.awsysver}"},
{"name": "CSYS_VER", "value": "${var.csys_ver}"}
],
"image": "${aws_ecr_repository.caldp_ecr.repository_url}:${data.aws_ecr_image.caldp_latest.image_tag}",
"jobRoleArn": "${data.aws_ssm_parameter.batch_job_role.value}",
"mountPoints": [],
"resourceRequirements": [
{"value": "${64*(1024-128)}", "type": "MEMORY"},
{"value": "${64*(1024-128)}", "type": "MEMORY"},
{"value": "32", "type": "VCPU"}
],
"ulimits": [],
Expand Down

0 comments on commit 120f22b

Please sign in to comment.