terrahub build
1
Usage: terrahub build [options]
2
3
[email protected] (built: 2018-04-14T19:15:39.787Z)
4
this command will build code used by terraform configuration (e.g. AWS Lambda, Google Functions)
5
6
Options:
7
--format, -o Log only the command result in one of the following formats: json, text
8
--include, -i List of components to include (comma separated values)
9
--exclude, -x List of components to exclude (comma separated values)
10
--include-regex, -I List of components to include (regex search)
11
--exclude-regex, -X List of components to exclude (regex search)
12
--git-diff, -g List of components to include (git diff)
13
--var, -r Variable(s) to be used by terraform
14
--var-file, -l Variable file(s) to be used by terraform
15
--silent, -s Runs the command silently (without any output)
16
--env, -e Workspace environment
17
--help, -h Show list of available commands
Copied!
To use terrahub build command you need to add your code in component terrahub configuration file. You can use the following template:
1
build:
2
version: Version
3
4
env:
5
variables:
6
TEST_VARIABLE: "Test Variable"
7
parameter-store:
8
LOGIN_PASSWORD: "Password"
9
10
phases:
11
install:
12
commands:
13
- command
14
- command
15
- ...
16
finally:
17
- command
18
pre_build:
19
commands:
20
- command
21
finally:
22
- command
23
build:
24
commands:
25
- command
26
finally:
27
- command
28
post_build:
29
commands:
30
- command
31
finally:
32
- command
33
artifacts:
34
files:
35
- file
36
- file
37
- ...
38
discard-paths: yes/no
39
cache:
40
paths:
41
- path
42
- path
43
- ...
Copied!
For more details please visit AWS CodeBuild User Guide
Copy link