feat: Provide a decoded policy document field inside aws_iam_policies.policy_version_list#2020
Conversation
….policy_version_list
hermanschaaf
left a comment
There was a problem hiding this comment.
Nice catch! I think we should probably decode the Document and place it back in the Document field, rather than introducing a non-standard DecodedDocument field that users will not be able to find in the documentation. This seems okay, we're doing the minimal transformation to make the data useful. What do you think?
My concern here would be an invalid/undecodable document and what to do with its value. |
This seems right. @disq What do you mean by invalid? |
I think we can treat that as an error: it's AWS not upholding its contract with us, since the docs for |
|
by invalid I thought wrong specified policies would lead to failure to decode, but that obviously can't happen because we're not trying to unmarshal the json (the user supplied...) but merely decoding something from the protocol. So yeah, it shouldn't happen. |
🤖 I have created a release *beep* *boop* --- ## [0.15.0-pre.0](plugins-source-aws-v0.14.2-pre.0...plugins-source-aws-v0.15.0-pre.0) (2022-09-26) ### Features * Add first draft of AWS v2 migration guide ([#1992](#1992)) ([6acae93](6acae93)) * Provide a decoded policy document field inside aws_iam_policies.policy_version_list ([#2020](#2020)) ([e7c51e1](e7c51e1)) ### Bug Fixes * Add missing fields to aws_iam_policies ([#2005](#2005)) ([24a22cb](24a22cb)) * Autofilling aws plugin default config values ([#1935](#1935)) ([ddb98a1](ddb98a1)) * AWS EBS Snapshots attributes column type ([#2075](#2075)) ([30ca062](30ca062)) * AWS EBS Snapshots attributes column type (take two) ([#2077](#2077)) ([899771b](899771b)) * AWS Policy for RDS public accessibility ([#2060](#2060)) ([9cde8a0](9cde8a0)) * AWS redshift cluster parameters ([#2063](#2063)) ([9b9ff9d](9b9ff9d)), closes [#1979](#1979) * **deps:** Update module github.com/cloudquery/plugin-sdk to v0.7.13 ([#1954](#1954)) ([2ee4718](2ee4718)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v0.8.0 ([#1997](#1997)) ([4fa40da](4fa40da)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v0.8.1 ([#2024](#2024)) ([8f88de4](8f88de4)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v0.8.2 ([#2044](#2044)) ([9b69b46](9b69b46)) * Fix applicationautoscaling multiplexing (v2) ([#2009](#2009)) ([4ea6026](4ea6026)) * Fix columns of aws_iam_openid_connect_identity_providers (v2) ([#2001](#2001)) ([d378672](d378672)) * Remove underscores in ec_2, s_3 and others ([#1998](#1998)) ([0df193f](0df193f)) * Update endpoints ([#2019](#2019)) ([0e83552](0e83552)) * Update endpoints ([#2037](#2037)) ([4719ca4](4719ca4)) * Update endpoints ([#2080](#2080)) ([889bef2](889bef2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This PR adds aDecodedDocument *stringfield inside thepolicy_version_list []types.PolicyVersionfield.PolicyVersion type includes an URL-encoded policy document, which is no use to run policies with.
The alternative is this which is extra slow.