sparse-intern-71089
08/11/2023, 1:09 AMpolite-kite-18322
08/11/2023, 1:11 AMdir
to see if I could generate the desired zip file but to no avail:
const lambdaBuild = local.runOutput({
dir: "pretokengeneration",
command: `cd src && npm install && tsc`,
archivePaths: ["dist/**", "!dist/**/test/**"]
});
...
// then I provide it to pulumi.aws.Function like this
code: lambdaBuild.archive,
polite-kite-18322
08/11/2023, 3:45 PMbrave-planet-10645
08/11/2023, 4:02 PMconst fn = new aws.lambda.Function("fn", {
code: new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive("./dist")
},
... rest of lambda
});
brave-planet-10645
08/11/2023, 4:02 PMpolite-kite-18322
08/11/2023, 4:02 PMpolite-kite-18322
08/11/2023, 4:03 PMbrave-planet-10645
08/11/2023, 4:04 PMpolite-kite-18322
08/11/2023, 5:15 PMbrave-planet-10645
08/11/2023, 5:25 PMbrave-planet-10645
08/11/2023, 5:28 PMpolite-kite-18322
08/11/2023, 5:59 PMpolite-kite-18322
08/11/2023, 6:00 PMpolite-kite-18322
08/11/2023, 6:04 PMFileArchive
so not sure how to understand what they actually resolve to.polite-kite-18322
08/11/2023, 6:14 PMSo I think it’s the archive paths input in the command resource that’s doing this. Can you not use that and use the assets.archive bit in the function resource to zip it up?What is an "assets.archive" bit? What is a "function resource"? Is that the Lambda defn?
polite-kite-18322
08/11/2023, 6:16 PMlocal.runOutput
approach.
const fn = new aws.lambda.Function("fn", {
code: new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive("./dist")
},
... rest of lambda
});
polite-kite-18322
08/11/2023, 6:17 PM./dist
folder structure in it:
new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive("./dist")
},
should I just use bash and zip tooling that I understand? This is really frustrating.quaint-army-32339
08/11/2023, 8:19 PMpolite-kite-18322
08/11/2023, 8:20 PMpolite-kite-18322
08/11/2023, 8:22 PMpulumi.yaml
brave-planet-10645
08/11/2023, 8:24 PMapp
folder.brave-planet-10645
08/11/2023, 8:25 PMpolite-kite-18322
08/11/2023, 8:29 PMindex.js
and package.json
at the root?
Then my issue is somewhere else like:
• i'm not looking at the archive I think I'm looking at
• linux is doing something different than other platforms
• some other simple failure on my end.polite-kite-18322
08/11/2023, 8:29 PMbrave-planet-10645
08/11/2023, 8:31 PMpolite-kite-18322
08/11/2023, 8:32 PM./app
folder are appearing in the root of the archive and not in an app
folder in the archive.brave-planet-10645
08/11/2023, 8:39 PMpolite-kite-18322
08/14/2023, 4:19 PMaws
is misrepresenting what is in the package.
When I downloaded the archive (export function) it looks correct!!!polite-kite-18322
08/14/2023, 4:40 PMtsc
step is triggered reliably before the archive is created. Trying to to figure out how a Output<runResult>
can be used as a DependsOn (it only accepts Input<Resource>
types).brave-planet-10645
08/14/2023, 4:43 PMpolite-kite-18322
08/14/2023, 5:20 PMbrave-planet-10645
08/15/2023, 9:36 AMrunResult
coming from?