Today, I thought of publishing my own module to terraform registry. The module is in simplest form now. The module is for setting up S3 with web hosting enabled and distributed to different edge locations using AWS Cloudfront.
Please feel free to give me valuable suggestions.
We create modules in terraform so that we don't write the same terraform script again and again. It is similar to functions in any programming language. We create it once and just call it every time we need it.
- Anyone can publish modules in terraform registry.
- The terraform official documentation is well documented, anyone can easily follow and publish the module.
- It takes a few seconds to publish your module and make it ready to use.
- Make sure you provide enough information on variables and output and good to create one readme file.
I would not say it's a full fledged module to use but over time I will make it better adding more features. For now it is meant to create a S3 bucket with the input name supplied by the users and enable it for web hosting. It also distributes the content to different AWS edge locations using cloudfront.