Closed MatheusAnciloto closed 2 weeks ago
I have it working now after understanding better this line here:
resourceInputs["apiKey"] = (args?.apiKey ? pulumi.secret(args.apiKey) : undefined) ?? utilities.getEnv("VULTR_API_KEY");
even though I've done pulumi config set vultr:apiKey VULTR_API_KEY
before pulumi up
I have the same problem. But I don't see how to fix it. I am missing something. Could you share some more of the code that worked for you?
Thank you
Hey @toddgeist
So in my case, I tried to follow the official docs from here first:
Use pulumi config set vultr:<option>.
The following configuration points are available for the vultr provider:
vultr:apiKey (environment: VULTR_API_KEY) - This is the Vultr API key. It can be found in the [Vultr API section](https://my.vultr.com/settings/#settingsapi).
vultr:rateLimit - Vultr limits API calls to 30 calls per second. This field lets you configure how the rate limit using milliseconds. The default value if this field is omitted is 500 milliseconds per call.
vultr:retryLimit - This field lets you configure how many retries should be attempted on a failed call. The default value if this field is omitted is 3 retries.
This didn't work, so I made sure that I didn't have any of this config set up in my pulumi stack. You can check by running a pulumi config
.
So my alternative was running export VULTR_API_KEY=<key>
in the same terminal that I run pulumi up
, which works!
here's an example of a simple cluster I deployed to test the connection:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@ediri/vultr";
import * as k8s from "@pulumi/kubernetes";
import * as docker from "@pulumi/docker";
import * as dotenv from "dotenv";
dotenv.config();
const testCluster = new vultr.Kubernetes("test-cluster", {
region: "atl",
version: "v1.31.0+1",
label: "test-cluster",
nodePools: {
nodeQuantity: 1,
plan: "vc2-1c-2gb",
label: "test-nodepool",
},
});
Thank you! That worked!
Todd
Hi
I'm testing this package in a new stack and I just can't have the provider working. I've tested setting up with pulumi config set vultr:apiKey and even adding the provider, they both fail.
With only the config set I get these errors in my preview:
when I create the provider:
it fails like this:
I'd like to understand what I'm missing here
I validated the API key env it's with the correct string and the vultr:apiKey does exist when I run
pulumi config