forwardemail.net
forwardemail.net copied to clipboard
Feature request: Terraform provider
Intro
Terraform is great for managing remote resources and ensuring everything is in a given state. It has more than 2000 providers and is the leading cloud infrastructure management software. The closest contender is Pulumi and it supports Terraform providers.
Benefits for forwardemail.net customers
- Be able to manage forwardemail.net resources (domains/aliases/etc) as part of a greater infrastructure stack
Benefits for forwardemail.net
- Boost forwardemail.net visibility to the DevOps crowd
- Enable forwardemail.net usage in DevOps-enabled organizations
- Boost sales since the API is only available for paid plans
Example usage
Aliases and domains can be specified in a file in a GitHub repository. Every time there is a change (commit), Terraform will ensure the configuration described in the GitHub repository is the same in forwardemail.net: adding any domains/aliases that have been added and deleting those that have been deleted from the file. This workflow has the benefit of making this repo the source of truth.
Existing email forwarding solutions for Terraform users
- (Hacky) Rest API provider to be used with forwardemail.net
- (Official) DNSimple provider
- (Non-official) ImprovMX provider
- (Hacky) AWS SES + AWS Lambda
Helpful resources
- Source code: Terraform provider scaffolding
- Video: Creating a Terraform Provider for Just About Anything
- Tutorial: How to Develop a Custom Provider in Terraform
I managed to achieve what I wanted to do using the Rest API provider, it's not perfect but it does the job until there's a full fledged Terraform provider available for forwardemail.net.
The code can be found in my public repo:
Hey folks, I made one, please take a look :-) https://registry.terraform.io/providers/abagayev/forwardemail/latest
Here is also a story behind it: https://medium.com/@abagayev/lessons-learned-from-writing-a-terraform-provider-62412b79a997