tfctl 0.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -4
- data/.travis.yml +16 -14
- data/CHANGELOG.adoc +30 -2
- data/Guardfile +7 -0
- data/Makefile +5 -1
- data/README.adoc +67 -31
- data/bin/tfctl +13 -11
- data/docs/configuration.adoc +59 -13
- data/docs/control_tower.adoc +75 -37
- data/docs/creating_a_profile.adoc +32 -10
- data/docs/iam_permissions.adoc +23 -3
- data/docs/project_layout.adoc +32 -6
- data/examples/control_tower/{conf/example.yaml → tfctl.yaml} +33 -24
- data/lib/tfctl.rb +4 -3
- data/lib/tfctl/aws_org.rb +17 -15
- data/lib/tfctl/config.rb +5 -2
- data/lib/tfctl/error.rb +9 -0
- data/lib/tfctl/executor.rb +8 -1
- data/lib/tfctl/generator.rb +8 -15
- data/lib/tfctl/schema.rb +80 -0
- data/lib/tfctl/version.rb +1 -1
- data/tfctl.gemspec +6 -4
- metadata +41 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7a1d287bce54f0203c80b4814f67ddb3d5f38319796a185a69ccf1fe1b65f02
|
4
|
+
data.tar.gz: 924e81046fde7a921f66959893429c10fbcffd8a3f32e1b6257cde2935c1b5d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 044ad7209c428aa8c1f7eaf11258089ed6ce304a2943b79739ba1b8337fbd6487f4cda758c73acfc9de35f17fc272ef98d74fe64c274ea4d5e0112bc1749329b
|
7
|
+
data.tar.gz: 22a221bb105a66c5b9512a604886eb458ff1ec2876ee8d3599f7c6c0cc5e6abb5fafd0d47aa2cd61fbc979b0ba5ca33a8f18a47a5afacfd27515ea5e333f0868
|
data/.rubocop.yml
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
---
|
2
2
|
AllCops:
|
3
|
-
TargetRubyVersion: 2.
|
3
|
+
TargetRubyVersion: 2.5
|
4
4
|
DisplayCopNames: true
|
5
5
|
|
6
6
|
Layout/IndentationWidth:
|
7
7
|
Width: 4
|
8
8
|
|
9
|
-
Layout/
|
9
|
+
Layout/HeredocIndentation:
|
10
10
|
Enabled: false
|
11
11
|
|
12
12
|
Layout/EmptyLines:
|
@@ -15,7 +15,7 @@ Layout/EmptyLines:
|
|
15
15
|
Layout/EmptyLinesAroundMethodBody:
|
16
16
|
Enabled: false
|
17
17
|
|
18
|
-
Layout/
|
18
|
+
Layout/HashAlignment:
|
19
19
|
EnforcedHashRocketStyle:
|
20
20
|
- table
|
21
21
|
EnforcedColonStyle:
|
@@ -45,7 +45,7 @@ Metrics/BlockLength:
|
|
45
45
|
Metrics/MethodLength:
|
46
46
|
Enabled: false
|
47
47
|
|
48
|
-
|
48
|
+
Layout/LineLength:
|
49
49
|
Max: 140
|
50
50
|
|
51
51
|
Metrics/AbcSize:
|
@@ -77,3 +77,7 @@ Style/TrailingCommaInHashLiteral:
|
|
77
77
|
|
78
78
|
Style/RedundantReturn:
|
79
79
|
Enabled: false
|
80
|
+
|
81
|
+
# don't break older Rubies just because of style
|
82
|
+
Style/RedundantBegin:
|
83
|
+
Enabled: false
|
data/.travis.yml
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
rvm:
|
2
|
-
- 2.
|
2
|
+
- 2.5
|
3
3
|
- 2.6
|
4
|
-
|
4
|
+
- 2.7
|
5
|
+
os: linux
|
6
|
+
language: ruby
|
5
7
|
script: make test
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
jobs:
|
9
|
+
include:
|
10
|
+
- stage: Gem release
|
11
|
+
rvm: 2.6
|
12
|
+
deploy:
|
13
|
+
provider: rubygems
|
14
|
+
api_key:
|
15
|
+
secure: LAVcdER+LtQ2TSUrVOY7Be1BC7GXJRD0QBt386vRM5Nld5QaD9Ow9gtN6FprzkzloI4R8BkPWqZbAT6YjC+C0AFB5HK6iPwD2bLsiF9w3ccDD+yrW99RHxiErpmYMun2PqZv0WkJ/pkEplPCKMRFv7SM7W9DMRlU7dsXc1v6IVyIb5u3A04jErS2jXXKY0ijlCDJYVo8zzYL6yUmUcXhc//3CIVnu2Miu6Qr8h7e6jMXNUWfMkwEXsFP9id4TsCz7hRY+39PkiBAknHTN5UqjjJiEOknZnHeTBcVPvi2h2xv+fFLSzVTxlxaRsVoMCShQp5D12qzhQObRJsRVQFs8Yyg9IYMyPdxssFYyUZFaAy5taWDm57uM3HTHylm/Dq3LmXTgGNxWUUkf2oh1g7R6cYZpBUQwiEPzhZQ7CoBQbGUAJmH9ZU9m+cr8kuAOUipd6BNEDvn/fIH4WJsRCNP72JGX16JBpuICvpkuNhskZT91xFlYk1pTXHOxNpbTcxUTgMHhrTqspeRXPmf6DiYGvjMb2S6kaoGqCIRIcwl0TGKuMsOMqR9SqF8gubkqHMVbSl1E7mwBn4ke8/7IGoMkWOGwUpVxqVOLBHi6zSR09RTVSbKl4oiFV3ZwmVPSxDncq54MptyJ2WCZ7dD6ht2l+VA8iGwYeIoqOpwGWxyuNI=
|
16
|
+
gem: tfctl
|
17
|
+
on:
|
18
|
+
tags: true
|
19
|
+
repo: scalefactory/tfctl
|
data/CHANGELOG.adoc
CHANGED
@@ -1,12 +1,40 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== Upcoming
|
4
|
+
|
5
|
+
== 1.1.1
|
6
|
+
|
7
|
+
* fix: handle empty response from Organizations API containing children (thanks @grothja)
|
8
|
+
* chore: stopped testing on EOL Rubies 2.3 and 2.4 (but should still currently work)
|
9
|
+
* chore: dependencies minimum version bump
|
10
|
+
|
11
|
+
== 1.1.0
|
12
|
+
|
13
|
+
* feat: look for configuration in `tfctl.yaml` by default.
|
14
|
+
|
15
|
+
== 1.0.0
|
16
|
+
|
17
|
+
* feat(config): JSON schema config validation
|
18
|
+
* feat(config): added 'data' parameter
|
19
|
+
|
20
|
+
BREAKING CHANGE: This release moves user defined data under a separate `data`
|
21
|
+
parameter so it can be easily distinguished from parameters required by tfctl.
|
22
|
+
Configuration file will need to be updated to reflect this to pass validation.
|
23
|
+
|
24
|
+
|
25
|
+
== 0.2.0
|
26
|
+
|
27
|
+
* feat: configurable Terraform and AWS provider version requirements
|
28
|
+
* fix: use provider region from config file
|
29
|
+
* fix: fail when terraform command is missing
|
30
|
+
|
3
31
|
== 0.1.0
|
4
32
|
|
5
|
-
*
|
33
|
+
* feat: Added `-l` switch to list discovered accounts.
|
6
34
|
|
7
35
|
== 0.0.2
|
8
36
|
|
9
|
-
*
|
37
|
+
* fix: Fixed an exception when `exclude_accounts` is not set.
|
10
38
|
|
11
39
|
== 0.0.1
|
12
40
|
|
data/Guardfile
ADDED
data/Makefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.PHONY: clean install test rubocop spec
|
1
|
+
.PHONY: clean install test rubocop spec guard
|
2
2
|
|
3
3
|
vendor:
|
4
4
|
$(info => Installing Ruby dependencies)
|
@@ -6,6 +6,10 @@ vendor:
|
|
6
6
|
|
7
7
|
test: vendor rubocop spec
|
8
8
|
|
9
|
+
guard: vendor
|
10
|
+
$(info => Starting guard)
|
11
|
+
@bundle exec guard
|
12
|
+
|
9
13
|
rubocop:
|
10
14
|
$(info => Running rubocop)
|
11
15
|
@vendor/bin/rubocop
|
data/README.adoc
CHANGED
@@ -1,21 +1,43 @@
|
|
1
|
-
:
|
1
|
+
// Settings:
|
2
|
+
:idprefix:
|
3
|
+
:idseparator: -
|
4
|
+
ifndef::env-github[:icons: font]
|
5
|
+
ifdef::env-github,env-browser[]
|
6
|
+
:toc: macro
|
7
|
+
:toclevels: 1
|
8
|
+
endif::[]
|
9
|
+
ifdef::env-github[]
|
10
|
+
:branch: master
|
11
|
+
:status:
|
12
|
+
:outfilesuffix: .adoc
|
13
|
+
:!toc-title:
|
14
|
+
:caution-caption: :fire:
|
15
|
+
:important-caption: :exclamation:
|
16
|
+
:note-caption: :paperclip:
|
17
|
+
:tip-caption: :bulb:
|
18
|
+
:warning-caption: :warning:
|
19
|
+
endif::[]
|
2
20
|
|
3
21
|
= tfctl
|
4
22
|
|
5
23
|
image:https://travis-ci.org/scalefactory/tfctl.svg?branch=master["Build Status", link="https://travis-ci.org/scalefactory/tfctl"]
|
6
24
|
image:https://badge.fury.io/rb/tfctl.svg["Gem Version", link="https://badge.fury.io/rb/tfctl"]
|
25
|
+
image:https://img.shields.io/badge/terraform-0.12-blue.svg["Terraform 0.12", link="https://img.shields.io/badge/terraform-0.12-blue"]
|
26
|
+
|
27
|
+
toc::[]
|
7
28
|
|
8
29
|
== Overview
|
9
30
|
|
10
|
-
|
31
|
+
`tfctl` is a small Terraform wrapper for working with multi-account AWS
|
11
32
|
infrastructures where new accounts may be created dynamically and on-demand.
|
12
33
|
|
13
|
-
|
14
|
-
Terraform resources to accounts based on the organization hierarchy.
|
15
|
-
can be assigned globally, based on organization unit or individual
|
16
|
-
It supports nested
|
34
|
+
It discovers accounts by reading the AWS Organizations API, and can assign
|
35
|
+
Terraform resources to multiple accounts based on the organization hierarchy.
|
36
|
+
Resources can be assigned globally, based on organization unit or to individual
|
37
|
+
accounts. It supports hierarchies of nested Organizational Units (OUs),
|
38
|
+
and helps keep your Terraform DRY.
|
17
39
|
|
18
|
-
|
40
|
+
The Scale Factory originally created tfctl to integrate Terraform with
|
19
41
|
https://aws.amazon.com/solutions/aws-landing-zone/[AWS Landing Zone] and
|
20
42
|
https://aws.amazon.com/controltower/[Control Tower] but should work with most
|
21
43
|
other ways of managing accounts in AWS Organizations.
|
@@ -36,7 +58,7 @@ other ways of managing accounts in AWS Organizations.
|
|
36
58
|
== Requirements
|
37
59
|
|
38
60
|
* Terraform >= 0.12
|
39
|
-
* Ruby >= 2.
|
61
|
+
* Ruby >= 2.4
|
40
62
|
* Accounts managed in AWS Organizations (by Landing Zone, Control Tower, some
|
41
63
|
other means)
|
42
64
|
|
@@ -44,17 +66,19 @@ other ways of managing accounts in AWS Organizations.
|
|
44
66
|
|
45
67
|
To install the latest release from RubyGems run:
|
46
68
|
|
69
|
+
[source,shell]
|
47
70
|
----
|
48
71
|
gem install tfctl
|
49
72
|
----
|
50
73
|
|
51
|
-
Alternatively you can build and install from this repo with:
|
74
|
+
Alternatively, you can build and install from this repo with:
|
52
75
|
|
76
|
+
[source,shell]
|
53
77
|
----
|
54
78
|
make install
|
55
79
|
----
|
56
80
|
|
57
|
-
==
|
81
|
+
== Documentation
|
58
82
|
|
59
83
|
* https://github.com/scalefactory/tfctl/tree/master/docs/control_tower.adoc[Control Tower quick start guide]
|
60
84
|
* https://github.com/scalefactory/tfctl/tree/master/docs/project_layout.adoc[Project layout]
|
@@ -64,23 +88,25 @@ make install
|
|
64
88
|
|
65
89
|
== Running tfctl
|
66
90
|
|
67
|
-
|
68
|
-
Terraform configuration in `.tfctl
|
91
|
+
You should run `tfctl` from the root of your project directory. It will generate
|
92
|
+
Terraform configuration in `.tfctl/` (add this to your `.gitignore`).
|
69
93
|
|
70
94
|
Anatomy of a tfctl command:
|
71
95
|
|
96
|
+
[source,shell]
|
72
97
|
----
|
73
98
|
tfctl -c CONFIG_FILE TARGET_OPTIONS -- TERRAFORM_COMMAND
|
74
99
|
----
|
75
100
|
|
76
|
-
* `-c` specifies which tfctl config file to use (
|
101
|
+
* `-c` specifies which tfctl config file to use (defaults to `tfctl.yaml` in
|
102
|
+
current working directory if not set)
|
77
103
|
* `TARGET_OPTIONS` specifies which accounts to target. This could be an individual
|
78
104
|
account, a group of accounts in an organizational unit or all accounts.
|
79
105
|
* `TERRAFORM_COMMAND` will be passed to `terraform` along with any
|
80
106
|
options. See https://www.terraform.io/docs/commands/index.html[Terraform
|
81
107
|
commands] for details.
|
82
108
|
|
83
|
-
NOTE: You must have your AWS credentials configured before
|
109
|
+
NOTE: You must have your AWS credentials configured before you run `tfctl`, or run
|
84
110
|
it using an AWS credentials helper such as
|
85
111
|
https://github.com/99designs/aws-vault[aws-vault].
|
86
112
|
|
@@ -88,68 +114,78 @@ https://github.com/99designs/aws-vault[aws-vault].
|
|
88
114
|
|
89
115
|
Show help:
|
90
116
|
|
117
|
+
[source,shell]
|
91
118
|
----
|
92
119
|
tfctl -h
|
93
120
|
----
|
94
121
|
|
95
122
|
Show merged configuration:
|
96
123
|
|
124
|
+
[source,shell]
|
97
125
|
----
|
98
|
-
tfctl -
|
126
|
+
tfctl -s
|
99
127
|
----
|
100
128
|
|
101
129
|
List all discovered accounts:
|
102
130
|
|
131
|
+
[source,shell]
|
103
132
|
----
|
104
|
-
tfctl
|
133
|
+
tfctl --all -l
|
105
134
|
----
|
106
135
|
|
107
136
|
TIP: This can be narrowed down using targeting options and is a good way to
|
108
137
|
test what accounts match.
|
109
138
|
|
110
|
-
Run
|
139
|
+
Run `terraform init` across all accounts:
|
111
140
|
|
141
|
+
[source,shell]
|
112
142
|
----
|
113
|
-
tfctl
|
143
|
+
tfctl --all -- init
|
114
144
|
----
|
115
145
|
|
116
|
-
|
146
|
+
Plan Terraform across all accounts in the `test` OU:
|
117
147
|
|
148
|
+
[source,shell]
|
118
149
|
----
|
119
|
-
tfctl -
|
150
|
+
tfctl -o test -- plan
|
120
151
|
----
|
121
152
|
|
122
|
-
|
153
|
+
Plan Terraform in `live` accounts, assuming that `live` is a child OU in multiple
|
123
154
|
organization units:
|
124
155
|
|
156
|
+
[source,shell]
|
125
157
|
----
|
126
|
-
tfctl -
|
158
|
+
tfctl -o '.*/live' -- plan
|
127
159
|
----
|
128
160
|
|
129
|
-
Run plan
|
161
|
+
Run a plan for an individual account:
|
130
162
|
|
163
|
+
[source,shell]
|
131
164
|
----
|
132
|
-
tfctl -
|
165
|
+
tfctl -a example-account - plan
|
133
166
|
----
|
134
167
|
|
135
|
-
|
168
|
+
Apply Terraform changes across all accounts:
|
136
169
|
|
170
|
+
[source,shell]
|
137
171
|
----
|
138
|
-
tfctl
|
172
|
+
tfctl --all -- apply
|
139
173
|
----
|
140
174
|
|
141
|
-
|
175
|
+
Destroy Terraform-managed resources in all the `test` OU accounts:
|
142
176
|
|
177
|
+
[source,shell]
|
143
178
|
----
|
144
|
-
tfctl -
|
179
|
+
tfctl -o test -- destroy -auto-approve
|
145
180
|
----
|
146
181
|
|
147
182
|
Don't buffer the output:
|
148
183
|
|
184
|
+
[source,shell]
|
149
185
|
----
|
150
|
-
tfctl -
|
186
|
+
tfctl -a example-account -u -- plan
|
151
187
|
----
|
152
188
|
|
153
189
|
This will show output in real time. Usually output is buffered and displayed
|
154
|
-
after Terraform command finishes to make it more readable when running
|
155
|
-
multiple accounts in parallel.
|
190
|
+
after the Terraform command finishes, to make it more readable when running
|
191
|
+
across multiple accounts in parallel.
|
data/bin/tfctl
CHANGED
@@ -22,7 +22,7 @@ options = {
|
|
22
22
|
ou: nil,
|
23
23
|
all: nil,
|
24
24
|
show_config: false,
|
25
|
-
config_file:
|
25
|
+
config_file: 'tfctl.yaml',
|
26
26
|
unbuffered: false,
|
27
27
|
debug: false,
|
28
28
|
use_cache: false,
|
@@ -68,10 +68,6 @@ begin
|
|
68
68
|
|
69
69
|
# Validate CLI arguments
|
70
70
|
|
71
|
-
if options[:config_file].nil?
|
72
|
-
raise OptionParser::MissingArgument, '--config-file'
|
73
|
-
end
|
74
|
-
|
75
71
|
unless File.exist? options[:config_file]
|
76
72
|
raise OptionParser::InvalidOption,
|
77
73
|
"Config file not found in: #{options[:config_file]}"
|
@@ -104,7 +100,7 @@ end
|
|
104
100
|
|
105
101
|
|
106
102
|
|
107
|
-
#
|
103
|
+
# Execute terraform in target accounts
|
108
104
|
def run_account(config, account, options, tf_argv, log)
|
109
105
|
|
110
106
|
# Skip excluded accounts
|
@@ -118,11 +114,8 @@ def run_account(config, account, options, tf_argv, log)
|
|
118
114
|
# executed from.
|
119
115
|
log.info "#{account[:name]}: Generating Terraform run directory"
|
120
116
|
Tfctl::Generator.make(
|
121
|
-
|
122
|
-
|
123
|
-
account_name: account[:name],
|
124
|
-
profiles: account[:profiles],
|
125
|
-
execution_role: account[:tf_execution_role],
|
117
|
+
account: account,
|
118
|
+
config: config,
|
126
119
|
)
|
127
120
|
|
128
121
|
log.info "#{account[:name]}: Executing Terraform #{tf_argv[0]}"
|
@@ -148,11 +141,13 @@ begin
|
|
148
141
|
log.info 'tfctl running'
|
149
142
|
|
150
143
|
config_name = File.basename(options[:config_file]).chomp('.yaml')
|
144
|
+
config_name = 'default' if config_name == 'tfctl'
|
151
145
|
log.info "Using config: #{config_name}"
|
152
146
|
|
153
147
|
log.info 'Working out AWS account topology'
|
154
148
|
|
155
149
|
yaml_config = YAML.safe_load(File.read(options[:config_file]))
|
150
|
+
Tfctl::Schema.validate(yaml_config)
|
156
151
|
yaml_config.symbolize_names!
|
157
152
|
|
158
153
|
org_units = yaml_config[:organization_units].keys
|
@@ -215,4 +210,11 @@ begin
|
|
215
210
|
rescue Tfctl::Error => e
|
216
211
|
log.error(e)
|
217
212
|
exit 1
|
213
|
+
rescue Tfctl::ValidationError => e
|
214
|
+
log.error(e)
|
215
|
+
e.issues.each do |issue|
|
216
|
+
log.error("Parameter: #{issue[:data_pointer]}") unless issue[:data_pointer] == ''
|
217
|
+
log.error(issue[:details]) unless issue[:details].nil?
|
218
|
+
end
|
219
|
+
exit 2
|
218
220
|
end
|
data/docs/configuration.adoc
CHANGED
@@ -1,7 +1,31 @@
|
|
1
|
-
|
1
|
+
// Settings:
|
2
|
+
:idprefix:
|
3
|
+
:idseparator: -
|
4
|
+
ifndef::env-github[:icons: font]
|
5
|
+
ifdef::env-github,env-browser[]
|
6
|
+
:toc: macro
|
7
|
+
:toclevels: 1
|
8
|
+
endif::[]
|
9
|
+
ifdef::env-github[]
|
10
|
+
:branch: master
|
11
|
+
:status:
|
12
|
+
:outfilesuffix: .adoc
|
13
|
+
:!toc-title:
|
14
|
+
:caution-caption: :fire:
|
15
|
+
:important-caption: :exclamation:
|
16
|
+
:note-caption: :paperclip:
|
17
|
+
:tip-caption: :bulb:
|
18
|
+
:warning-caption: :warning:
|
19
|
+
endif::[]
|
2
20
|
|
3
|
-
|
4
|
-
|
21
|
+
= Configuration
|
22
|
+
|
23
|
+
toc::[]
|
24
|
+
|
25
|
+
== Overview
|
26
|
+
|
27
|
+
`tfctl` retrieves initial account configuration from AWS Organizations and merges
|
28
|
+
it with configuration specified in YAML format (`tfctl.yaml` by default).
|
5
29
|
|
6
30
|
The configuration is merged in the following order:
|
7
31
|
|
@@ -15,13 +39,16 @@ Parameters further down the hierarchy take precedence. For example:
|
|
15
39
|
[source, yaml]
|
16
40
|
----
|
17
41
|
organization_root:
|
18
|
-
|
42
|
+
data:
|
43
|
+
example_param: 'will be overriden further down'
|
19
44
|
|
20
45
|
organization_units:
|
21
46
|
team:
|
22
|
-
|
47
|
+
data:
|
48
|
+
example_param: 'will win in team ou'
|
23
49
|
team/live:
|
24
|
-
|
50
|
+
data:
|
51
|
+
example_param: 'will win in team/live ou'
|
25
52
|
----
|
26
53
|
|
27
54
|
One exception to this rule is the `profiles` parameter. Profiles are additive:
|
@@ -41,13 +68,32 @@ organization_units:
|
|
41
68
|
|
42
69
|
This will result in all three profiles deployed to accounts in `team` OU.
|
43
70
|
|
44
|
-
TIP: You can display the fully merged configuration by running `tfctl -
|
45
|
-
|
46
|
-
|
71
|
+
TIP: You can display the fully merged configuration by running `tfctl -s`.
|
72
|
+
It's safe to run as it doesn't make any changes to AWS resources. It's a good
|
73
|
+
way to test your configuration.
|
74
|
+
|
75
|
+
== Defining arbitrary data
|
76
|
+
|
77
|
+
You can define arbitrary data under the `data:` parameter, both in the root of
|
78
|
+
the config and in the organization sections. It will be available in Terraform
|
79
|
+
profiles to use by your modules. You can use this to define things like VPC
|
80
|
+
subnet ranges, s3 bucket names and so on. `data:` in organization sections
|
81
|
+
will be merged with accounts following the usual merge order as described
|
82
|
+
above.
|
47
83
|
|
48
|
-
|
84
|
+
== Handling secrets
|
49
85
|
|
50
|
-
|
51
|
-
|
86
|
+
CAUTION: Do not commit secrets into your Terraform or tfctl configuration.
|
87
|
+
|
88
|
+
Instead, use AWS Secrets Manager and retrieve secrets in Terraform profiles using
|
89
|
+
the
|
52
90
|
https://www.terraform.io/docs/providers/aws/d/secretsmanager_secret.html[secrets
|
53
|
-
manager data source]
|
91
|
+
manager data source].
|
92
|
+
|
93
|
+
== Configuration Schema
|
94
|
+
|
95
|
+
The configuration file is validated using https://json-schema.org/[JSON Schema].
|
96
|
+
|
97
|
+
The schema is defined in
|
98
|
+
https://github.com/scalefactory/tfctl/blob/master/lib/tfctl/schema.rb[lib/tfctl/schema.rb]
|
99
|
+
and is a good place to look up all available options.
|