Getting an interesting error.. not sure what is ca...
# getting-started
d
Getting an interesting error.. not sure what is causing this nor can I find anything in the pulumi repo what could cause this error `13 INTERNAL: Request message serialization failure: b.Va is not a function`:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (k8s-production):
    warning: using pulumi-resource-pnap from $PATH at [PATH]/k8s-pulumi/pulumi-pnap/bin/pulumi-resource-pnap
    error: Running program '[PATH]/k8s-pulumi/pulumi-k8s/k8s/' failed with an unhandled exception:
    <ref *1> Error: failed to register new resource k8s-prd-3-configurationApply [talos:machine/configurationApply:ConfigurationApply]: 13 INTERNAL: Request message serialization failure: b.Va is not a function
        at Object.registerResource ([PATH]/k8s-pulumi/pulumi-k8s/node_modules/@pulumi/runtime/resource.ts:455:27)
        at new Resource ([PATH]/k8s-pulumi/pulumi-k8s/node_modules/@pulumi/resource.ts:507:13)
        at new CustomResource ([PATH]/k8s-pulumi/pulumi-k8s/node_modules/@pulumi/resource.ts:962:9)
        at new ConfigurationApply ([PATH]/k8s-pulumi/pulumi-k8s/node_modules/@pulumiverse/machine/configurationApply.ts:114:9)
        at createTalosCluster ([PATH]/k8s-pulumi/pulumi-k8s/common/talos.ts:66:43)
        at Object.<anonymous> ([PATH]/k8s-pulumi/pulumi-k8s/k8s/index.ts:10:53)
        at Module._compile (node:internal/modules/cjs/loader:1256:14)
        at Module.m._compile ([PATH]/k8s-pulumi/pulumi-k8s/node_modules/ts-node/src/index.ts:439:23)
        at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
        at Object.require.extensions.<computed> [as .ts] ([PATH]/k8s-pulumi/pulumi-k8s/node_modules/ts-node/src/index.ts:442:12) {
      promise: Promise { <rejected> [Circular *1] }
    }
m
What are you trying to do? Can you share the relevant code?
d
This happens on pulumi preview; and I have a minimal reproducible piece of code like this:
Copy code
import 'dotenv/config';
import * as pulumi from '@pulumi/pulumi';
import * as cloudflare from '@pulumi/cloudflare';
import * as pnap from '@phoenixnap/pulumi-pnap';

const config = new pulumi.Config();
const clusterName = config.require('clusterName');
const cloudflareDomain = config.require('cloudflareDomain');

function createPrivateNetwork(name: string, location: string, cidr: string) {
  return new pnap.PrivateNetwork(name, {
    name: name,
    description: "Pulumi-managed private network (k8s-pulumi)",
    location: location,
    locationDefault: false,
    cidr: cidr,
  });
}

const privateNetwork = createPrivateNetwork(`${clusterName}-private`, 'ASH', '10.10.0.0/24');
const cloudflareZone = cloudflare.getZoneOutput({ name: cloudflareDomain });
the error happens when I have both these resources present; but when I comment out the cloudflareZone the error disappears and
pulumi preview
works just fine.
l
Hello, were you able to fix this issue? running into the same thing.
194 Views