Email or username:

Password:

Forgot your password?
Garrit 🏡🛠️

#Terraform and #AWS peeps:

Is there any reason to use the AWS *modules* [1] over the plain AWS *provider* [2]?

To me it just seems to be an unnecessary abstraction since most of the parameters and resources of the modules overlap with the provider. So, why should I use the modules at all?

[1]: registry.terraform.io/namespac
[2]: registry.terraform.io/provider

4 comments
yuvipanda

@garritfra I spent some time working through these and came to the conclusion that there was no real reason to use the modules.

Jack

@garritfra it's similar to asking why you'd want a library over DIYing things in a language's core lib. The provider only gives you primitives, the modules simplify things greatly and make it easier to implement tricky patterns. Check out all the stuff that the s3 or ecs ones do under the hood, for instance.

Ayush

@garritfra the modules are an abstraction over the aws lib. for example, to setup a ecs cluster you can use the module or you can deal with 500 things, end result is the same

Alex Harden

@garritfra I used some of the AWS modules early on and pretty quickly abandoned them when noticing that resource refactors between versions sometimes caused unnecessary heartburn (i.e. recreation of resources/downtime). I found it better to learn the provider resources better and create our own reusable modules.

Go Up