Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dxw/terrafile
Install Terraform modules using a Terrafile
https://github.com/dxw/terrafile
tech-ops
Last synced: about 1 month ago
JSON representation
Install Terraform modules using a Terrafile
- Host: GitHub
- URL: https://github.com/dxw/terrafile
- Owner: dxw
- License: mit
- Created: 2018-11-08T10:02:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T12:01:58.000Z (about 1 month ago)
- Last Synced: 2024-10-29T14:33:29.119Z (about 1 month ago)
- Topics: tech-ops
- Language: Ruby
- Homepage:
- Size: 50.8 KB
- Stars: 2
- Watchers: 16
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesome-terraform - terrafile - Systematically manage external modules from Github for use in Terraform (written in Ruby). (Tools / Miscellaneous)
- awesome-tf - dxw/terrafile - Systematically manage external modules from Github for use in Terraform (written in Ruby). (Tools / Community providers)
README
# Terrafile
This gem provides a `terrafile` executable (Ruby) to install a Terraform project's modules using `git`.
The idea of using a 'Terrafile' (like a 'Puppetfile' or a 'Gemfile') to manage a project's dependencies comes from Ben Snape and this code is based on his blog post [http://bensnape.com/2016/01/14/terraform-design-patterns-the-terrafile/](http://bensnape.com/2016/01/14/terraform-design-patterns-the-terrafile/).
Conventions:
- a project's modules are described in a `Terrafile` located at the root of the project
- terraform modules are installed in `vendor/terraform_modules`## Installation
Add this line to your application's Gemfile:
```ruby
gem 'terrafile'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install terrafile
## Usage
Invoke the executable from your shell:
$ terrafile
to install the modules listed in `Terrafile` into `vendor/terraform_modules`.
## Dependencies
- git
- Ruby (>= 2.7.6)## Development
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
### Installing gem in development
- `gem build terrafile.gemspec`
- `gem install terrafile-*.gem`Then you can run `$ terrafile` to run the latest version
### Tests
Run the test suite with:
rake test
The task will:
- run unit tests with 'rspec'
- enforce 100% coverage with 'simplecov'
- lint the Ruby code with 'rubocop'
- run integration tests with 'cucumber'## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/dxw/terrafile. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Terrafile project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dxw/terrafile/blob/master/CODE_OF_CONDUCT.md).