Contributions to this Module are very welcome! We follow a fairly standard pull request process for contributions, subject to the following guidelines:
Before starting any work, we recommend filing a GitHub issue in this repo. This is your chance to ask questions and get feedback from the maintainers and the community before you sink a lot of time into writing (possibly the wrong) code. If there is anything you're unsure about, just ask!
At this point, make your code changes and use your new test case to verify that everything is working. As you work, keep in mind two things:
- Documentation and Testability
- Code Guidelines
- Backwards compatibility
- Downtime
Keep in mind when making changes or add significant contributions to include examples, both for documentation purposes but also to make sure we're able to perform tests and validations against the changes that are made.
Please read our guidelines in STYLES.md
Please make every effort to avoid unnecessary backwards incompatible changes. With Terraform code, this means:
- Do not delete, rename, or change the type of input variables.
- If you add an input variable, it should have a
default
. - Do not delete, rename, or change the type of output variables.
- Do not delete or rename a module in the
modules
folder.
If a backwards incompatible change cannot be avoided, please make sure to call that out when you submit a pull request, explaining why the change is absolutely necessary.
Bear in mind that the Terraform code in this Module is used by real companies to run real infrastructure in production, and certain types of changes could cause downtime. For example, consider the following:
- If you rename a resource (e.g.
aws_instance "foo"
->aws_instance "bar"
), Terraform will see that as deleting the old resource and creating a new one. - If you change certain attributes of a resource (e.g. the
name
of anaws_elb
), the cloud provider (e.g. AWS) may treat that as an instruction to delete the old resource and a create a new one.
Deleting certain types of resources (e.g. virtual servers, load balancers) can cause downtime, so when making code
changes, think carefully about how to avoid that. For example, can you avoid downtime by using
create_before_destroy? Or via
the terraform state
command? If so, make sure to note this in our pull request. If downtime cannot be avoided,
please make sure to call that out when you submit a pull request.
Create a pull request with your changes. Please make sure to include the following:
- A description of the change, including a link to your GitHub issue.
- The output of your automated test run, provided by Travis (included automatically).
- Any notes on backwards incompatibility or downtime.
The maintainers for this repo will review your code and provide feedback. If everything looks good, they will merge the code and release a new version, which you'll be able to find in the releases page.
One of the maintainers may merge the Pull Request in once they have the sign-off of another developer.