Skip to content

Commit

Permalink
Merge pull request #3 from komminarlabs/tk/docs
Browse files Browse the repository at this point in the history
chore: docs update and added examples
  • Loading branch information
thulasirajkomminar authored Oct 8, 2024
2 parents 52c0538 + 3d06824 commit a315b74
Show file tree
Hide file tree
Showing 19 changed files with 3,880 additions and 20 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
CHANGELOG
=========

## [0.1.0] - 2024-10-08

### Added:

#### New resources:

- `index/cluster.Cluster`
- `index/organization.Organization`
- `index/project.Project`

#### New functions:

- `index/getCluster.getCluster`
- `index/getOrganization.getOrganization`
- `index/getOrganizations.getOrganizations`
- `index/getProject.getProject`
27 changes: 12 additions & 15 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ meta_desc: Provides an overview of the CrateDB Provider for Pulumi.
layout: package
---

The CrateDB provider for Pulumi can be used to provision the resources available in [CrateDB](https://www.cratedb.com/).
The CrateDB provider for Pulumi can be used to provision the resources available in [CrateDB](https://cratedb.com/database/).

The CrateDB provider must be configured with credentials to deploy and update resources in CrateDB; see [Installation & Configuration](./installation-configuration) for instructions.

Expand All @@ -17,14 +17,13 @@ The CrateDB provider must be configured with credentials to deploy and update re
import * as pulumi from "@pulumi/pulumi";
import * as cratedb from "@komminarlabs/cratedb";

// Create a new Bucket
export const database = new cratedb.Database("signals", {
name: "signals",
retentionPeriod: 604800,
export const organization = new cratedb.Organization("default", {
name: "default",
});

// Get the id of the new bucket as an output
export const databaseId = database.id;
export const organizationName = organization.name;

console.log(`Organization Name: {organizationName}`);
```

{{% /choosable %}}
Expand All @@ -33,10 +32,9 @@ export const databaseId = database.id;
```python
import komminarlabs_cratedb as cratedb

database = cratedb.Database(
"signals",
name="signals",
retention_period=604800,
organization = cratedb.Organization(
"default",
name="default",
)
```

Expand All @@ -53,15 +51,14 @@ import (

func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
signals, err := cratedb.NewDatabase(ctx, "signals", &cratedb.DatabaseArgs{
Name: pulumi.String("signals"),
RetentionPeriod: pulumi.Int(604800),
defaultOrg, err := cratedb.NewOrganization(ctx, "default", &cratedb.OrganizationArgs{
Name: pulumi.String("default"),
})
if err != nil {
return err
}

ctx.Export("databaseId", signals.ID())
ctx.Export("defaultOrgName", defaultOrg.Name)
return nil
})
}
Expand Down
4 changes: 4 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.pulumi/
**/bin/
node_modules/

99 changes: 99 additions & 0 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
module github.com/komminarlabs/pulumi-cratedb/examples

go 1.22

require (
github.com/komminarlabs/pulumi-cratedb/sdk v0.0.0-20241008184156-52c05386bd35
github.com/pulumi/pulumi/sdk/v3 v3.108.1
)

replace (
github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240229143312-4f60ee4e2975
github.com/komminarlabs/pulumi-cratedb/provider => ../provider
github.com/komminarlabs/terraform-provider-cratedb/shim => ../provider/shim
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/charmbracelet/bubbles v0.16.1 // indirect
github.com/charmbracelet/bubbletea v0.24.2 // indirect
github.com/charmbracelet/lipgloss v0.7.1 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/djherbis/times v1.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/opentracing/basictracer-go v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pgavlin/fx v0.1.6 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
github.com/pulumi/esc v0.6.2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.61.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/frand v1.4.2 // indirect
)
Loading

0 comments on commit a315b74

Please sign in to comment.