File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
infrastructure/terraform/dev/iam-ecs-gh Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_version = " 0.13.7"
3
+ required_providers {
4
+ aws = {
5
+ source = " hashicorp/aws"
6
+ version = " =3.52.0"
7
+ }
8
+ }
9
+ }
10
+
11
+ provider "aws" {
12
+ region = " us-east-1"
13
+ }
14
+
15
+ terraform {
16
+ backend "s3" {
17
+ bucket = " qppsf-conversion-tool-tf-state"
18
+ key = " qppsf/qppsf-iam-ecs-gh-tf-state"
19
+ region = " us-east-1"
20
+ encrypt = " true"
21
+ }
22
+ }
23
+
24
+ data "aws_caller_identity" "current" {}
25
+
26
+
27
+ resource "aws_iam_user" "github-actions-ecr" {
28
+ name = " github-actions-ecr"
29
+ }
30
+
31
+ # IAM policy to describe task definition
32
+ resource "aws_iam_user_policy" "ecsgithub" {
33
+ name = " ecs-github-describetask"
34
+ user = aws_iam_user. github-actions-ecr . name
35
+
36
+ policy = jsonencode ({
37
+ Version = " 2012-10-17"
38
+ Statement = [
39
+ {
40
+ " Sid" : " githubecs" ,
41
+ Action = [
42
+ " ecs:DescribeTaskDefinition" ,
43
+ ]
44
+ Effect = " Allow"
45
+ Resource = " *"
46
+ },
47
+ ]
48
+ })
49
+ }
50
+
You can’t perform that action at this time.
0 commit comments