Skip to content

rawkode/pulumi-faunadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

faunadb Pulumi Provider

This repo is a boilerplate showing how to create a native Pulumi provider. You can search-replace faunadb with the name of your desired provider as a starting point for creating a provider that manages resources in the target cloud.

Most of the code for the provider implementation is in pkg/provider/provider.go.

An example of using the single resource defined in this example is in examples/simple.

A code generator is available which generates SDKs in TypeScript, Python, Go and .NET which are also checked in to the sdk folder. The SDKs are generated from a schema in provider/cmd/pulumi-resource-faunadb/schema.json. This file should be kept aligned with the resources, functions and types supported by the provider implementation.

Note that the generated provider plugin (pulumi-resource-faunadb) must be on your PATH to be used by Pulumi deployments. If creating a provider for distribution to other users, you should ensure they install this plugin to their PATH.

Pre-requisites

Install the pulumictl cli from the releases page or follow the install instructions

NB: Usage of pulumictl is optional. If not using it, hard code the version in the Makefile of when building explicitly pass version as VERSION=0.0.1 make build

Build and Test

# build and install the resource provider plugin
$ make build install

# test
$ cd examples/simple
$ yarn link @pulumi/faunadb
$ yarn install
$ pulumi stack init test
$ pulumi up

References

Other resources for learning about the Pulumi resource model: