-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FargateService keeps telling me to define a container, and I have. #820
Comments
This appears to be related to If I do the following:
It works successfully. |
Hi @jaxxstorm I also stumbled on this error, when there is an error in the container config it just ignores the container. Looking at your snippet using cheers |
@jaxxstorm Is there any sort of update on this? I am experiencing the issue when I provide an I am defining a custom TargetGroup, rather than grabbing In fact, I'm not using awsx for any of the LB resources (alb, target groups, listeners, listener rules, etc) |
I'm doing the same thing successfully on an |
Just confirmed that my EC2Service also works when the target group is provided via StackReference |
I am seeing the same issue when passing a custom TargetGroup in the portMappings config for a awsx.ecs.FargateService. |
I've been seeing this issue too, and if you add multiple containers you will get even more funny message, anyway I was able to solve it by: loadbalancer.defaultTargetGroup.apply(targetGroup => {
new awsx.ecs.FargateService("cal", {
// ...
taskDefinitionArgs: {
container: {
// ...
portMappings: [{ targetGroup }]
}
}
});
}) Although, I've changed that to: new awsx.ecs.FargateService("cal", {
// ...
taskDefinitionArgs: {
container: {
// ...
portMappings: [{ targetGroup: loadbalancer.defaultTargetGroup }]
}
}
}, {
dependsOn: [loadBalancer.defaultTargetGroup]
}); I use |
I think the type definition of the new awsx.ecs.FargateService("cal", {
// ...
taskDefinitionArgs: {
container: {
// ...
portMappings: [
{
targetGroup: { arn: loadbalancer.arn, port: loadbalancer.port } as any,
}
],
},
// ...
},
}) |
We had the same issue. Using a custom target group in
But we found a workaround! After wrapping the new
|
I'm currently running into this issue when using the Using AWS Elastic Container Service example. Seems like it still isn't fixed? |
this is still a problem, though wrapping the targetGroup in an output is an effective workaround |
This appears to be due to the underlying pulumi/pulumi#13802 in the core platform. I believe it will need to be fixed there. |
For me the problem was sharing the same |
I believe I have run into a related issue. We are successfully able to use a custom targetGroup, but the object is mangled in the stack. {
"containerDefinitions": [
{
"portMappings": [
{
"containerPort": 3000,
"protocol": "tcp",
"targetGroup": {
"__pulumiResource": true,
"__pulumiType": "aws:lb/targetGroup:TargetGroup",
"__transformations": [],
"__name": "tg-grafana-prod",
"__providers": {},
"__protect": false,
"__version": "6.9.0",
"__aliases": [
"Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi."
],
"urn": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"id": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"connectionTermination": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"deregistrationDelay": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"healthCheck": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"ipAddressType": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"lambdaMultiValueHeadersEnabled": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"loadBalancingAlgorithmType": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"loadBalancingCrossZoneEnabled": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"name": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"namePrefix": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"port": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"preserveClientIp": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"protocol": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"protocolVersion": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"proxyProtocolV2": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"slowStart": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"stickiness": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"tags": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"targetFailovers": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"targetHealthStates": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"targetType": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"vpcId": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"arn": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"arnSuffix": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"tagsAll": "Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\\nThis function may throw in a future version of @pulumi/pulumi.",
"__pulumiCustomResource": true
},
"hostPort": 3000
}
]
}
]
} This seems to also be what happens when you wrap the targetGroup in a interface CreateContainerArgs {
targetGroup: aws.lb.TargetGroup
}
function createService(args: CreateContainerArgs) {
new awsx.ecs.FargateService("test", {
// ...
taskDefinitionArgs: {
container: {
// ...
portMappings: [
{
targetGroup: args.targetGroup,
}
],
},
// ...
},
})
} Both result in the same mangled stack shown above |
What happened?
Steps to reproduce
Use the above code
Expected Behavior
I can define a fargate service
Actual Behavior
I cannot
Versions used
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: