-
Notifications
You must be signed in to change notification settings - Fork 0
/
amplify.tf
46 lines (39 loc) · 1.19 KB
/
amplify.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
resource "aws_amplify_app" "harsh-viradia-amplify" {
name = "harsh-viradia-net-app"
repository = "https://git-codecommit.us-east-1.amazonaws.com/v1/repos/harsh-viradia-wildrydes"
# The default build_spec added by the Amplify Console for React.
build_spec = <<-EOT
version: 1
frontend:
phases:
build:
commands: []
artifacts:
baseDirectory: /
files:
- '**/*'
cache:
paths: []
EOT
enable_branch_auto_build = true
iam_service_role_arn = aws_iam_role.harsh-viradia-amplify-codecommit.arn
}
resource "aws_amplify_branch" "harsh-viradia-amplify-branch" {
app_id = aws_amplify_app.harsh-viradia-amplify.id
branch_name = "master"
}
data "aws_iam_policy_document" "harsh_viradia_assume_role" {
statement {
effect = "Allow"
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["amplify.amazonaws.com"]
}
}
}
resource "aws_iam_role" "harsh-viradia-amplify-codecommit" {
name = "harsh-viradia-Codecommit-amplify"
assume_role_policy = join("", data.aws_iam_policy_document.harsh_viradia_assume_role.*.json)
managed_policy_arns = ["arn:aws:iam::aws:policy/AWSCodeCommitReadOnly"]
}