Resource: aws_batch_scheduling_policy

Provides a Batch Scheduling Policy resource.

Example Usage

resource "aws_batch_scheduling_policy" "example" {
  name = "example"

  fair_share_policy {
    compute_reservation = 1
    share_decay_seconds = 3600

    share_distribution {
      share_identifier = "A1*"
      weight_factor    = 0.1
    }

    share_distribution {
      share_identifier = "A2"
      weight_factor    = 0.2
    }
  }

  tags = {
    "Name" = "Example Batch Scheduling Policy"
  }
}

Argument Reference

This resource supports the following arguments:

A fairshare_policy block supports the following arguments:

A share_distribution block supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Batch Scheduling Policy using the arn. For example:

import {
  to = aws_batch_scheduling_policy.test_policy
  id = "arn:aws:batch:us-east-1:123456789012:scheduling-policy/sample"
}

Using terraform import, import Batch Scheduling Policy using the arn. For example:

% terraform import aws_batch_scheduling_policy.test_policy arn:aws:batch:us-east-1:123456789012:scheduling-policy/sample