An example of a serveless API built with Pulumi, GCP, Apollo and Neo4j
GCP - https://cloud.google.com/ Apollo - https://www.apollographql.com/docs/apollo-server Neo4j GraphQl - https://grandstack.io/docs/graphql-schema-generation-augmentation
- Ensure you have the latest Node.js and NPM
- Install the Pulumi CLI
- Configure Pulumi to access your GCP account
-
Restore NPM dependencies:
$ npm install
-
Create a new stack:
$ pulumi stack init gcp-ts-neo4j
-
Configure your GCP project and region:
$ pulumi config set gcp:project <projectname> $ pulumi config set gcp:region <region>
-
Run
pulumi up
to preview and deploy changes:$ pulumi up Previewing changes: ... Performing changes: ... info: 6 changes performed: + 6 resources created Update duration: 39.65130324s
-
Go to the deployed playground:
$ pulumi stack output url https://us-central1-pulumi-development.cloudfunctions.net/greeting-function-7f95447
-
Clean up your GCP and Pulumi resources:
$ pulumi destroy ... $ pulumi stack rm ...
pulumi up
from --help
:
This command creates or updates resources in a stack. The new desired goal state for the target stack is computed by running the current Pulumi program and observing all resource allocations to produce a resource graph. This goal state is then compared against the existing state to determine what create, read, update, and/or delete operations must take place to achieve the desired goal state, in the most minimally disruptive way. This command records a full transactional snapshot of the stack's new state afterwards so that the stack may be updated incrementally again later on.
pulumi destroy
Destroy an existing stack and its resources
This command deletes an entire existing stack by name. The current state is loaded from the associated state file in the workspace. After running to completion, all of this stack's resources and associated state will be gone.Destroy an existing stack and its resources
This command deletes an entire existing stack by name. The current state is loaded from the associated state file in the workspace. After running to completion, all of this stack's resources and associated state will be gone.
pulumi logs -f
[PREVIEW] Show aggregated logs for a stack