Terraform module to upload N number of (optionally templated) local files to S3 with distinct keys. - repo managed by sudoblark.terraform.github
The below documentation is intended to assist a developer with interacting with the Terraform module in order to add, remove or update functionality.
- terraform_docs
brew install terraform_docs
- tfenv
git clone https://github.com/tfutils/tfenv.git ~/.tfenv
echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile
- Virtual environment with pre-commit installed
python3 -m venv venv
source venv/bin/activate
pip install pre-commit
This repository utilises pre-commit in order to ensure a base level of quality on every commit. The hooks may be installed as follows:
source venv/bin/activate
pip install pre-commit
pre-commit install
pre-commit run --all-files
The below documentation is intended to assist users in utilising the module, the main thing to note is the data structure section which outlines the interface by which users are expected to interact with the module itself, and the examples section which has examples of how to utilise the module.
Name | Version |
---|---|
terraform | ~> 1.5.0 |
aws | >= 5.61.0 |
Name | Version |
---|---|
aws | 5.67.0 |
No modules.
Name | Type |
---|---|
aws_s3_object.uploaded_files | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
raw_s3_files | Data structure --------------- A list of dictionaries, where each dictionary has the following attributes: REQUIRED --------- - name: : Friendly name used through Terraform for instantiation and cross-referencing of resources, only relates to resource naming within the module. - source_folder : Which folder where the {source_file} lives. - source_file : The path under {source_folder} corresponding to the file to upload. - destination_key : Key in S3 bucket to upload to. - destination_bucket : The S3 bucket to upload the {source_file} to. OPTIONAL --------- - template_input : A dictionary of variable input for the template file needed for instantiation (leave blank if no template required) |
list( |
n/a | yes |
No outputs.
Data structure
---------------
A list of dictionaries, where each dictionary has the following attributes:
REQUIRED
---------
- name: : Friendly name used through Terraform for instantiation and cross-referencing of resources,
only relates to resource naming within the module.
- source_folder : Which folder where the {source_file} lives.
- source_file : The path under {source_folder} corresponding to the file to upload.
- destination_key : Key in S3 bucket to upload to.
- destination_bucket : The S3 bucket to upload the {source_file} to.
OPTIONAL
---------
- template_input : A dictionary of variable input for the template file needed for instantiation (leave blank if no template required)
See examples
folder for an example setup.