pulumi and ts noob here. I'm attempting to create ...
# typescript
c
pulumi and ts noob here. I'm attempting to create a k8s cluster with eks and I'd like to set the public key used for the VMs. This is what I've got: const nodePublicKeyPair = new aws.ec2.KeyPair("eks", { publicKey: "ssh-rsa ..." }) const cluster = new eks.Cluster(env, { ... nodePublicKey: nodePublicKeyPair, ... }) That errors out with this error: Types of property 'nodePublicKey' are incompatible. Type 'KeyPair' is not assignable to type 'string | Promise<string> | OutputInstance<string> | undefined'. Type 'KeyPair' is missing the following properties from type 'OutputInstance<string>': apply, get Any ideas?
n
you are trying to pass an object of type
aws.ec2.KeyPair
to the
eks.Cluster.nodePublicKey
property, which expects a string. Option A:
Copy code
const cluster = new eks.Cluster(env, {
  ...
  nodePublicKey: "ssh-rsa...",
  ...
})
Option B:
Copy code
const cluster = new eks.Cluster(env, {
  ...
  nodePublicKey: nodePublicKeyPair.nodePublicKey,
  ...
})