Coconut CLI
Coconut CLI is a tool for locally emulating and mocking Pulumi Cloud Framework (PCF) projects. By using the Coconut CLI, developers are able to emulate and test their projects locally without ever needing to deploy them to the cloud.
Note: This tool is meant to work with pure PCF projects. So if your project uses other Pulumi resources you can't use it with the Coconut CLI.
Note: Check the Pulumi Cloud Mock Provider for details about the supported resources.
Getting started
Prerequisites
As Coconut is a tool for PCF projects, you will need:
Installation
Add the required packages to you PCF project (use one of the example projects if you don't have one):
$ cd <PCF project>
$ npm install -D @getcoconut/cli @getcoconut/pulumi-cloud-mock
Mocking
Run the mock
command from the root of the PCF project:
$ npx coconut mock
Once the PCF program is executed and the resources are ready, the outputs of the program will be printed on the screen. For details on how to use the outputs in your client apps, check the outputs/targets
configuration option.
Examples
Check the examples folder for some example projects.