@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
231 lines (230 loc) • 14 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Manages a FSx for Lustre Data Repository Association. See [Linking your file system to an S3 bucket](https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html) for more information.
*
* > **NOTE:** Data Repository Associations are only compatible with AWS FSx for Lustre File Systems and `PERSISTENT_2` deployment type.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.s3.Bucket("example", {bucket: "my-bucket"});
* const exampleBucketAcl = new aws.s3.BucketAcl("example", {
* bucket: example.id,
* acl: "private",
* });
* const exampleLustreFileSystem = new aws.fsx.LustreFileSystem("example", {
* storageCapacity: 1200,
* subnetIds: exampleAwsSubnet.id,
* deploymentType: "PERSISTENT_2",
* perUnitStorageThroughput: 125,
* });
* const exampleDataRepositoryAssociation = new aws.fsx.DataRepositoryAssociation("example", {
* fileSystemId: exampleLustreFileSystem.id,
* dataRepositoryPath: pulumi.interpolate`s3://${example.id}`,
* fileSystemPath: "/my-bucket",
* s3: {
* autoExportPolicy: {
* events: [
* "NEW",
* "CHANGED",
* "DELETED",
* ],
* },
* autoImportPolicy: {
* events: [
* "NEW",
* "CHANGED",
* "DELETED",
* ],
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import FSx Data Repository Associations using the `id`. For example:
*
* ```sh
* $ pulumi import aws:fsx/dataRepositoryAssociation:DataRepositoryAssociation example dra-0b1cfaeca11088b10
* ```
*/
export declare class DataRepositoryAssociation extends pulumi.CustomResource {
/**
* Get an existing DataRepositoryAssociation resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DataRepositoryAssociationState, opts?: pulumi.CustomResourceOptions): DataRepositoryAssociation;
/**
* Returns true if the given object is an instance of DataRepositoryAssociation. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is DataRepositoryAssociation;
/**
* Amazon Resource Name of the file system.
*/
readonly arn: pulumi.Output<string>;
readonly associationId: pulumi.Output<string>;
/**
* Set to true to run an import data repository task to import metadata from the data repository to the file system after the data repository association is created. Defaults to `false`.
*/
readonly batchImportMetaDataOnCreate: pulumi.Output<boolean | undefined>;
/**
* The path to the Amazon S3 data repository that will be linked to the file system. The path must be an S3 bucket s3://myBucket/myPrefix/. This path specifies where in the S3 data repository files will be imported from or exported to. The same S3 bucket cannot be linked more than once to the same file system.
*/
readonly dataRepositoryPath: pulumi.Output<string>;
/**
* Set to true to delete files from the file system upon deleting this data repository association. Defaults to `false`.
*/
readonly deleteDataInFilesystem: pulumi.Output<boolean | undefined>;
/**
* The ID of the Amazon FSx file system to on which to create a data repository association.
*/
readonly fileSystemId: pulumi.Output<string>;
/**
* A path on the file system that points to a high-level directory (such as `/ns1/`) or subdirectory (such as `/ns1/subdir/`) that will be mapped 1-1 with `dataRepositoryPath`. The leading forward slash in the name is required. Two data repository associations cannot have overlapping file system paths. For example, if a data repository is associated with file system path `/ns1/`, then you cannot link another data repository with file system path `/ns1/ns2`. This path specifies where in your file system files will be exported from or imported to. This file system directory can be linked to only one Amazon S3 bucket, and no other S3 bucket can be linked to the directory.
*/
readonly fileSystemPath: pulumi.Output<string>;
/**
* For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system.
*/
readonly importedFileChunkSize: pulumi.Output<number>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* See the `s3` configuration block. Max of 1.
* The configuration for an Amazon S3 data repository linked to an Amazon FSx Lustre file system with a data repository association. The configuration defines which file events (new, changed, or deleted files or directories) are automatically imported from the linked data repository to the file system or automatically exported from the file system to the data repository.
*/
readonly s3: pulumi.Output<outputs.fsx.DataRepositoryAssociationS3>;
/**
* A map of tags to assign to the data repository association. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* Create a DataRepositoryAssociation resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DataRepositoryAssociationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DataRepositoryAssociation resources.
*/
export interface DataRepositoryAssociationState {
/**
* Amazon Resource Name of the file system.
*/
arn?: pulumi.Input<string>;
associationId?: pulumi.Input<string>;
/**
* Set to true to run an import data repository task to import metadata from the data repository to the file system after the data repository association is created. Defaults to `false`.
*/
batchImportMetaDataOnCreate?: pulumi.Input<boolean>;
/**
* The path to the Amazon S3 data repository that will be linked to the file system. The path must be an S3 bucket s3://myBucket/myPrefix/. This path specifies where in the S3 data repository files will be imported from or exported to. The same S3 bucket cannot be linked more than once to the same file system.
*/
dataRepositoryPath?: pulumi.Input<string>;
/**
* Set to true to delete files from the file system upon deleting this data repository association. Defaults to `false`.
*/
deleteDataInFilesystem?: pulumi.Input<boolean>;
/**
* The ID of the Amazon FSx file system to on which to create a data repository association.
*/
fileSystemId?: pulumi.Input<string>;
/**
* A path on the file system that points to a high-level directory (such as `/ns1/`) or subdirectory (such as `/ns1/subdir/`) that will be mapped 1-1 with `dataRepositoryPath`. The leading forward slash in the name is required. Two data repository associations cannot have overlapping file system paths. For example, if a data repository is associated with file system path `/ns1/`, then you cannot link another data repository with file system path `/ns1/ns2`. This path specifies where in your file system files will be exported from or imported to. This file system directory can be linked to only one Amazon S3 bucket, and no other S3 bucket can be linked to the directory.
*/
fileSystemPath?: pulumi.Input<string>;
/**
* For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system.
*/
importedFileChunkSize?: pulumi.Input<number>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* See the `s3` configuration block. Max of 1.
* The configuration for an Amazon S3 data repository linked to an Amazon FSx Lustre file system with a data repository association. The configuration defines which file events (new, changed, or deleted files or directories) are automatically imported from the linked data repository to the file system or automatically exported from the file system to the data repository.
*/
s3?: pulumi.Input<inputs.fsx.DataRepositoryAssociationS3>;
/**
* A map of tags to assign to the data repository association. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a DataRepositoryAssociation resource.
*/
export interface DataRepositoryAssociationArgs {
/**
* Set to true to run an import data repository task to import metadata from the data repository to the file system after the data repository association is created. Defaults to `false`.
*/
batchImportMetaDataOnCreate?: pulumi.Input<boolean>;
/**
* The path to the Amazon S3 data repository that will be linked to the file system. The path must be an S3 bucket s3://myBucket/myPrefix/. This path specifies where in the S3 data repository files will be imported from or exported to. The same S3 bucket cannot be linked more than once to the same file system.
*/
dataRepositoryPath: pulumi.Input<string>;
/**
* Set to true to delete files from the file system upon deleting this data repository association. Defaults to `false`.
*/
deleteDataInFilesystem?: pulumi.Input<boolean>;
/**
* The ID of the Amazon FSx file system to on which to create a data repository association.
*/
fileSystemId: pulumi.Input<string>;
/**
* A path on the file system that points to a high-level directory (such as `/ns1/`) or subdirectory (such as `/ns1/subdir/`) that will be mapped 1-1 with `dataRepositoryPath`. The leading forward slash in the name is required. Two data repository associations cannot have overlapping file system paths. For example, if a data repository is associated with file system path `/ns1/`, then you cannot link another data repository with file system path `/ns1/ns2`. This path specifies where in your file system files will be exported from or imported to. This file system directory can be linked to only one Amazon S3 bucket, and no other S3 bucket can be linked to the directory.
*/
fileSystemPath: pulumi.Input<string>;
/**
* For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system.
*/
importedFileChunkSize?: pulumi.Input<number>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* See the `s3` configuration block. Max of 1.
* The configuration for an Amazon S3 data repository linked to an Amazon FSx Lustre file system with a data repository association. The configuration defines which file events (new, changed, or deleted files or directories) are automatically imported from the linked data repository to the file system or automatically exported from the file system to the data repository.
*/
s3?: pulumi.Input<inputs.fsx.DataRepositoryAssociationS3>;
/**
* A map of tags to assign to the data repository association. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}