Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation. #55

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: VMware VRA
meta_desc: Provides an overview of the VMware VRA Provider for Pulumi.
layout: package
---

The VMware VRA provider for Pulumi can be used to provision a VMware VRA based installation.

## Example

{{< chooser language "typescript,python,go,csharp,yaml" >}}
{{% choosable language typescript %}}

```typescript

// I'm not sure.

```

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

```python

// I'm not sure.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you start from the yaml example above, you can use pulumi convert to generate for languages you are less familiar with yourself.

https://www.pulumi.com/blog/pulumi-yaml-ga/#full-support-for-pulumi-convert


```

{{% /choosable %}}
{{% choosable language go %}}

```go
package main

import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-vra/sdk/go/vra/deployment"
)

func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
vm, err := deployment.NewDeployment(ctx, "vra-vm", &deployment.DeploymentArgs{
ProjectId: pulumi.ID("id"),
Name: pulumi.String("name"),
CatalogItemId: pulumi.String("catalog-item-string"),
})
if err != nil {
return err
}
ctx.Export("blueprint", vm.BlueprintId)
return nil
})
}
```

{{% /choosable %}}
{{% choosable language yaml %}}

```yaml
name: vra
runtime: yaml
description: A minimal VRA program in Pulumi YAML
resources:
newDeployment:
type: vra:deployment:NewDeployment
properties:
projectId: id
name: name
catalogItemId: catalog-item-string
outputs:
```

{{% /choosable %}}

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

## Installation

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

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a section here explaining how to manually install the plugin binary?

Here is the snippet from the Talos provider as an example:

https://github.com/pulumiverse/pulumi-talos/blob/f64635341c178019cd59f9a72819d56d5c29f6b0/docs/installation-configuration.md#L16-L23

### Provider Binary

The VRA provider binary is a third party binary. It can be installed using the pulumi plugin command.

```bash
pulumi plugin install resource vra <version> --server github://api.github.com/pulumiverse
```

Replace the version string with your desired version.

## Setup

To provision resources with the Pulumi VRA provider, you need to provide the `url` and
generally the `access_token`.

## Configuration Options

Use `pulumi config set vra:<option>`.

| Option | Required/Optional | Description |
|-----------------------|-------------------|---------------------------------------------------------------------------------|
| `access_token` | Optional | VRA access token for API operations (environment: `VRA_ACCESS_TOKEN`). |
| `refresh_token` | Optional | VRA refresh token for API operations (environment: `VRA_REFRESH_TOKEN`). |
| `url` | Required | VRA provider url for API operations (environment: `VRA_URL`). |
| `insecure` | Optional | Specifies if TLS certificates are validated (environment: `VRA_INSECURE` / `VRA7_INSECURE`). |
| `reauthorize_timeout` | Optional | Specifies the timeout for how often to reauthorize the access token. (environment: `VRA_REAUTHORIZE_TIMEOUT` / `VRA7_REAUTHORIZE_TIMEOUT`). |
| `api_timeout` | Optional | Specifies the timeout in seconds for API operations. (environment: `VRA_API_TIMEOUT`) |
Loading