Is it possible to have multiple components based o...
# geodesic
b
Is it possible to have multiple components based on the same component? Let’s say I wanted multiple vpcs defined in the same stack? I don’t want to create a unique root module direct for each vpc that duplicates the code.
j
I think this should be pretty straightforward once the
vendir
PR is completed. This should allow you to copy the upstream component into multiple locations locally, with different configs.
👍 1
m
b
That’s perfect!
j
Oh slick. So in that example, vendir would download to
s3-bucket
?
m
Vendir is earlier on in the lifecycle in this case. Component inheritence comes into play when you have a single component folder and you want to utilize that component multiple times in a particular stack.
j
Right - I think that is what I was envisioning. My prior suggestion was that you would use vendir to download to two locations,
components/terraform/public-images
and
components/terraform/export-data
in this case. But this is better!
💯 1
m
Yeah this is one of the more advanced bits that’s a nicely hidden unless you find this documentation.
e
oh that's rad! I didn't see that someone opened that PR.
j
Hi @Erik Osterman (Cloud Posse), yeah, that was someone on my team, We're waiting for a review on one more point and also someone to sign off on the contributor agreement. But I've been using it locally.
e
ohhhhhhhh rad! thanks Joe 😃
cc: @Andriy Knysh (Cloud Posse)
a
yep I saw the PR, thanks @Joe Hosteny