i see I could change it to `config.requireSecret("...
# general
g
i see I could change it to
config.requireSecret("databasePassword").get()
but docs suggest not to do this
b
@glamorous-waitress-51149 sorry was afk - have a look at this
g
yeah saw that but still no dice
tried
const databasePassword = config.requireSecret("databasePassword").apply(pwd=>pwd);
b
You may need to do it as part of the passing it to the rds instance
g
ok will try that
please hold…. 🙂
nope 😞
b
Mmmhhhhh that’s not good to hear
Let me see what I can find locally
g
cheers
our fault for not checking in a yarn.lock file
today’s builds have gone BOOM
Copy code
{
  "name": "aws-typescript",
  "devDependencies": {
    "@types/node": "12.11.7"
  },
  "dependencies": {
    "@pulumi/aws": "1.14.1",
    "@pulumi/awsx": "0.18.14",
    "@pulumi/pulumi": "1.7.0",
    "@types/mime": "2.0.1",
    "mime": "latest"
  }
}
that’s what we’re using
found a couple of GH issues that relate to typescript but my local version of TS is 2.9.2
and those issues were around later versions
t
Were you able to solve this? You should be able to assign outputs to inputs directly.
g
I wasn’t, @broad-dog-22463 any luck?
t
What's the error that you are getting? Your initial code looks fine.
g
I think something has changed in the pulumi libs but the error is this
Copy code
error: Running program '/Users/jonathan/Projects/Profiles/infra' failed with an unhandled exception:
    TSError: ⨯ Unable to compile TypeScript:
    index.ts(62,5): error TS2322: Type 'Output<string>' is not assignable to type 'Input<string>'.
      Type 'Output<string>' is not assignable to type 'OutputInstance<string>'.
        Types of property 'apply' are incompatible.
          Type '{ <U>(func: (t: string) => Promise<U>): import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").Output<U>; <U>(func: (t: string) => import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").OutputInstance<U>): import("/Users/jonathan/Projects/Profiles/infra/nod...' is not assignable to type '{ <U>(func: (t: string) => Promise<U>): import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").Output<U>; <U>(func: (t: string) => import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").OutputInstance<...>):...'.
            Type 'import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").Output<any>' is not assignable to type 'import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").Output<any>'.
              Type 'OutputInstance<any>' is not assignable to type 'Output<any>'.
                Type 'OutputInstance<any>' is not assignable to type 'OutputInstance<any> & LiftedObject<any, string>'.
                  Type 'import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").OutputInstance<any>' is not assignable to type 'import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").OutputInstance<any>'.
                    Types of property 'apply' are incompatible.
                      Type '{ <U>(func: (t: any) => Promise<U>): import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").Output<U>; <U>(func: (t: any) => import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").OutputInstance<U>): import("/Users/jonathan/Projects/Profiles/infra/node_modu...' is not assignable to type '{ <U>(func: (t: any) => Promise<U>): import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").Output<U>; <U>(func: (t: any) => import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").OutputInstance<U>): import(...'.
                        Type 'import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/pulumi/output").Output<any>' is not assignable to type 'import("/Users/jonathan/Projects/Profiles/infra/node_modules/@pulumi/aws/node_modules/@pulumi/pulumi/output").Output<any>'.
                          Type 'OutputInstance<any>' is not assignable to type 'Output<any>'.
                            Type 'OutputInstance<any>' is not assignable to type 'OutputInstance<any> & LiftedObject<any, string>'.
                              Type 'OutputInstance<any>' is not assignable to type 'LiftedObject<any, string>'.
t
whaaat... trying this locally.
g
its basically broken various resources where we do that today
t
Type 'OutputInstance<any>
is not assignable to type 'OutputInstance<any>` smells like version conflict
g
my package.json is above
i’ve nuked nodemodules etc
then reinstalled everything
and then get that error on pulumi preview
t
I copied your package.json, installed clean, and everything is fine
weird
No links or other fishy stuff?
g
hmm, thats odd as our CI server fails too as well as on my machine
you used:??
Copy code
const databasePassword = config.requireSecret("databasePassword")


const cluster = new aws.rds.Cluster("default", {
    masterPassword: databasePassword,
t
yes
g
wtf
could you send me your simple repro?
w
Type 'Output<string>' is not assignable to type 'Input<string>'.
Just opened https://github.com/pulumi/pulumi/issues/3652 which is tracking this. There is a workaround in the issue thread.
g
we found the opposite
nuking node modules and lock files still has the issue
w
Does your lock file include two different versions of
@pulumi/pulumi
? I suspect there is one nestled under
@pulumi/aws
in your node_modules based on the error above. I’d be pretty surprised if this happened on a truly fresh NPM install (without lock files).
g
Here’s my lock file. Hopefully it makes more sense to you than me
the package.json for that lock file is this:
Copy code
{
  "name": "aws-typescript",
  "devDependencies": {
    "@types/node": "12.11.7"
  },
  "dependencies": {
    "@pulumi/aws": "1.8.0",
    "@pulumi/awsx": "0.18.13",
    "@pulumi/pulumi": "1.5.2",
    "@types/mime": "2.0.1",
    "mime": "latest"
  }
}
changed pulumi/pulumi to 1.7.0 and that fixed it for now