Skip to content

Resource: awsDatasyncLocationNfs

Manages an NFS Location within AWS DataSync.

\~> NOTE: The DataSync Agents must be available before creating this resource.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.datasyncLocationNfs.DatasyncLocationNfs(this, "example", {
  onPremConfig: {
    agentArns: ["${aws_datasync_agent.example.arn}"],
  },
  serverHostname: "nfs.example.com",
  subdirectory: "/exported/path",
});

Argument Reference

The following arguments are supported:

  • mountOptions - (Optional) Configuration block containing mount options used by DataSync to access the NFS Server.
  • onPremConfig - (Required) Configuration block containing information for connecting to the NFS File System.
  • serverHostname - (Required) Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
  • subdirectory - (Required) Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
  • tags - (Optional) Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

mount_options Argument Reference

The following arguments are supported inside the mountOptions configuration block:

  • version - (Optional) The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: automatic, nfs3, NFS4_0 and NFS4_1. Default: automatic

on_prem_config Argument Reference

The following arguments are supported inside the onPremConfig configuration block:

  • agentArns - (Required) List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - Amazon Resource Name (ARN) of the DataSync Location.
  • arn - Amazon Resource Name (ARN) of the DataSync Location.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

awsDatasyncLocationNfs can be imported by using the DataSync Task Amazon Resource Name (ARN), e.g.,

$ terraform import aws_datasync_location_nfs.example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567