-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
36 lines (32 loc) · 791 Bytes
/
Copy pathmain.tf
File metadata and controls
36 lines (32 loc) · 791 Bytes
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
resource "aws_amplify_app" "react_amplify" {
name = var.app_name
repository = var.repository
access_token = var.access_token
enable_branch_auto_build = true
build_spec = <<-EOT
version: 0.1
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
EOT
auto_branch_creation_config {
enable_auto_build = true
}
}
resource "aws_amplify_branch" "amplify_branch" {
app_id = aws_amplify_app.react_amplify.id
branch_name = var.branch_name
enable_auto_build = true
}