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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cac739f38f0484a3f0a8373224183f0705c79372962c58711f82719978d86fbe
4
- data.tar.gz: 8ed33267e070125bb03e1591075642163c367f8d5ab1d4ee4040c2afc97a11d8
3
+ metadata.gz: b7a1d287bce54f0203c80b4814f67ddb3d5f38319796a185a69ccf1fe1b65f02
4
+ data.tar.gz: 924e81046fde7a921f66959893429c10fbcffd8a3f32e1b6257cde2935c1b5d1
5
5
  SHA512:
6
- metadata.gz: 675c2b7e868b2850749a7ca53b34ee594f84a8b30a62f3098ede1221394879d7595ecede9b76eb3da960728600092f1385ac35d122e5d2aaf17e699f903d019a
7
- data.tar.gz: caf57a862a8e5ecc2e3ff64102389f1822527f4975a708407b75a23a2378d8a087fe1a6ead434f4835fc3e5681c35c145d5d5b6dfb446409ffc909940a34c2e7
6
+ metadata.gz: 044ad7209c428aa8c1f7eaf11258089ed6ce304a2943b79739ba1b8337fbd6487f4cda758c73acfc9de35f17fc272ef98d74fe64c274ea4d5e0112bc1749329b
7
+ data.tar.gz: 22a221bb105a66c5b9512a604886eb458ff1ec2876ee8d3599f7c6c0cc5e6abb5fafd0d47aa2cd61fbc979b0ba5ca33a8f18a47a5afacfd27515ea5e333f0868
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  AllCops:
3
- TargetRubyVersion: 2.3
3
+ TargetRubyVersion: 2.5
4
4
  DisplayCopNames: true
5
5
 
6
6
  Layout/IndentationWidth:
7
7
  Width: 4
8
8
 
9
- Layout/IndentHeredoc:
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/AlignHash:
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
- Metrics/LineLength:
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
@@ -1,17 +1,19 @@
1
1
  rvm:
2
- - 2.3
2
+ - 2.5
3
3
  - 2.6
4
- sudo: false
4
+ - 2.7
5
+ os: linux
6
+ language: ruby
5
7
  script: make test
6
- deploy:
7
- provider: rubygems
8
- api_key:
9
- secure: FKAONS7x6koN7oiEULr4ViwjlDBzbE0bCgqhXRP4DfTtlRyEymeqgrfSIqkVH7unjd0muIGrMBnFuaQVSx7648RS1Ss0QAJo32SVnzoYl1P03cijqNmbbaf1jRdA3IGmh0gV5vsXrmlHiP8gfAuC9PqQ550OzxzWUvEI8vXgSTibmKd/PoQinv5g/dq0gBFjlhSMt/k3Z9WlMmkEsAro/r/Ie2M7mItHPT65f0ga5q5SeujPQQ3Sd/l3mznh37bmnw5RZpFDYdA7jL2p0Y58XJPBU8soa3ZC5GeHyxCYVoGh6EDGAFb83ERRT6rQ7ywkOufTv1o497P7a/prSbvT6fzc+DcugXPEaglT+dUXMe36OoF907Xva4vq3xIHV2N/yrxbDM85hmMk22wEU+9wpDDzFNQnfsXNbaHG9F7gLgy0eoTRrSuJf6cPDlE8pwvn7b8cjieeqWc//ZNhSYnHYZGER4LFINWVxs68Eofmmqp2IESTcUpJ8oB4bV+bzzyobJMRobOXu2hvgCrTdr6r/PnckpAfZE/l4nVQa14f1FU//8bU3DwvNun6TX1Ujp+XNiRDUlvP2KnkBU4s5rsIkL3lCHW7r6GipSk6SOvGMTz5eySMsoWvZQBdAzk/OxcIteeWH9pdo1Hbu5x2/bwyuTRCQ9E79CKWDKlIQwCgUY0=
10
- gem: tfctl
11
- on:
12
- tags: true
13
- repo: scalefactory/tfctl
14
- notifications:
15
- slack:
16
- rooms:
17
- secure: HrdsUaTCvwtq5rLyAf7Uwo76p9JhxnoFvoZU/AtxTCL6lwMm5pqpfDAdbBH8C2BYMWRyiS8IfSrvuLbGUr317qJgVCmnhD7JIgdA0Aih4GkR0yK+EVao7qdOClO2CGJFJGqHveBBpXy94FEwgFwQSvnuSZdY8gNdXafvpgrPvcbWHIF9Bq7StfYelWZX6+FL7xczqVhdetXcHJEj6Q/thkbvyn0hJAVegjDq4Pw3MyR66Mv5HTj+jYbGrJOR1poNW8vv4iQjK0TIMvCCeTv4Ddrjitn1kOK1BPYqoHEkaRwXdS7+hevv+UfV074awTp3UOIS5VP3ve/KX21xcl9DWMG7Gde9tuyap9WKhN3XE5686qrfn4M/L7PmVnzeYimUKLQfdqjDXa7UI3orGIOq8nKCsCUFvFUQZ/DxeEssJzBNNRbeGywwVtXk7/8L2HHiQJ3t/29vMLEq6EwskYK3Uao2aIVWpLSkPwOuwVxrNWXrwojrrKo+oo8QvW6xkov5UW3VkapyzRyDN2oIpNkFeLYfuyTO4MBsnLzCBqJYEeku2l0Hp9WBq2Q1a+FRgqQlcRbLPsYwK5AdkRKcWuXP8FMZoqXX6F9B73q5Dbub2et4YN4zhvroLZN6MmlneM6faJh9aS4yV2ZlU1XbOtbqP0nkHrJ+o8DeM/wgTB1GB90=
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
@@ -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
- * FEATURE: Added `-l` switch to list discovered accounts.
33
+ * feat: Added `-l` switch to list discovered accounts.
6
34
 
