Skip to content

Commit

Permalink
fix(docs): update readme and docs for registry (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
omercnet committed Aug 14, 2023
1 parent 37db737 commit 1ace463
Show file tree
Hide file tree
Showing 18 changed files with 159 additions and 14 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

The Vercel Resource Provider lets you manage [Vercel](https://vercel.com) resources.

The Pulumi `Vercel` provider is available as a package in all Pulumi languages:

- JavaScript/TypeScript: [`@pulumiverse/vercel`](https://www.npmjs.com/package/@pulumiverse/vercel)
- Python: [`pulumiverse-vercel`](https://pypi.org/project/pulumiverse-vercel/)
- Go: [`github.com/pulumiverse/pulumi-vercel/sdk/v3`](https://pkg.go.dev/github.com/pulumiverse/pulumi-vercel/sdk/v3)
- .NET: [`Pulumiverse.vercel`](https://www.nuget.org/packages/Pulumiverse.vercel)

## Installing

This package is available for several languages/platforms:
Expand All @@ -11,21 +18,21 @@ This package is available for several languages/platforms:
To use from JavaScript or TypeScript in Node.js, install using either `npm`:

```bash
npm install @pulumi/vercel
npm install @pulumiverse/vercel
```

or `yarn`:

```bash
yarn add @pulumi/vercel
yarn add @pulumiverse/vercel
```

### Python

To use from Python, install using `pip`:

```bash
pip install pulumi_vercel
pip install pulumiverse-vercel
```

### Go
Expand All @@ -41,7 +48,7 @@ go get github.com/pulumiverse/pulumi-vercel/sdk/go/...
To use from .NET, install using `dotnet add package`:

```bash
dotnet add package Pulumi.vercel
dotnet add package Pulumiverse.vercel
```

## Configuration
Expand Down
69 changes: 69 additions & 0 deletions docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Vercel
meta_desc: Provides an overview of the Vercel Provider for Pulumi.
layout: package
---

The `Vercel` provider for Pulumi can be used to provision any of the resources available with `Vercel`.

## Example

{{< chooser language "javascript,typescript,python" >}}

{{% choosable language javascript %}}

```javascript
"use strict";
const vercel = require("@pulumiverse/vercel");

const project = new vercel.Project("pulumi-vercel", {
name: "pulumi-vercel",
rootDirectory: "src",
});

const deployment = new vercel.Deployment("deployment", {
projectId: project.id,
production: true,
files: vercel.getProjectDirectoryOutput({ path: "./src" }).files,
});
```

{{% /choosable %}}

{{% choosable language typescript %}}

```typescript
import * as vercel from "@pulumiverse/vercel";

const project = new vercel.Project("pulumi-vercel", {
name: "pulumi-vercel",
rootDirectory: "src",
});

const deployment = new vercel.Deployment("deployment", {
projectId: project.id,
production: true,
files: vercel.getProjectDirectoryOutput({ path: "./src" }).files,
});
```

{{% /choosable %}}
{{% choosable language python %}}

```python
import pulumiverse_vercel as vercel
import pulumi

project = vercel.Project("pulumi-vercel",
name="pulumi-vercel",
rootDirectory="src")

deployment = vercel.Deployment("deployment",
name="pulumi-vercel",
project_id=project.id,
production="true")
```

{{% /choosable %}}

{{< /chooser >}}
62 changes: 62 additions & 0 deletions docs/installation-configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Vercel Installation & Configuration
meta_desc: Information on how to install the Vercel provider.
layout: package
---

## Installation

The Pulumi `Vercel` provider is available as a package in all Pulumi languages:

- JavaScript/TypeScript: [`@pulumiverse/vercel`](https://www.npmjs.com/package/@pulumiverse/vercel)
- Python: [`pulumiverse-vercel`](https://pypi.org/project/pulumiverse-vercel/)
- Go: [`github.com/pulumiverse/pulumi-vercel/sdk/v3`](https://pkg.go.dev/github.com/pulumiverse/pulumi-vercel/sdk/v3)
- .NET: [`Pulumiverse.vercel`](https://www.nuget.org/packages/Pulumiverse.vercel)

## Installing

This package is available for several languages/platforms:

### Node.js (JavaScript/TypeScript)

To use from JavaScript or TypeScript in Node.js, install using either `npm`:

```bash
npm install @pulumiverse/vercel
```

or `yarn`:

```bash
yarn add @pulumiverse/vercel
```

### Python

To use from Python, install using `pip`:

```bash
pip install pulumiverse-vercel
```

### Go

To use from Go, use `go get` to grab the latest version of the library:

```bash
go get github.com/pulumiverse/pulumi-vercel/sdk/go/...
```

### .NET

To use from .NET, install using `dotnet add package`:

```bash
dotnet add package Pulumiverse.vercel
```

## Configuration

The following configuration points are available for the `vercel` provider:

- `vercel:apiKey` (environment: `VERCEL_API_KEY`) - the API key for `vercel`
4 changes: 2 additions & 2 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func getJSBaseOptions(t *testing.T) integration.ProgramTestOptions {
base := getBaseOptions()
baseJS := base.With(integration.ProgramTestOptions{
Dependencies: []string{
"@pulumi/vercel",
"@pulumiverse/vercel",
},
})

Expand All @@ -24,7 +24,7 @@ func getJSBaseOptions(t *testing.T) integration.ProgramTestOptions {
func TestAccVercelTs(t *testing.T) {
test := getJSBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "vercel", "ts"),
Dir: filepath.Join(getCwd(t), "vercel-ts"),
})
integration.ProgramTest(t, &test)
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions examples/vercel-ts/Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: vercel-ts
runtime: nodejs
description: A minimal TypeScript Pulumi program for Vercel
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions examples/vercel/ts/Pulumi.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func Provider() tfbridge.ProviderInfo {
},
Golang: &tfbridge.GolangInfo{
ImportBasePath: filepath.Join(
fmt.Sprintf("github.com/pulumiverse/pulumi-%[1]s/sdk/", mainPkg),
fmt.Sprintf("github.com/%s/pulumi-%s/sdk/", publisher, mainPkg),
tfbridge.GetModuleMajorVersion(version.Version),
"go",
mainPkg,
Expand Down
15 changes: 11 additions & 4 deletions sdk/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

The Vercel Resource Provider lets you manage [Vercel](https://vercel.com) resources.

The Pulumi `Vercel` provider is available as a package in all Pulumi languages:

- JavaScript/TypeScript: [`@pulumiverse/vercel`](https://www.npmjs.com/package/@pulumiverse/vercel)
- Python: [`pulumiverse-vercel`](https://pypi.org/project/pulumiverse-vercel/)
- Go: [`github.com/pulumiverse/pulumi-vercel/sdk/v3`](https://pkg.go.dev/github.com/pulumiverse/pulumi-vercel/sdk/v3)
- .NET: [`Pulumiverse.vercel`](https://www.nuget.org/packages/Pulumiverse.vercel)

## Installing

This package is available for several languages/platforms:
Expand All @@ -11,21 +18,21 @@ This package is available for several languages/platforms:
To use from JavaScript or TypeScript in Node.js, install using either `npm`:

```bash
npm install @pulumi/vercel
npm install @pulumiverse/vercel
```

or `yarn`:

```bash
yarn add @pulumi/vercel
yarn add @pulumiverse/vercel
```

### Python

To use from Python, install using `pip`:

```bash
pip install pulumi_vercel
pip install pulumiverse-vercel
```

### Go
Expand All @@ -41,7 +48,7 @@ go get github.com/pulumiverse/pulumi-vercel/sdk/go/...
To use from .NET, install using `dotnet add package`:

```bash
dotnet add package Pulumi.vercel
dotnet add package Pulumiverse.vercel
```

## Configuration
Expand Down

0 comments on commit 1ace463

Please sign in to comment.