Add support for exposing ECS (Fargate) task metadata
Type: Feature
Is your feature request related to a problem? Please describe.
Expose ECS (Fargate) metadata, similar to how EC2 metadata is currently exposed.
Describe the solution you'd like
Expose e.g. ECS task ARN as spring properties, so we can refer to it using @Value("ecs-metadata.task.TaskARN") or directly in application.yml: ${ecs-metadata.task.TaskARN}.
Describe alternatives you've considered
DIY lookup code, but this gets non-DRY fast, if used in many projects.
Additional context
N/A
Sounds reasonable. Would you like to contribute it?
Sounds reasonable. Would you like to contribute it?
I will give it a spin 👍
@maciejwalkowiak I've added some initial code for this in https://github.com/awspring/spring-cloud-aws/pull/1485 (somewhat mimicking the imds code), I will work to add tests etc next, if the code looks sane to begin with