s3-object-folder

chandan-singh/s3-object-folder/aws

Terraform Module HCL AWS

Terraform module, which takes care of uploading a folder and its content to a bucket with content-type

Install
module "s3-object-folder" {
source = "chandan-singh/s3-object-folder/aws"
version = "0.0.4"
}
plain text: /constructs/tfmod-chandan-singh-s3-object-folder-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

AWS S3 bucket object folder Terraform module Terraform module, which takes care of uploading a folder and its contents to a bucket. It also determines content_type of object automatically based on file extension. It only uses the following AWS resource: - AWS S3 Bucket Object Supported features: - Create AWS S3 object based on folder contents Terraform versions Only Terraform 0.12 is supported. Usage !folder_structure For all the files of a folder ``hcl module "test_aws_s3_folder_1" { source = "s3_object_folder" bucket = "test_bucket" base_folder_path = path.module # Or, something like "~/abc/xyz/build" file_glob_pattern = "" set_auto_content_type = true } ` For all the files of a folder matching specific type of file-extensions `hcl module "test_aws_s3_folder_2" { source = "s3_object_fold

Inputs (23)
NameTypeDescriptionDefault
content_typestring(Optional) A standard MIME type describing the format of the object data, e.g. a required
server_side_encryptionstring (Optional) Specifies server-side encryption of the object in S3. required
base_folder_pathstring(Required) Local folder path that to be scanned for uploading objects to bucket required
content_encodingstring(Optional) Specifies what content encodings have been applied to the object and required
website_redirectany(Optional) Specifies a target URL for website redirect. required
object_lock_legal_hold_statusstring(Optional) The legal hold status that you want to apply to the specified object. required
object_lock_modestring(Optional) The object lock retention mode that you want to apply to this object. required
object_lock_retain_until_datestring(Optional) The date and time, in RFC3339 format, when this object's object lock required
bucketstring(Required) The name of the bucket required
cache_controlstring(Optional) Specifies caching behavior along the request/reply chain Read w3c cac required
content_dispositionstring(Optional) Specifies presentational information for the object. Read w3c content required
content_languagestring(Optional) The language the content is in e.g. en-US or en-GB. required
kms_key_idstring(Optional) Specifies the AWS KMS Key ARN to use for object encryption. This valu required
module_depends_onany required
storage_classstring(Optional) Specifies the desired Storage Class for the object. Can be either STA"STANDARD"
metadatamap(string)(Optional) A map of keys/values to provision metadata (will be automatically pre{}
path_prefixmap(string)(Optional) A Map - value of `remove` key will remove the prefix from the paths i{ "add": "", "remove": "" }
source_prefixstring(Optional) Prefix to add before items found after applying glob pattern on `base""
file_glob_patternstring(Optional) Glob pattern for selecting the files"**"
tagsmap(string)(Optional) A map of tags to assign to the object.{}
force_destroybool(Optional) Allow the object to be deleted by removing any legal hold on any objefalse
set_auto_content_typebool(Optional) If set to true, it will override content_type variable and set contentrue
aclstring(Optional) The canned ACL to apply. Defaults to private."private"
Outputs (4)
this_s3_bucket_object_version_ids — The list of version_id of objects.
this_s3_bucket_object_keys_ids — The list of map containing id and aws s3 key of objects.
this_s3_bucket_object_ids — The list of id of objects.
this_s3_bucket_object_etags — The list of etag of objects.
Resources (1)
aws_s3_bucket_object
Details
FrameworkTerraform Module
LanguageHCL
Version0.0.4
Cloud AWS
★ Stars5
Forks5
Total downloads25.2k
Inputs23
Outputs4
Resources1
Examples1
LicenseMIT
Namespacechandan-singh
Updated