https://pulumi.com logo
#contribute
Title
# contribute
f

flaky-arm-38472

11/14/2022, 5:12 AM
Maybe a silly question but is possible to fake 'create' resources when developing? Let's say I want to tackle this issue https://github.com/pulumi/pulumi/issues/10256 . I would not want to create that many resources, if possible, on my AWS account. What I do is just create resources that does not cost a penny, like a bunch of IAM roles and policies, etc. But want to know if there are alternatives.
r

rapid-raincoat-36492

11/14/2022, 5:33 AM
If it’s aws resources, you can run LocalStack and point your local service endpoints to the localhost endpoints and create fake resources. Here’s an example of the approach: https://www.pulumi.com/blog/pulumi-and-localstack/ Note that I haven’t personally tested (or even fully read) that post, but I have used Pulumi with LocalStack before and it’s worked reasonably well
f

flaky-arm-38472

11/14/2022, 5:44 AM
LocalStack makes sense.
l

limited-rainbow-51650

11/14/2022, 7:02 AM
Or you can leverage mocks in a pure unit testing setup: https://www.pulumi.com/docs/guides/testing/unit/
e

echoing-dinner-19531

11/14/2022, 11:59 AM
Or just make resources with something like Random which doesn't create anything that costs
f

flaky-arm-38472

11/14/2022, 3:26 PM
That random package might be quite useful indeed