Maybe a silly question but is possible to fake 'cr...
# contribute
f
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
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
LocalStack makes sense.
l
Or you can leverage mocks in a pure unit testing setup: https://www.pulumi.com/docs/guides/testing/unit/
e
Or just make resources with something like Random which doesn't create anything that costs
f
That random package might be quite useful indeed