Hi, I am new to atmos and I was wondering what is ...
# terraform
a
Hi, I am new to atmos and I was wondering what is the difference between the module vpc-peering and the component vpc-peering? I thought the component would be building on top of the module, but that doesn't seem to be the case. Does that mean they are maintained parallelly with the same features available? What should I consider using in my project, the component or the module? https://github.com/cloudposse/terraform-aws-vpc-peering https://github.com/cloudposse-terraform-components/aws-vpc-peering
y
Hello 🙂 The first (
terraform-aws-vpc-peering
) is a Terraform module: you can use it with pure Terraform, Terragrunt, Atmos, etc. The latter is an Atmos component that must be used in coordination with other Atmos components (you can see, for example, the
account-map
dependency) as part of their reference architecture. As a newbie, it's actually quite difficult to distinguish between Atmos and Cloudposse because the documentation and sites often mixes the two.
a
Ah, I'm debating whether to use the module or component. I'm used to using module and feel like it would be a good way to customize it based on my needs. I think components do that too, but is there an advantage of using a component over a module?
e
Components are root modules. Root modules cannot call root modules.
Our cloudposse public components are part of our commercial reference architecture; support on components in our commercial components requires a paid support.
Recommend starting here for a quick read https://atmos.tools/learn/concepts-overview
(Note, we are actively working to eliminate the account map in our commercial reference architecture)
Components often compose multiple modules into a solution. Modules are often too small to justify being a component by themselves, but nothing prevents you from using a module as a component.
Also, nothing in atmos requires use of our modules or components