@@ -20,9 +20,9 @@ resource "aws_s3_bucket" "terraform_state" {
2020
2121#  DynamoDB Table for state locking
2222resource  "aws_dynamodb_table"  "terraform_locks"  {
23-   name             =  " solar-system-terraform-locks" 
24-   billing_mode     =  " PAY_PER_REQUEST" 
25-   hash_key         =  " LockID" 
23+   name          =  " solar-system-terraform-locks" 
24+   billing_mode  =  " PAY_PER_REQUEST" 
25+   hash_key      =  " LockID" 
2626
2727  attribute  {
2828    name  =  " LockID" 
@@ -37,8 +37,8 @@ resource "aws_dynamodb_table" "terraform_locks" {
3737#  IAM OIDC Provider for GitHub
3838#  ----------------------------
3939resource  "aws_iam_openid_connect_provider"  "github"  {
40-   url             =  " https://token.actions.githubusercontent.com" 
41-   client_id_list  =   [" sts.amazonaws.com"  ]
40+   url               =  " https://token.actions.githubusercontent.com" 
41+   client_id_list    =   [" sts.amazonaws.com"  ]
4242  thumbprint_list  =   [" 1c58a3a8518e8759bf075b76b750d4f2df264fcd"  ]
4343}
4444
@@ -96,7 +96,7 @@ resource "aws_iam_role_policy" "github_actions_infra_policy" {
9696          " s3:DeleteBucket"  ,
9797          " s3:GetBucketLocation"  ,
9898          " s3:ListAllMyBuckets"  ,
99-            
99+ 
100100          #  DynamoDB for state locking
101101          " dynamodb:GetItem"  ,
102102          " dynamodb:PutItem"  ,
@@ -107,13 +107,13 @@ resource "aws_iam_role_policy" "github_actions_infra_policy" {
107107          " dynamodb:TagResource"  ,
108108          " dynamodb:UntagResource"  ,
109109          " dynamodb:ListTagsOfResource"  ,
110-            
110+ 
111111          #  EC2/VPC permissions
112112          " ec2:*"  ,
113-            
113+ 
114114          #  EKS permissions
115115          " eks:*"  ,
116-            
116+ 
117117          #  IAM permissions (be more specific in production)
118118          " iam:CreateRole"  ,
119119          " iam:DeleteRole"  ,
@@ -146,7 +146,7 @@ resource "aws_iam_role_policy" "github_actions_infra_policy" {
146146          " iam:TagRole"  ,
147147          " iam:UntagRole"  ,
148148          " iam:ListRoleTags"  ,
149-            
149+ 
150150          #  Additional permissions for EKS
151151          " autoscaling:*"  ,
152152          " logs:*"  ,
@@ -156,4 +156,4 @@ resource "aws_iam_role_policy" "github_actions_infra_policy" {
156156      }
157157    ]
158158  })
159- }
159+ }
0 commit comments