Skip to content
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

chore: convert policy doc to json #583

Merged
merged 2 commits into from
May 23, 2024
Merged

chore: convert policy doc to json #583

merged 2 commits into from
May 23, 2024

Conversation

yashmehrotra
Copy link
Member

Fixes: #126

@yashmehrotra yashmehrotra force-pushed the assume-policy-doc-json branch from eba5164 to d606328 Compare May 23, 2024 11:03
@moshloop moshloop enabled auto-merge (rebase) May 23, 2024 11:05
Comment on lines +1078 to +1085
var profileRoles []map[string]any
for _, r := range profileMap["Roles"].([]any) {
profileRoles = append(profileRoles, r.(map[string]any))
}
profileMap["Roles"] = profileRoles

for _, role := range profileMap["Roles"].([]map[string]any) {
if val, exists := role["AssumeRolePolicyDocument"]; exists {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moshloop @adityathebe Is there a better way to do this ?

for _, role := range profileMap["Roles"].([]map[string]any) {
will not work directly as it of type []any

@yashmehrotra yashmehrotra force-pushed the assume-policy-doc-json branch from d606328 to 3b1cd6b Compare May 23, 2024 11:21
@moshloop moshloop merged commit d1d7fb7 into main May 23, 2024
6 checks passed
@moshloop moshloop deleted the assume-policy-doc-json branch May 23, 2024 11:23
Copy link

🎉 This PR is included in version 0.0.299 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants