Giter Club home page Giter Club logo

pulumi-ovh's Introduction

OVH Resource Provider

The OVH Resource Provider lets you manage OVHcloud resources.

GitHub release GoDoc NPM version PyPI version NuGet version Contribute with Gitpod

Usage

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:

npm install @ovh-devrelteam/pulumi-ovh

or yarn:

yarn add @ovh-devrelteam/pulumi-ovh

Python

To use from Python, install using pip:

pip install pulumi-ovh

Go

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

go get github.com/ovh/pulumi-ovh/sdk/go/...

.NET

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

dotnet add package Pulumi.Ovh

Configuration

The following configuration points are available for the Ovh provider:

  • ovh:endpoint (environment: OVH_ENDPOINT) - the Ovh endpoint, such ovh-eu
  • ovh:applicationKey (environment: OVH_APPLICATION_KEY) - the Ovh application key
  • ovh:applicationSecret (environment: OVH_APPLICATION_SECRET) - the Ovh application secret
  • ovh:consumerKey (environment: OVH_CONSUMER_KEY) - the Ovh consumer key

Reference

For detailed reference documentation, please visit the Pulumi registry.

pulumi-ovh's People

Contributors

dependabot[bot] avatar dirien avatar ovh-cds avatar ringods avatar scraly avatar sean1588 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pulumi-ovh's Issues

adding taints to nodepools results in panic

This is my current nodepool. Uncommenting the taints spec I added yields an error.

const enum NodeType {
  GeneralPurpose = "generalPurpose",
  Small = "small",
  Medium = "medium",
  Huge = "huge",
}

const smallMemoryNodePools = new ovh.cloudproject.KubeNodePool(
  "ovh-nodepool-small",
  {
    serviceName: projectId,
    kubeId: cluster.id,
    desiredNodes: 1,
    flavorName: "r2-30", // Choose from https://www.ovhcloud.com/fr/public-cloud/prices/
    maxNodes: 3,
    minNodes: 1,
    autoscale: true,
    antiAffinity: false,
    monthlyBilled: false,

    template: {
      metadata: {
        annotations: {},
        finalizers: [],
        labels: {
          nodeType: NodeType.Small,
        },
      spec: {
		taints: [],
        // taints: [{
        //  key: "highMemory",
        //  value: "true",
        //  effect: "NoExecute",
        // }],
        unschedulable: false,
      },
    },
  },
  { provider: ovhProvider },
);

The error:

❯ pulumi up -t urn:pulumi:test-pulumi2::avatar-ovh::ovh:CloudProject/kubeNodePool:KubeNodePool::ovh-nodepool-small
Previewing update (test-pulumi2):
     Type                              Name                     Plan       Info
     pulumi:pulumi:Stack               avatar-ovh-test-pulumi2             1 error; 30 messages
 ~   └─ ovh:CloudProject:KubeNodePool  ovh-nodepool-small       update     [diff: ~template]; 1 error

Diagnostics:
  pulumi:pulumi:Stack (avatar-ovh-test-pulumi2):
    panic: fatal: A failure has occurred: Unexpected multiple elements in array with MaxItems=1
    goroutine 99 [running]:
    github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/util/contract/failfast.go:23
    github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Failf({0x14ce6c9?, 0xc000316000?}, {0x0?, 0x12b16a0?, 0x1463920?})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/util/contract/fail.go:32 +0xcd
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutput.func1({0x16d24b8, 0xc000232180}, {0x140e720, 0xc000a80c40}, {0x16d36c0, 0xc000316000}, 0x0, 0xc000af5ef0, 0x0, 0x1)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/schema.go:1057 +0xb9e
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutput({0x16d24b8?, 0xc000232180?}, {0x140e720?, 0xc000a80c40?}, {0x16d36c0?, 0xc000316000?}, 0xc000af4e10?, 0xc0009bc000?, 0x20?, 0x1)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/schema.go:1085 +0x70
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutputs({0x16d24b8, 0xc000232180}, 0xc0003458f0?, {0x16c8b28, 0xc0003458f0}, 0x115c468?, 0x13f0bc0?, 0x0?, 0x48?)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/schema.go:958 +0x1a6
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformResult({0x16d24b8?, 0xc000232180?}, {0x16c5030, 0xc000a56cc0}, {0x16c8b28?, 0xc0003458f0?}, 0xc0003458f0?, 0x1f?, 0x10?)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/schema.go:933 +0xe5
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Update(0xc0001622c0, {0x16c4188?, 0xc000af4810?}, 0xc0003c6990)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/provider.go:983 +0xae5
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler.func1({0x16c4188, 0xc000af4810}, {0x13f88e0?, 0xc0003c6990})
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:609 +0x7b
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x16c4188, 0xc000a8de00}, {0x13f88e0, 0xc0003c6990}, 0xc000a7a940, 0xc000a4eaf8)
    	/home/runner/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/go/otgrpc/server.go:57 +0x3e8
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Update_Handler({0x144f680?, 0xc0001622c0}, {0x16c4188, 0xc000a8de00}, 0xc000199a40, 0xc000232d00)
    	/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:611 +0x138
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc000446000, {0x16ce920, 0xc000552000}, 0xc000920b40, 0xc0003b4960, 0x2112cf0, 0x0)
    	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1360 +0xe23
    google.golang.org/grpc.(*Server).handleStream(0xc000446000, {0x16ce920, 0xc000552000}, 0xc000920b40, 0x0)
    	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1737 +0xa36
    google.golang.org/grpc.(*Server).serveStreams.func1.1()
    	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:982 +0x98
    created by google.golang.org/grpc.(*Server).serveStreams.func1
    	/home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:980 +0x18c

    error: preview failed

  ovh:CloudProject:KubeNodePool (ovh-nodepool-small):
    error: Preview failed: error reading from server: EOF

