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

Updating the requests import and adding missing IAM permssions #16

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion function/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import traceback

import boto3
import requests
from pip._vendor import requests
from botocore.exceptions import ClientError

# Initialize environment variables
Expand Down
11 changes: 11 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ data "aws_iam_policy_document" "default" {
"identitystore:ListGroupMemberships",
"identitystore:ListGroups",
"identitystore:ListUsers",
"identitystore:DescribeUser",
]
resources = [
"arn:aws:identitystore::${data.aws_caller_identity.current.account_id}:identitystore/*",
Expand All @@ -49,6 +50,16 @@ data "aws_iam_policy_document" "default" {
"arn:aws:identitystore:::membership/*"
]
}

statement {
effect = "Allow"
actions = [
"sso:ListInstances",
]
resources = [
"arn:aws:sso:::instance/*"
]
}
}

resource "aws_iam_policy" "default" {
Expand Down