This message was deleted.
# general
s
This message was deleted.
w
Copy code
const dbMigrateTask = new awsx.ecs.FargateTaskDefinition(
  'setup-db',
  {
    container: {
      image: image,
      command: pulumi
        .all([rdsInstance.endpoint])
        .apply(([url]) => ['/bin/sh', '-c', `DATABASE_URL=${url} npx prisma migrate deploy`]),
      environment: [
        {
          name: 'DATABASE_URL',
          value: rdsInstance.endpoint.apply(
            (v) => `postgresql://${rdsSettings.username}:${rdsSettings.password}@${v}/${rdsSettings.database}`,
          ),
        },
      ],
    },
  },
  { dependsOn: [rdsInstance] },
)

dbMigrateTask.run({ cluster: cluster })
Also tried the following, but getting
Copy code
Error: Cannot call '.get' during update or preview.
    To manipulate the value of this Output, use '.apply' instead.
Any ideas?
g
So I don't really recognize that package, so I'll let a community member weigh in if they have used it.
For your code with awsx, though, the error message doesn’t really match the code as I don’t see a
.get
, but I do see a few
.apply
calls. I'm not quite sure what's going on. Can you run a pulumi up with debugging on?
Copy code
TF_LOG=TRACE pulumi up --logtostderr -v=9 2> out.txt