abbreviated config: ```const parameter = new aws....
# general
s
abbreviated config:
Copy code
const parameter = new aws.ssm.Parameter("SECRET", {
    type: "SecureString",
    value: config.requireSecret("myPulumiSecret"),
});

const service = new awsx.ecs.FargateService("service", {
    cluster,
    desiredCount: 2,
    taskDefinitionArgs: {
        container: {
            secrets: [{
                name: parameter.name,
                valueFrom: parameter.arn, // FAILS, Type 'Output<string>' is not assignable to type 'string'.
            }],
        },
    }
});
t
Looks a bit nasty, but should work:
Copy code
secrets: pulumi.all([parameter.name, parameter.arn])
                .apply(([name, valueFrom]) => [{ name, valueFrom }])
s
perfect, it does!
thank you 😄
t
I'm curious to know why those values are strings cc @lemon-spoon-91807
l
In Container? Because we haven't properly input-ized it
Is just a bug in the TS typings
In js it should work
t
> we haven't properly input-ized it why?
l
Because no one did it :-D
It's hand written
And likely was written in 5 min two years ago :-)
s
I am sympathetic to these challenges 😂
it's a great tool, thanks for answering my question and then sharing this discussion 🙂
l
absolutely!
note: you should be able to workaround this currently by writing:
valueFrom: <any>parameter.arn
it's basically telling TS to stop checking things
(it will also mask real mistakes if you make them)
but it will at least unblock you until we fix the TS typings for this type
s
thanks, good tip
I don't mind the extra work for type safety though 🙂
l
would you be willing to file an issue on us so this doesn't get lost?
i can do it too, just harder from phone
s
I can indeed
I'll paste here shortly