best-lifeguard-91445
11/19/2021, 2:27 AMlittle-cartoon-10569
11/19/2021, 2:46 AMbest-lifeguard-91445
11/19/2021, 2:59 AMlittle-cartoon-10569
11/19/2021, 3:03 AMapply()
, or
2) create the TableItem outside your Pulumi program, possibly in another program, in another inline automation-api program, or outside Pulumi altogether, using the normal DynamoDB SDK or API.apply
, you can use pulumi.interpolate
.pulumi.interpolateJson
function to make it even easier...red-match-15116
11/19/2021, 3:07 AMpulumi.Input
from all input types just because of redundancy but they're always `Input`s. It would probably make sense to have some sort of one-liner to that effect in the docs though.little-cartoon-10569
11/19/2021, 3:08 AMred-match-15116
11/19/2021, 3:08 AMstr
but other than that I didn't know that that was a thing.best-lifeguard-91445
11/19/2021, 3:25 AMlittle-cartoon-10569
11/19/2021, 3:27 AMbest-lifeguard-91445
11/19/2021, 3:30 AMlittle-cartoon-10569
11/19/2021, 3:31 AMconst item = resource.foobar.apply(foo => JSON.stringify({ "key": `${foo}bar`})); // item is a pulumi.Output<string>
const ti = new aws.dynamodb.TableItem("ti", {
tableName: table.name,
hashKey: table.hashKey,
item: item
}, opts);
best-lifeguard-91445
11/19/2021, 3:32 AM{
foo: Output<string>
bar: Output<string>
}
would Pulumi.output() evaluate each property?little-cartoon-10569
11/19/2021, 3:40 AMapply()
, or use pulumi.all()
.pulumi.all()
has some examples here: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#allapply()
, it it's more readable. Though since this is a TableItem and you're building JSON, I think you're probably better off with pulumi.all()
.