Closed andrewthetechie closed 2 years ago
Hi @andrewthetechie, thanks for opening the issue and a great catch!
Would you like to submit a PR for the fix?
It will require:
tags
field here similar to here, as you mentioned28_v0.11.2.up.sql
and 28_v0.11.2.down.sql
. You can see an example on how to add a column here. The tags column type should probably be jsonb
as here. Bonus - add tags to our terraform files here so it is added to our testing environment.
@erezrokah I'll take a shot at it, but I don't write golang frequently so I may run into issues.
Thanks @andrewthetechie! I appreciate you looking into it. If you run into any problems let us know by commenting in the issue 🚀
Closing as this issue was fixed and released
Describe the bug
aws_sns_topics table is not storing tags from the AWS SNS Topics
Expected Behavior
Tags for SNS Topics would be stored in the cloudquery database
Steps to Reproduce
Setup a SNS topic with a tag Fetch SNS topic resources using cloudquery Inspect the table schema + resources fetched and see the tag is not reflected
Possible Solution
https://github.com/aws/aws-sdk-go-v2/blob/a1ee023a21f3cfd5c85ddae881264dbedcd1dffc/service/sns/api_op_ListTagsForResource.go The go sdk supports the ListTagsForResource api call needed to pull tags
This would be similar to how SQS handles getting tags https://github.com/cloudquery/cq-provider-aws/blob/0173988c12a0ce54ec9865e9d8fea8ad354b3db9/resources/services/sqs/queues.go#L230
Provider and CloudQuery version
Version: 0.22.7 Commit: fb5a1447e0851d96af0fb7d522585bf78566ff3f Date: 2022-04-19T08:55:30Z provider "aws" { version = "v0.10.19" }
Additional Context
It seems like this might just be an omission as most other AWS resources store their tags