Skip to content

Latest commit

 

History

History
100 lines (68 loc) · 3.73 KB

README.md

File metadata and controls

100 lines (68 loc) · 3.73 KB

template-terraform-module

Terraform Actions Status Shell Script Actions Status Markdown Actions Status YAML Actions Status JSON Actions Status GitHub tag License

Terraform module template following Standard Module Structure.

Usage

Named terraform-<PROVIDER>-<NAME>. Module repositories must use this three-part name format.

curl -fsSL https://raw.githubusercontent.com/tmknom/template-terraform-module/master/install | sh -s terraform-aws-sample
cd terraform-aws-sample && make install

Examples

Requirements

Write your Terraform module requirements.

Providers

Write your Terraform module providers.

Inputs

Write your Terraform module inputs.

Outputs

Write your Terraform module outputs.

Development

Development Requirements

Configure environment variables

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=ap-northeast-1

Installation

git clone [email protected]:tmknom/template-terraform-module.git
cd template-terraform-module
make install

Makefile targets

apply-complete                 Run terraform apply examples/complete
apply-minimal                  Run terraform apply examples/minimal
check-format                   Check format code
clean                          Clean .terraform
destroy-complete               Run terraform destroy examples/complete
destroy-minimal                Run terraform destroy examples/minimal
diff                           Word diff
docs                           Generate docs
format                         Format code
help                           Show help
install                        Install requirements
lint                           Lint code
plan-complete                  Run terraform plan examples/complete
plan-minimal                   Run terraform plan examples/minimal
release                        Release GitHub and Terraform Module Registry
upgrade                        Upgrade makefile

Releasing new versions

Bump VERSION file, and run make release.

Terraform Module Registry

License

Apache 2 Licensed. See LICENSE for full details.