and the current state known to pulumi:

                {
                    "urn": "urn:pulumi:test-pulumi2::avatar-ovh::ovh:CloudProject/kubeNodePool:KubeNodePool::ovh-nodepool-small",
                    "custom": true,
                    "id": "7cb6b01e-01cf-4ac5-97b0-f5cb9a6c9ed8",
                    "type": "ovh:CloudProject/kubeNodePool:KubeNodePool",
                    "inputs": {
                        "__defaults": [
                            "name"
                        ],
                        "antiAffinity": false,
                        "autoscale": true,
                        "desiredNodes": 1,
                        "flavorName": "r2-30",
                        "kubeId": "7fd80973-ea87-4798-b199-5ffdb53e7974",
                        "maxNodes": 3,
                        "minNodes": 1,
                        "monthlyBilled": false,
                        "name": "ovh-nodepool-small-b905dfa",
                        "serviceName": "a40323b0eccb4606a325ef743c5dd17d",
                        "template": {
                            "__defaults": [],
                            "metadata": {
                                "__defaults": [],
                                "annotations": {
                                    "__defaults": []
                                },
                                "finalizers": [],
                                "labels": {
                                    "__defaults": [],
                                    "nodeType": "small"
                                }
                            },
                            "spec": {
                                "__defaults": [],
                                "taints": [],
                                "unschedulable": false
                            }
                        }
                    },
                    "outputs": {
                        "__meta": "{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":1200000000000,\"default\":600000000000,\"delete\":600000000000,\"read\":300000000000,\"update\":600000000000}}",
                        "antiAffinity": false,
                        "autoscale": true,
                        "availableNodes": 1,
                        "createdAt": "2023-10-06T15:45:30Z",
                        "currentNodes": 1,
                        "desiredNodes": 1,
                        "flavor": "r2-30",
                        "flavorName": "r2-30",
                        "id": "7cb6b01e-01cf-4ac5-97b0-f5cb9a6c9ed8",
                        "kubeId": "7fd80973-ea87-4798-b199-5ffdb53e7974",
                        "maxNodes": 3,
                        "minNodes": 1,
                        "monthlyBilled": false,
                        "name": "ovh-small-nodepool-b905dfa",
                        "projectId": "a40323b0eccb4606a325ef743c5dd17d",
                        "serviceName": "a40323b0eccb4606a325ef743c5dd17d",
                        "sizeStatus": "CAPACITY_OK",
                        "status": "READY",
                        "template": {
                            "metadata": {
                                "annotations": {},
                                "finalizers": [],
                                "labels": {
                                    "nodeType": "small"
                                }
                            },
                            "spec": {
                                "taints": [],
                                "unschedulable": false
                            }
                        },
                        "upToDateNodes": 1,
                        "updatedAt": "2023-10-11T15:55:43Z"
                    },
                    "parent": "urn:pulumi:test-pulumi2::avatar-ovh::pulumi:pulumi:Stack::avatar-ovh-test-pulumi2",
                    "dependencies": [
                        "urn:pulumi:test-pulumi2::avatar-ovh::ovh:CloudProject/kube:Kube::test-pulumi2-app"
                    ],
                    "provider": "urn:pulumi:test-pulumi2::avatar-ovh::pulumi:providers:ovh::ovh-provider::05245939-c1d9-4bc8-ad0b-f9ce3c350d5a",
                    "propertyDependencies": {
                        "antiAffinity": null,
                        "autoscale": null,
                        "desiredNodes": null,
                        "flavorName": null,
                        "kubeId": [
                            "urn:pulumi:test-pulumi2::avatar-ovh::ovh:CloudProject/kube:Kube::test-pulumi2-app"
                        ],
                        "maxNodes": null,
                        "minNodes": null,
                        "monthlyBilled": null,
                        "serviceName": null,
                        "template": null
                    },
                    "created": "2023-10-06T15:50:03.05906Z",
                    "modified": "2023-10-11T15:55:43.476637361Z",
                    "sourcePosition": "project:///cluster.ts#57,30"
                },

Changing anything else makes the pulumi up preview work correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.