title: Use JFrog Artifactory as Terraform Data Source
body: <p>I'm desiring to pull a jar file from JFrog artifactory and use it as the source to deploy to an AWS Lambda function using Terraform. I am currently doing this by pulling from an S3 bucket using the code below:</p>
  
  <pre><code>data "aws_s3_bucket_object" "function-lambda-file-hash" {
    bucket = "&lt;MYBUCKET&gt;
    key    = "&lt;MYKEY.sha1&gt;"
  
    tags {
      Name = "${var.&lt;MYTAG&gt;}"
    }
  }
  
  # Create the Lambda function itself
  resource "aws_lambda_function" "function-lambda" {
    function_name = "function-lambda"
  
    handler = "com.example.MyFunction::handleRequest"
    runtime = "java8"
    s3_bucket="&lt;MYBUCKET&gt;"
    s3_key="&lt;MYKEY.jar&gt;"
    source_code_hash = "${data.aws_s3_bucket_object.function-lambda-file-hash.body}"
    role = "${aws_iam_role.function-lambda-exec-role.arn}"
    timeout = 30
    memory_size = 256
  
    tags {
      Name = "${var.&lt;MYTAG&gt;}"
    }
  }
  </code></pre>
  
  <p>I would like to do something identical but pulling from Artifactory, an instance that requires authentication (which it appears that the HTTP module cannot do), instead but have not been able to find any information regarding doing this. Does anyone know if this is possible? And if so, how?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Chris</p>