File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ data "aws_iam_policy_document" "example" {
3131  statement  {
3232    actions    =   [" s3:GetObject"  ]
3333    effect     =  " Allow" 
34-     resources  =   [" dynamodb:CreateTable "  ]
34+     resources  =   [" arn:aws:s3:::amzn-s3-demo-bucket/* "  ]
3535  }
3636}
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ variable "enabled" {
4040}
4141
4242variable  "enterprise_slug"  {
43-   default      =  false 
43+   default      =  " " 
4444  description  =  " Enterprise slug for GitHub Enterprise Cloud customers." 
45-   type         =  bool 
45+   type         =  string 
4646}
4747
4848variable  "force_detach_policies"  {
Original file line number Diff line number Diff line change @@ -32,14 +32,13 @@ resource "aws_iam_role" "github" {
3232  permissions_boundary   =   var. iam_role_permissions_boundary 
3333  tags                   =   var. tags 
3434
35-   dynamic  "inline_policy"  {
36-     for_each  =   var. iam_role_inline_policies 
35+ }
3736
38-      content  {
39-        name     =   inline_policy . key 
40-       policy  =  inline_policy . value 
41-     } 
42-   } 
37+ resource   "aws_iam_role_policy"   "inline_policies"  {
38+   for_each   =   {  for   k ,  v   in   var . iam_role_inline_policies   :   k   =>   v   if   var . enabled  } 
39+   name      =  each . key 
40+   policy     =   each . value 
41+   role       =   aws_iam_role . github [ 0 ] . id 
4342}
4443
4544resource  "aws_iam_role_policy_attachment"  "admin"  {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments