A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources with infrastructure-as-code.
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Amazon FSx provides fully managed third-party file systems (Lustre, Windows File Server, NetApp ONTAP, OpenZFS).
import * as aws from "@pulumi/aws";
const lustre = new aws.fsx.LustreFileSystem("hpc-storage", {
storageCapacity: 1200,
subnetIds: [subnet.id],
deploymentType: "PERSISTENT_1",
perUnitStorageThroughput: 200,
tags: { Name: "hpc-lustre" },
});import * as aws from "@pulumi/aws";
const windows = new aws.fsx.WindowsFileSystem("file-server", {
storageCapacity: 300,
subnetIds: [subnet.id],
throughputCapacity: 16,
activeDirectoryId: ad.id,
tags: { Name: "windows-fs" },
});import * as aws from "@pulumi/aws";
const ontap = new aws.fsx.OntapFileSystem("ontap-storage", {
storageCapacity: 1024,
subnetIds: [subnet1.id, subnet2.id],
deploymentType: "MULTI_AZ_1",
throughputCapacity: 256,
preferredSubnetId: subnet1.id,
tags: { Name: "ontap-fs" },
});FSx supports multiple file system types:
High-performance parallel file system optimized for compute-intensive workloads.
class LustreFileSystem extends pulumi.CustomResource {
constructor(name: string, args: LustreFileSystemArgs, opts?: pulumi.CustomResourceOptions);
readonly arn: pulumi.Output<string>;
readonly dnsName: pulumi.Output<string>;
readonly id: pulumi.Output<string>;
}
interface LustreFileSystemArgs {
storageCapacity: pulumi.Input<number>;
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
deploymentType?: pulumi.Input<"SCRATCH_1" | "SCRATCH_2" | "PERSISTENT_1" | "PERSISTENT_2">;
perUnitStorageThroughput?: pulumi.Input<number>;
importPath?: pulumi.Input<string>; // S3 bucket path
exportPath?: pulumi.Input<string>; // S3 bucket path
autoImportPolicy?: pulumi.Input<"NONE" | "NEW" | "NEW_CHANGED" | "NEW_CHANGED_DELETED">;
storageType?: pulumi.Input<"SSD" | "HDD">;
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}Example: Lustre with S3 integration
const lustre = new aws.fsx.LustreFileSystem("ml-training", {
storageCapacity: 2400,
subnetIds: [subnet.id],
deploymentType: "PERSISTENT_1",
perUnitStorageThroughput: 200,
importPath: `s3://${dataBucket.bucket}/training-data`,
exportPath: `s3://${dataBucket.bucket}/results`,
autoImportPolicy: "NEW_CHANGED",
storageType: "SSD",
tags: {
Name: "ml-training-storage",
Purpose: "machine-learning"
},
});Fully managed Windows file server with SMB protocol support.
class WindowsFileSystem extends pulumi.CustomResource {
constructor(name: string, args: WindowsFileSystemArgs, opts?: pulumi.CustomResourceOptions);
readonly arn: pulumi.Output<string>;
readonly dnsName: pulumi.Output<string>;
readonly id: pulumi.Output<string>;
}
interface WindowsFileSystemArgs {
storageCapacity: pulumi.Input<number>;
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
throughputCapacity: pulumi.Input<number>;
activeDirectoryId?: pulumi.Input<string>;
selfManagedActiveDirectory?: pulumi.Input<SelfManagedActiveDirectory>;
deploymentType?: pulumi.Input<"SINGLE_AZ_1" | "SINGLE_AZ_2" | "MULTI_AZ_1">;
preferredSubnetId?: pulumi.Input<string>;
automaticBackupRetentionDays?: pulumi.Input<number>;
dailyAutomaticBackupStartTime?: pulumi.Input<string>;
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}Example: Windows file server with Active Directory
const windowsFs = new aws.fsx.WindowsFileSystem("corp-files", {
storageCapacity: 1000,
subnetIds: [subnet1.id, subnet2.id],
throughputCapacity: 32,
activeDirectoryId: managedAd.id,
deploymentType: "MULTI_AZ_1",
preferredSubnetId: subnet1.id,
automaticBackupRetentionDays: 30,
dailyAutomaticBackupStartTime: "03:00",
securityGroupIds: [fsSg.id],
tags: {
Name: "corporate-file-server",
Environment: "production"
},
});NetApp ONTAP file system with multi-protocol support (NFS, SMB, iSCSI).
class OntapFileSystem extends pulumi.CustomResource {
constructor(name: string, args: OntapFileSystemArgs, opts?: pulumi.CustomResourceOptions);
readonly arn: pulumi.Output<string>;
readonly id: pulumi.Output<string>;
readonly endpoints: pulumi.Output<OntapFileSystemEndpoints>;
}
interface OntapFileSystemArgs {
storageCapacity: pulumi.Input<number>;
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
deploymentType: pulumi.Input<"SINGLE_AZ_1" | "MULTI_AZ_1">;
throughputCapacity: pulumi.Input<number>;
preferredSubnetId: pulumi.Input<string>;
endpointIpAddressRange?: pulumi.Input<string>;
fsxAdminPassword?: pulumi.Input<string>;
routeTableIds?: pulumi.Input<pulumi.Input<string>[]>;
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}Example: Multi-AZ ONTAP file system
const ontap = new aws.fsx.OntapFileSystem("enterprise-storage", {
storageCapacity: 2048,
subnetIds: [subnet1.id, subnet2.id],
deploymentType: "MULTI_AZ_1",
throughputCapacity: 512,
preferredSubnetId: subnet1.id,
endpointIpAddressRange: "198.19.255.0/24",
routeTableIds: [routeTable.id],
securityGroupIds: [ontapSg.id],
tags: {
Name: "enterprise-ontap",
Environment: "production"
},
});Fully managed OpenZFS file system with data compression and snapshots.
class OpenZfsFileSystem extends pulumi.CustomResource {
constructor(name: string, args: OpenZfsFileSystemArgs, opts?: pulumi.CustomResourceOptions);
readonly arn: pulumi.Output<string>;
readonly id: pulumi.Output<string>;
readonly dnsName: pulumi.Output<string>;
}
interface OpenZfsFileSystemArgs {
storageCapacity: pulumi.Input<number>;
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
throughputCapacity: pulumi.Input<number>;
deploymentType: pulumi.Input<"SINGLE_AZ_1" | "SINGLE_AZ_2">;
rootVolumeConfiguration?: pulumi.Input<OpenZfsRootVolumeConfiguration>;
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}Example: OpenZFS with compression
const zfs = new aws.fsx.OpenZfsFileSystem("app-storage", {
storageCapacity: 512,
subnetIds: [subnet.id],
throughputCapacity: 64,
deploymentType: "SINGLE_AZ_1",
rootVolumeConfiguration: {
dataCompressionType: "ZSTD",
nfsExports: [{
clientConfigurations: [{
clients: "10.0.0.0/16",
options: ["rw", "crossmnt", "no_root_squash"]
}]
}]
},
tags: {
Name: "app-data-storage",
Compression: "enabled"
},
});For complete FSx API with 12 resources and data sources, see All Services.
Install with Tessl CLI
npx tessl i tessl/npm-pulumi--aws