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
#}
}