Skip to content

Commit b878ca1

Browse files
Comment out unused user
1 parent 0bbcff1 commit b878ca1

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

terraform/iam.tf

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -65,59 +65,59 @@ resource "aws_iam_role_policy" "wfprev_ecs_task_execution_cwlogs" {
6565
EOF
6666
}
6767

68-
# Define an IAM policy to allow access to the SSM parameter
69-
# This policy grants permissions to retrieve the specified SecureString parameter.
70-
resource "aws_iam_policy" "ssm_parameter_access" {
71-
name = "SSMParameterAccess"
72-
description = "Allows access to SecureString parameters in SSM Parameter Store"
73-
74-
policy = jsonencode({
75-
Version = "2012-10-17",
76-
Statement = [
77-
{
78-
Effect = "Allow",
79-
Action = [
80-
"ssm:GetParameter",
81-
"ssm:GetParameters",
82-
"ssm:DescribeParameters"
83-
],
84-
Resource = "arn:aws:ssm:ca-central-1:${var.TARGET_AWS_ACCOUNT_ID}:parameter/iam_users/wfprev_github_actions_user_keys"
85-
}
86-
]
87-
})
88-
}
89-
90-
# Attach the SSM parameter access policy to the GitHub Actions IAM user
91-
# This links the user with the necessary permissions to read the SSM parameter securely.
92-
resource "aws_iam_user_policy_attachment" "ssm_parameter_access_attachment" {
93-
user = "wfprev_github_actions_user"
94-
policy_arn = aws_iam_policy.ssm_parameter_access.arn
95-
}
96-
97-
# Define an IAM policy for GitHub Actions user to perform specific operations
98-
# This policy grants permissions to:
99-
# - Upload/delete objects in an S3 bucket
100-
# - Invalidate cached content in CloudFront
101-
resource "aws_iam_user_policy" "github_actions_policy" {
102-
name = "github-actions-policy"
103-
user = "wfprev_github_actions_user"
104-
105-
policy = jsonencode({
106-
Version = "2012-10-17",
107-
Statement = [
108-
{
109-
Effect = "Allow",
110-
Action = ["s3:PutObject", "s3:DeleteObject"],
111-
Resource = "${module.s3_secure_bucket.bucket_arn}/*"
112-
},
113-
{
114-
Effect = "Allow",
115-
Action = "cloudfront:CreateInvalidation",
116-
Resource = "*"
117-
}
118-
]
119-
})
120-
}
68+
# # Define an IAM policy to allow access to the SSM parameter
69+
# # This policy grants permissions to retrieve the specified SecureString parameter.
70+
# resource "aws_iam_policy" "ssm_parameter_access" {
71+
# name = "SSMParameterAccess"
72+
# description = "Allows access to SecureString parameters in SSM Parameter Store"
73+
74+
# policy = jsonencode({
75+
# Version = "2012-10-17",
76+
# Statement = [
77+
# {
78+
# Effect = "Allow",
79+
# Action = [
80+
# "ssm:GetParameter",
81+
# "ssm:GetParameters",
82+
# "ssm:DescribeParameters"
83+
# ],
84+
# Resource = "arn:aws:ssm:ca-central-1:${var.TARGET_AWS_ACCOUNT_ID}:parameter/iam_users/wfprev_github_actions_user_keys"
85+
# }
86+
# ]
87+
# })
88+
# }
89+
90+
# # Attach the SSM parameter access policy to the GitHub Actions IAM user
91+
# # This links the user with the necessary permissions to read the SSM parameter securely.
92+
# resource "aws_iam_user_policy_attachment" "ssm_parameter_access_attachment" {
93+
# user = "wfprev_github_actions_user"
94+
# policy_arn = aws_iam_policy.ssm_parameter_access.arn
95+
# }
96+
97+
# # Define an IAM policy for GitHub Actions user to perform specific operations
98+
# # This policy grants permissions to:
99+
# # - Upload/delete objects in an S3 bucket
100+
# # - Invalidate cached content in CloudFront
101+
# resource "aws_iam_user_policy" "github_actions_policy" {
102+
# name = "github-actions-policy"
103+
# user = "wfprev_github_actions_user"
104+
105+
# policy = jsonencode({
106+
# Version = "2012-10-17",
107+
# Statement = [
108+
# {
109+
# Effect = "Allow",
110+
# Action = ["s3:PutObject", "s3:DeleteObject"],
111+
# Resource = "${module.s3_secure_bucket.bucket_arn}/*"
112+
# },
113+
# {
114+
# Effect = "Allow",
115+
# Action = "cloudfront:CreateInvalidation",
116+
# Resource = "*"
117+
# }
118+
# ]
119+
# })
120+
# }
121121

122122
# Create an IAM role for GitHub Actions to assume
123123
resource "aws_iam_role" "github_actions_role" {

0 commit comments

Comments
 (0)