Use this template repository to create new OpenTofu modules. Follow the steps below to use this repository:
- Click the "Use this template" button to create a new repository
- Name your new repository using the format
todu-modules-<provider>-<module>
- Add the files necessary to support your module to the root of your new repository
- Update the
README.md
file with the appropriate information for your module. Make sure you update any references to this template repository with your new repository - Update the codeforamerica/tofu-modules repository to include
your new module in the main
README.md
and the documentation
Add this module to your main.tf
(or appropriate) file and configure the inputs
to match your desired configuration. For example:
module "module_name" {
source = "github.com/codeforamerica/tofu-modules-template?ref=1.0.0"
project = "my-project"
environment = "development"
}
Make sure you re-run tofu init
after adding the module to your configuration.
tofu init
tofu plan
To update the source for this module, pass -upgrade
to tofu init
:
tofu init -upgrade
Name | Description | Type | Default | Required |
---|---|---|---|---|
project | Name of the project. | string |
n/a | yes |
environment | Environment for the project. | string |
"dev" |
no |
tags | Optional tags to be applied to all resources. | list |
[] |
no |
Name | Description | Type |
---|---|---|
id | Id of the newly created resource. | string |
Follow the contributing guidelines to contribute to this repository.