Thread
#general
    i

    icy-doctor-13719

    1 month ago
    Greetings, everyone 👋 I’m day 2 with Pulumi so sorry if this is remedial question… Is there an equivalent of terraform ‘modules’ in Pulumi? I have some common resource types that I want to instantiate with minor configuration differences and I don’t want to re-write the same resources multiple times
    l

    little-cartoon-10569

    1 month ago
    "ComponentResource" is the Pulumi-idiomatic way to do this. However, you can achieve this with any block of code / class / object that your preferred language supports.
    i

    icy-doctor-13719

    1 month ago
    oh, interesting. my brain is still thinking in HCL/Terraform mode … I didn’t think about creating a new class and instantiating it 🤔
    l

    little-cartoon-10569

    1 month ago
    Just be careful with the Pulumi name parameter. Its value needs to be different for each resource (obviously), but it also needs to never change once the resource is created (because a new name means a new resource, which means deleting the old one).
    So no random strings! 🙂