-
Notifications
You must be signed in to change notification settings - Fork 108
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
Resolved InvalidParameterException
in aws_ecs_service
table when listing tags for older services. Closes #2388
#2410
Conversation
…listing tags for older services. Closes #2388
@ParthaI has the |
Yes, the ARN format has changed, and currently, AWS supports both formats, as mentioned in this documentation. We might need to upgrade the resource, but it's unclear how long AWS will continue supporting the old format. Tasks launched by an Amazon ECS service can only receive the new ARN and resource ID format if the service was created on or after November 16, 2018, and the user who created the service has opted in to the new format for tasks. The timeline for the opt-in and opt-out periods for the new Amazon Resource Name (ARN) and resource ID format for Amazon ECS resources ended on April 1, 2021. By default, all accounts are opted in to the new format. All new resources created receive the new format, and you can no longer opt out. |
@ParthaI can we update the plugin code to use the new ARN format to make the |
@ParthaI Managed to install it and run the plugin from this branch. Now I'm getting the following error.
Query: select
account_id,
region,
arn,
tags -- Fetching tags causes the issue
from
aws_ecs_service; It's again pretty hard to pinpoint it to the specific record causing it. Does the error message already help you? |
Ah, my apologies for the oversight. I have now pushed a fix, and it should work as expected. The root cause of the issue was that the list API call for the cluster did not return the Could you please try again after pulling the latest changes from the branch? Note: It would be helpful to verify whether the cluster name is being returned for older clusters before running the query to fetch the tags for the services. Thank you! |
@ParthaI Thank you very much for addressing this so quickly! I think it's a good step further, but I get another error:
In terms of cluster names, Query: select
service.account_id,
service.region,
service.arn,
service.cluster_arn,
cluster.cluster_name as cluster_name, -- All cluster names look fine here
cluster.tags as cluster_tags
-- service.tags as service_tags -- This causes the error
from
aws_ecs_service service
left join aws_ecs_cluster cluster
on cluster.cluster_arn = service.cluster_arn; |
Hmm, the error indicates that we cannot make the API call by updating the ARN format for the older service. Could you please confirm whether the AWS CLI command successfully retrieves the tag details for the older service? If so, could you kindly share the CLI command along with the specific ARN format used for the older service? This would help us update the table code accordingly to match the correct format. |
Furthermore, according to the AWS documentation, to tag a service that follows the older ARN format, you must migrate it to the long ARN format. Documentation Reference: AWS ECS API - TagResource However, I couldn't find any documentation stating that the ListTagsForResource API cannot be used to retrieve tags for older services. |
Integration test logs
Logs
Example query results
Results