Terraform - IAM user, role, policies 최신화
This commit is contained in:
23
terraform/iam/policies/modules/agent-s3.tf
Normal file
23
terraform/iam/policies/modules/agent-s3.tf
Normal file
@@ -0,0 +1,23 @@
|
||||
resource "aws_iam_policy" "agent_s3_policy" {
|
||||
name = "DSK_Agent_S3FullAccess"
|
||||
path = "/"
|
||||
|
||||
policy = jsonencode({
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:*",
|
||||
"s3-object-lambda:*"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::dsk-agent-s3",
|
||||
"arn:aws:s3:::dsk-agent-s3/*",
|
||||
"arn:aws:s3:::dsk-middleware-backup",
|
||||
"arn:aws:s3:::dsk-middleware-backup/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
21
terraform/iam/policies/modules/api-s3.tf
Normal file
21
terraform/iam/policies/modules/api-s3.tf
Normal file
@@ -0,0 +1,21 @@
|
||||
resource "aws_iam_policy" "api_s3_policy" {
|
||||
name = "DSK_API_S3FullAccess"
|
||||
path = "/"
|
||||
|
||||
policy = jsonencode({
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:*",
|
||||
"s3-object-lambda:*"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::dsk-metering",
|
||||
"arn:aws:s3:::dsk-metering/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
21
terraform/iam/policies/modules/devops-s3.tf
Normal file
21
terraform/iam/policies/modules/devops-s3.tf
Normal file
@@ -0,0 +1,21 @@
|
||||
resource "aws_iam_policy" "devops_s3_policy" {
|
||||
name = "DSK_DEVOPS_S3FullAccess"
|
||||
path = "/"
|
||||
|
||||
policy = jsonencode({
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:*",
|
||||
"s3-object-lambda:*"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::dsk-middleware-backup",
|
||||
"arn:aws:s3:::dsk-middleware-backup/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
resource "aws_iam_policy" "policy" {
|
||||
resource "aws_iam_policy" "lambda_execute_policy" {
|
||||
name = "DSK_LambdaExecute"
|
||||
path = "/"
|
||||
|
||||
@@ -32,4 +32,4 @@ resource "aws_iam_policy" "policy" {
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user