AWS FSX Lustre question

I am learning about FSX Lustre filesystem. I have the following tf script but I get a SCRATCH_1 error

Error: Error creating FSx Lustre filesystem: BadRequest: The requested Lustre configuration: SCRATCH_1 is not available in this region.

I have tried us-west and ca-central, both gives me the same error. The script validate fine with terarform.

provider "aws" {
  region  = "ca-central-1"
}

resource "aws_vpc" "vpc" {
  cidr_block           = "10.0.0.0/16"
  enable_dns_support   = true
  enable_dns_hostnames = true
  tags = {
    Name  = "nicholas_vpc"
    owner = "nicholas"
  }
}

resource "aws_internet_gateway" "igw" {
  vpc_id = aws_vpc.vpc.id
  tags = {
    Name  = "nicholas_igw"
    owner = "nicholas"
  }
}

resource "aws_subnet" "subnet_public" {
  vpc_id                  = aws_vpc.vpc.id
  cidr_block              = "10.0.0.0/16"
  map_public_ip_on_launch = true
  availability_zone       = "ca-central-1a"
  tags = {
    Name  = "nicholas_subnet"
    owner = "nicholas"
  }
}


resource "aws_security_group" "sg_lustre" {
  name   = "nicholas_sg_lustre"
  vpc_id = aws_vpc.vpc.id
  ingress {
    from_port   = 988
    to_port     = 988
    protocol    = "tcp"
    cidr_blocks = [aws_vpc.vpc.cidr_block]
  }
  ingress {
    from_port   = 1021
    to_port     = 1023
    protocol    = "tcp"
    cidr_blocks = [aws_vpc.vpc.cidr_block]
  }
  tags = {
    Name  = "nicholas_sg_lustre"
    owner = "nicholas"
  }
}

resource "aws_fsx_lustre_file_system" "lustre" {
  storage_capacity              = 1200
  subnet_ids                    = [aws_subnet.subnet_public.id]
  security_group_ids            = [aws_security_group.sg_lustre.id]
  #import_path                   = var.inputs_prefix != "" ? "s3://${var.s3bucket}/${var.inputs_prefix}" : "s3://${var.s3bucket}"
  #export_path                   = var.outputs_prefix != "" ? "s3://${var.s3bucket}/${var.outputs_prefix}" : "s3://${var.s3bucket}"
  #weekly_maintenance_start_time = var.lustre_weekly_maintenance_start_time
  #auto_import_policy            = var.lustre_auto_import_policy

  #tags = {
  #  Name  = "${var.name_tag_prefix}_lustre"
  #  owner = var.owner_tag
  #}
}

This is an error from the AWS API call made by Terraform. Looks like the default value for deployment type is not supported in the region you tried. Happens often with AWS that some region do not have all the service features and options as they are rolled out progressively.

Looking at the resource definition in the Terraform docs, you should probably try SCRATCH_2 or another region (tier 1 region like us-east-1 or eu-west-1 generally have all options).

deployment_type - (Optional) - The filesystem deployment type. One of: SCRATCH_1 , SCRATCH_2 , PERSISTENT_1 .

I was not able to find a list of supported deployment type per AWS region. If they are supposed to be supported in all region, this might be a Terraform AWS provider bug. Someone with access to AWS support to ask the question?

Thanks for that, I will try SCRATCH_2

I have been reading up on it here