Open zhangcheng opened 2 months ago
Thanks so much for posting this! To clarify, in your final working example you are passing log_configuration to awsx.ecs.FargateServiceTaskDefinitionArgs to make this work ?
It appears that https://github.com/pulumi/pulumi-awsx/issues/1112 also brought up the logs.undefined.amazonaws.com error message so we have an opportunity to improve the provider by picking a better working default logging configuration so that the example works out of the box.
Thanks so much for posting this! To clarify, in your final working example you are passing log_configuration to awsx.ecs.FargateServiceTaskDefinitionArgs to make this work ?
My final working example is:
task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs(
container=awsx.ecs.TaskDefinitionContainerDefinitionArgs(
name="my-service",
image="nginx:latest",
cpu=128,
memory=512,
essential=True,
log_configuration=awsx.ecs.TaskDefinitionLogConfigurationArgs(
log_driver="awslogs",
options={
"awslogs-group": log_group.name,
"awslogs-region": "us-west-2", # Replace with your region
"awslogs-stream-prefix": "ecs",
},
),
),
)
What happened?
I was trying the ECS example.
The container service won't start properly. I saw error as:
Clearly this part of
https://logs.undefined.amazonaws.com/
isn't correct, since my region config isus-west-2
and all resources were created there.Tried to explicitly specify region as AI suggested, didn't work.
Was using the latest
pulumi-awsx==2.9.0
andpulumi-aws==6.33.1
, downgraded to much earlier version, didn't work.Unless I explicitly set log_group, as:
This solved the issue finally.
Example
Output of
pulumi about
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).