Skip to content

Resource: awsDatasyncLocationHdfs

Manages an HDFS 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.datasyncLocationHdfs.DatasyncLocationHdfs(this, "example", {
  agentArns: ["${aws_datasync_agent.example.arn}"],
  authenticationType: "SIMPLE",
  nameNode: [
    {
      hostname: "${aws_instance.example.private_dns}",
      port: 80,
    },
  ],
  simpleUser: "example",
});

Argument Reference

The following arguments are supported:

  • agentArns - (Required) A list of DataSync Agent ARNs with which this location will be associated.
  • authenticationType - (Required) The type of authentication used to determine the identity of the user. Valid values are simple and kerberos.
  • nameNode - (Required) The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode. See configuration below.
  • simpleUser - (Optional) The user name used to identify the client on the host operating system. If simple is specified for authenticationType, this parameter is required.
  • blockSize - (Optional) The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).
  • replicationFactor - (Optional) The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
  • kerberosKeytab - (Optional) The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. If kerberos is specified for authenticationType, this parameter is required.
  • kerberosKrb5Conf - (Optional) The krb5.conf file that contains the Kerberos configuration information. If kerberos is specified for authenticationType, this parameter is required.
  • kerberosPrincipal - (Optional) The Kerberos principal with access to the files and folders on the HDFS cluster. If kerberos is specified for authenticationType, this parameter is required.
  • kmsKeyProviderUri - (Optional) The URI of the HDFS cluster's Key Management Server (KMS).
  • qopConfiguration - (Optional) The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If qopConfiguration isn't specified, rpcProtection and dataTransferProtection default to privacy. If you set RpcProtection or DataTransferProtection, the other parameter assumes the same value. See configuration below.
  • subdirectory - (Optional) A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to /.
  • 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.

name_node Argument Reference

  • hostname - (Required) The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
  • port - (Required) The port that the NameNode uses to listen to client requests.

qop_configuration Argument Reference

  • dataTransferProtection - (Optional) The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your dfs.data.transfer.protection setting in the hdfs-site.xml file on your Hadoop cluster. Valid values are disabled, authentication, integrity and privacy.
  • rpcProtection - (Optional)The RPC protection setting configured on the HDFS cluster. This setting corresponds to your hadoop.rpc.protection setting in your core-site.xml file on your Hadoop cluster. Valid values are disabled, authentication, integrity and privacy.

Attributes Reference

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

  • 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

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

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