-
Notifications
You must be signed in to change notification settings - Fork 157
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
add support for sns_topic_policy #206
Conversation
Codecov Report
@@ Coverage Diff @@
## main #206 +/- ##
==========================================
- Coverage 69.83% 69.81% -0.03%
==========================================
Files 206 211 +5
Lines 4648 4740 +92
==========================================
+ Hits 3246 3309 +63
- Misses 1145 1166 +21
- Partials 257 265 +8
|
...923_user-updates-topic-arn_aws_sns_eu-west-3_526954929923_user-updates-topic.res.golden.json
Outdated
Show resolved
Hide resolved
b6d7713
to
48a0dd3
Compare
"Id": "arn:aws:sns:us-east-1:526954929923:my-topic-with-policy", | ||
"Policy": "{\"Id\":\"__default_policy_ID\",\"Statement\":[{\"Action\":[\"SNS:Subscribe\",\"SNS:SetTopicAttributes\",\"SNS:RemovePermission\",\"SNS:Receive\",\"SNS:Publish\",\"SNS:ListSubscriptionsByTopic\",\"SNS:GetTopicAttributes\",\"SNS:DeleteTopic\",\"SNS:AddPermission\"],\"Condition\":{\"StringEquals\":{\"AWS:SourceOwner\":[]}},\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Resource\":\"arn:aws:sns:us-east-1:526954929923:my-topic-with-policy\",\"Sid\":\"__default_statement_ID\"}],\"Version\":\"2012-10-17\"}" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's only for the state reader, we can have here and inside the tfstate only the policy. We don't need the parent topic. I would just delete them manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
policies := make([]resource.Resource, 0) | ||
|
||
for _, value := range topicList { | ||
policy, err := decodeSNSTopicPolicy(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should shadow the variable here from now on to be consistent with what @elie has done on his last PR.
for _, value := range topicList {
value := value
policy, err := decodeSNSTopicPolicy(value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not seem to trigger linter error, I'm wondering if this is required there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I edited it anyway
8d6f280
to
0f8361d
Compare
modify sns_topic support so that we create sns_topic_policy for inline policy
0f8361d
to
7041cf1
Compare
Description
add support for sns_topic_policy
modify sns_topic support so that we create sns_topic_policy for inline
policy