sparse-intern-71089
03/02/2022, 2:39 PMwhite-airport-78661
03/02/2022, 2:58 PMconst 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
Error: Cannot call '.get' during update or preview.
To manipulate the value of this Output, use '.apply' instead.
Any ideas?great-queen-39697
03/02/2022, 8:06 PMgreat-queen-39697
03/02/2022, 8:09 PM.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?
TF_LOG=TRACE pulumi up --logtostderr -v=9 2> out.txt