AWS BatchをTerraformで構築するときのimage_typeに指定できる値
謎だったのですが、ECS_AL2 か ECS_AL2_NVIDIA のようでした。
(Web Consoleから作成した後にJSONを確認したところ)
resource "aws_batch_compute_environment" "sample" {
compute_environment_name = "sample"
compute_resources {
instance_role = aws_iam_instance_profile.ecs_instance_role.arn
instance_type = [
"c4.large",
]
max_vcpus = 16
min_vcpus = 0
security_group_ids = [
aws_security_group.sample.id,
]
subnets = [
aws_subnet.sample.id,
]
type = "EC2"
ec2_configuration {
image_type = "ECS_AL2 or ECS_AL2_NVIDIA"
}
}
service_role = aws_iam_role.aws_batch_service_role.arn
type = "MANAGED"
depends_on = [aws_iam_role_policy_attachment.aws_batch_service_role]
}