fix(aws)!: Unified tag structure#3330
Conversation
| Name: "user_tags", | ||
| Type: schema.TypeJSON, | ||
| Resolver: `client.ResolveTags`, | ||
| Resolver: `client.ResolveTags`, // FIXME this is wrong, add path |
There was a problem hiding this comment.
This needs to be client.ResolveTagField("User.Tags") or something like that but I'm not sure about the syntax... (parent struct also has Tags and it's handled by the auto resolver)
There was a problem hiding this comment.
Tested: User tags are not exposed in the User struct from ListVirtualMFADevices, so removing this column.
erezrokah
left a comment
There was a problem hiding this comment.
Nice touch with the custom resolver.
I think this should be a fix! as it's a breaking change (even without the column rename)
JSON is JSON though... and we weren't intending these to be arrays. |
Yeah, but the schema of the JSON is different correct? i.e. if someone has a query on it, that query will break? |
yes but it will be better in the end |
Agree it's better but it's still breaking, and with a major version bump it's clear to users that they need to update their queries |
FWIW the columns in some of these tables pre-V1 are type(Object) but in V1 are type(Array). This change would make it so that we don't have breaking changes |
Thanks for the added context @Barneyjm. Agree this is not breaking compared to v0, but it can be considered breaking compared to the latest version of the latest AWS plugin. We can make this clear with a note in the changelog, WDYT? |
|
This doesn't help resources that have to make specific call to get tags like Neptune/DocDB/RDS: cloudquery/plugins/source/aws/codegen/recipes/neptune.go Lines 26 to 29 in 776d849 |
455b358 to
fbc4cd4
Compare
🤖 I have created a release *beep* *boop* --- ## [4.0.0](plugins-source-aws-v3.8.0...plugins-source-aws-v4.0.0) (2022-11-02) ### ⚠ BREAKING CHANGES * **aws:** Unified tag structure (#3330) ### Features * Add eventbridge resources ([#3160](#3160)) ([67d3a35](67d3a35)) * **aws:** Fraud Detector support ([#3076](#3076)) ([f0e309a](f0e309a)) * Migrate cli, plugins and destinations to new type system ([#3323](#3323)) ([f265a94](f265a94)) * Update AWS Services (new fields) ([#3324](#3324)) ([0b65803](0b65803)) ### Bug Fixes * Add id to aws_cloudfront_cache_policies, region to aws_ec2_transit_gateways ([#3444](#3444)) ([41362e2](41362e2)) * **aws:** Unified tag structure ([#3330](#3330)) ([c9c1e4c](c9c1e4c)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/credentials to v1.12.23 ([#3378](#3378)) ([c33bf73](c33bf73)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.11.37 ([#3379](#3379)) ([3f1a71d](3f1a71d)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/acm to v1.15.2 ([#3380](#3380)) ([b4329ee](b4329ee)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/apigateway to v1.15.22 ([#3381](#3381)) ([5816480](5816480)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/apigatewayv2 to v1.12.20 ([#3385](#3385)) ([2dd39a6](2dd39a6)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/applicationautoscaling to v1.15.20 ([#3386](#3386)) ([0702717](0702717)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/appsync to v1.15.12 ([#3387](#3387)) ([6bb936a](6bb936a)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/athena to v1.18.12 ([#3388](#3388)) ([e95f748](e95f748)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/autoscaling to v1.23.18 ([#3389](#3389)) ([5af977f](5af977f)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/backup to v1.17.11 ([#3390](#3390)) ([1ecaab7](1ecaab7)) * **deps:** Update module github.com/aws/aws-sdk-go-v2/service/cloudfront to v1.20.7 ([#3391](#3391)) ([46465d1](46465d1)) * **deps:** Update plugin-sdk for aws to v0.13.17 ([#3399](#3399)) ([f2cd266](f2cd266)) * **deps:** Update plugin-sdk for aws to v0.13.18 ([#3409](#3409)) ([92fa576](92fa576)) * Filtering for DocDB + Neptune ([#3271](#3271)) ([8080c6e](8080c6e)) * Update endpoints ([#3368](#3368)) ([b78c6b1](b78c6b1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fixes #3280
All tags (except one) should be JSON objects (and not JSON arrays) now.
The exception is
aws_autoscaling_groups, whichtagsis defined as[]TagDescription, which is defined as: