In terraform modules is a thing. Simplyfying how m...
# getting-started
In terraform modules is a thing. Simplyfying how much configuration needs for example for a VPC. Is this translated to pulumi. Or must I code each resource one by one?
In pulumi, using your favourite programming language, you can organise your code in units (e.g. packages/classes/functions) in a similar way as terraform modules
Thanks But are there official registries for the common packages? Like this one for VPC. Basically, I trust other people to maintain their "modules" better than me and mine 😉 How could I set this up for my own resources. Without inventing the VPC code wheel. My VPC logic for now is a lot of complicated code. Endpoints.. Nat gateways.. route tables etc..
For starters, I would recommend checking those 2 places
Specifically for AWS, Pulumi provides the Crosswalk package, which includes a VPC module: Pulumi has a registry also, although not as extensive as for Terraform:
I have a post in which I create a vpc with pulumi :
The pulumi equivalent of modules is components. If you filter by
type here:
Thanks guys. There any way to import existing resources into components though? makes me think no
@gorgeous-honey-75918 while that issue is still open, work has been done to mitigate this. If you create an import file, you can point to a parent component where the resource needs to be imported into. To start, see the section on the import file here: If you want a file generated for your setup, which includes the pulumi side of things, you can use
pulumi preview --import-file
. Add all the actual resource ids to this file for the infrastructure you want to import. Remove entries from this file what already exists in the Pulumi stack.
Here is the epic tracking all the work around it: While the epic is still open, you can see all the individual items checked off.