7
35
  == 0.0.2
8
36
 
9
- * BUGFIX: Fixed an exception when `exclude_accounts` is not set.
37
+ * fix: Fixed an exception when `exclude_accounts` is not set.
10
38
 
11
39
  == 0.0.1
12
40
 
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ guard :rspec, cmd: 'bundle exec rspec' do
4
+ watch(%r{^spec/.+_spec\.rb$})
5
+ watch(%r{^lib/tfctl/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
6
+ watch('spec/spec_helper.rb') { 'spec' }
7
+ end
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
@@ -1,21 +1,43 @@
1
- :toc:
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
- Tfctl is a small Terraform wrapper for working with multi-account AWS
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
- Discovers accounts by reading the AWS Organizations API and can assign
14
- Terraform resources to accounts based on the organization hierarchy. Resources
15
- can be assigned globally, based on organization unit or individual accounts.
16
- It supports nested OU hierarchies.
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
- Tfctl was originally developed to integrate Terraform with
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.3
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
- == Docs
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
- tfctl should be run from the root of the project directory. It will generate
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 (usually in `conf/`)
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 running tfctl or run
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 -c conf/example.yaml -s
126
+ tfctl -s
99
127
  ----
100
128
 
101
129
  List all discovered accounts:
102
130
 
131
+ [source,shell]
103
132
  ----
104
- tfctl -c conf/example.yaml --all -l
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 Terraform init across all accounts:
139
+ Run `terraform init` across all accounts:
111
140
 
141
+ [source,shell]
112
142
  ----
113
- tfctl -c conf/example.yaml --all -- init
143
+ tfctl --all -- init
114
144
  ----
115
145
 
116
- Run plan in `test` OU accounts:
146
+ Plan Terraform across all accounts in the `test` OU:
117
147
 
148
+ [source,shell]
118
149
  ----
119
- tfctl -c conf/example.yaml -o test -- plan
150
+ tfctl -o test -- plan
120
151
  ----
121
152
 
122
- Run plan in `live` accounts assuming that `live` is a child OU in multiple
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 -c conf/example.yaml -o '.*/live' -- plan
158
+ tfctl -o '.*/live' -- plan
127
159
  ----
128
160
 
129
- Run plan in an individual account:
161
+ Run a plan for an individual account:
130
162
 
163
+ [source,shell]
131
164
  ----
132
- tfctl -c conf/example.yaml -a example-account - plan
165
+ tfctl -a example-account - plan
133
166
  ----
134
167
 
135
- Run apply in all accounts:
168
+ Apply Terraform changes across all accounts:
136
169
 
170
+ [source,shell]
137
171
  ----
138
- tfctl -c conf/example.yaml --all -- apply
172
+ tfctl --all -- apply
139
173
  ----
140
174
 
141
- Run destroy in `test` OU accounts:
175
+ Destroy Terraform-managed resources in all the `test` OU accounts:
142
176
 
177
+ [source,shell]
143
178
  ----
144
- tfctl -c conf/example.yaml -o test -- destroy -auto-approve
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 -c conf/example.yaml -a example-account -u -- plan
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 across
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: nil,
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
- # Generates configuration and runs Terraform commands for a target account.
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
- config: config,
122
- account_id: account[:id],
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
@@ -1,7 +1,31 @@
1
- == Configuration
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
- Tfctl retrieves initial account configuration from AWS Organizations and merges
4
- it with organization config specified in the yaml file.
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
- example_param: 'will be overriden further down'
42
+ data:
43
+ example_param: 'will be overriden further down'
19
44
 
20
45
  organization_units:
21
46
  team:
22
- example_param: 'will win in team ou'
47
+ data:
48
+ example_param: 'will win in team ou'
23
49
  team/live:
24
- example_param: 'will win in team/live ou'
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 -c
45
- conf/CONFIG_FILE.yaml -s`. It's safe to run as it doesn't make any changes to
46
- AWS resources. It's a good way to test your configuration.
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
- === Handling secrets
84
+ == Handling secrets
49
85
 
50
- No secrets should be committed into Terraform or tfctl configuration. Use AWS
51
- Secrets Manager instead and retrieve in Terraform profiles using
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.