breezy-butcher-78604
08/19/2020, 8:31 AMawsx.ecs.FargateTaskDefinition
using secrets that contain Output<string>
however the underlying type - aws.ecs.Secret
has properties that are string
only. example code below:
const secret = new aws.secretsmanager.Secret("my-secret", {});
const taskDefinition = new awsx.ecs.FargateTaskDefinition("my-task-definition", {
executionRole: executionRole,
logGroup: logGroup,
container: {
image: "my-image:latest",
memory: 128,
cpu: 512,
portMappings: [{
protocol: "tcp",
containerPort: 8080,
}],
secrets: [
{ name: "MY_SECRET", valueFrom: secret.arn }
]
}
});
this produces build errors since the aws.ecs.Secret
type is defined as follows:
interface Secret {
name: string;
valueFrom: string;
}
and valueFrom
expects a string and not an Output<string>
which is returned from secret.arn
how can i coerce the types to allow this to work?millions-furniture-75402
08/19/2020, 12:54 PM// @ts-ignore
for cases like this.little-cartoon-10569
08/19/2020, 8:52 PM.toString()
on an Output..breezy-butcher-78604
08/20/2020, 2:44 AM