Skip to content

Commit

Permalink
update docs for dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkrueck committed Apr 15, 2024
1 parent 85fca1e commit 1fb02a5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ go get github.com/genesiscloud/pulumi-genesiscloud/sdk/go/...
To use from .NET, install using `dotnet add package`:

```
dotnet add package GenesisCloud.PulumiGenesisCloud
dotnet add package GenesisCloud.PulumiPackage.Genesiscloud
```

## Configuration
Expand Down
42 changes: 32 additions & 10 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ The Genesis Cloud provider must be configured with credentials to deploy and upd

## Example

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

```typescript
import * as pulumi from "@pulumi/pulumi";
import { Instance } from "@genesiscloud/pulumi-genesiscloud";

const example = new Instance("example", {
image: "my-image-id",
image: "ubuntu-ml-nvidia-pytorch",
region: "ARC-IS-HAF-1",
sshKeyIds: ["my-ssh-key-id"],
type: "vcpu-2_memory-4g_disk-80g",
type: "vcpu-4_memory-12g_disk-80g_nvidia3080-1",
});
```

Expand All @@ -32,10 +32,10 @@ import pulumi
import pulumi_genesiscloud as genesiscloud

example = genesiscloud.Instance("example",
image="my-image-id",
image="ubuntu-ml-nvidia-pytorch",
region="ARC-IS-HAF-1",
ssh_key_ids=["my-ssh-key-id"],
type="vcpu-2_memory-4g_disk-80g")
type="vcpu-4_memory-12g_disk-80g_nvidia3080-1")
```

{{% /choosable %}}
Expand All @@ -50,12 +50,12 @@ import (
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := genesiscloud.NewInstance(ctx, "example", &genesiscloud.InstanceArgs{
Image: pulumi.String("my-image-id"),
Image: pulumi.String("ubuntu-ml-nvidia-pytorch"),
Region: pulumi.String("ARC-IS-HAF-1"),
SshKeyIds: pulumi.StringArray{
pulumi.String("my-ssh-key-id"),
},
Type: pulumi.String("vcpu-2_memory-4g_disk-80g"),
Type: pulumi.String("vcpu-4_memory-12g_disk-80g_nvidia3080-1"),
})
if err != nil {
return err
Expand All @@ -66,10 +66,32 @@ func main() {
```

{{% /choosable %}}
{{% choosable language dotnet %}}
{{% choosable language csharp %}}

```dotnet
TODO: add this
```csharp
using Pulumi;
using GenesisCloud.PulumiPackage.Genesiscloud;
using System.Threading.Tasks;

class GenesisCloudInstance : Stack
{
public GenesisCloudInstance()
{
var instance = new Instance("my-pulumi-instance", new InstanceArgs
{
Name = "my-pulumi-instance",
Region = region,
Image = "ubuntu-ml-nvidia-pytorch",
Type = "vcpu-4_memory-12g_disk-80g_nvidia3080-1",
SshKeyIds = { "my-ssh-key-id" },
});
}
}

class Program
{
static Task<int> Main(string[] args) => Deployment.RunAsync<GenesisCloudInstance>();
}
```

{{% /choosable %}}
Expand Down
12 changes: 6 additions & 6 deletions docs/installation_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ The Pulumi Genesis Cloud provider is available as a package in the following lan
- JavaScript/TypeScript: [`@genesiscloud/pulumi-genesiscloud`](https://www.npmjs.com/package/@genesiscloud/pulumi-genesiscloud)
- Python: [`pulumi-genesiscloud`](https://pypi.org/project/pulumi-genesiscloud/)
- Go: [`github.com/genesiscloud/pulumi-genesiscloud/sdk/go/genesiscloud`](https://pkg.go.dev/github.com/pulumi/pulumi-genesiscloud/sdk)
- Dotnet: ...
- Dotnet: [GenesisCloud.PackagePulumi.Genesiscloud](https://www.nuget.org/packages/GenesisCloud.PulumiPackage.Genesiscloud)

### Provider Binary

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

```bash
pulumi plugin install resource genesiscloud <version> --server https://github.com/genesiscloud/pulumi-genesiscloud/releases/download/<version>
pulumi plugin install resource genesiscloud <version> --server github://api.github.com/genesiscloud
```

Replace the version string with your desired version.
Expand All @@ -31,7 +31,7 @@ To provision resources with the Genesis Cloud provider, you need to have a Genes

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

| Option | Required/Optional | Description |
| ---------- | ----------------- | ----------------------------------------------------------------------- |
| `token` | Required | Genesis Cloud access token |
| `endpoint` | Optional | The endpoint to use in the provider. Defaults to `api.genesiscloud.com` |
| Option | Environment Variables | Required/Optional | Description |
| ---------- | --------------------- | ----------------- | -------------------------------------------------------------------- |
| `token` | GENESISCLOUD_TOKEN | Required | Genesis Cloud access token |
| `endpoint` | GENESISCLOUD_ENDPOINT | Optional | The endpoint use in the provider. Defaults to `api.genesiscloud.com` |

0 comments on commit 1fb02a5

Please sign in to comment.