You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-RU.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,7 @@
232
232
233
233
#### S3 state backend
234
234
235
-
В качестве бэкенда для хранения стейтов терраформа и для обмена данными между слоями используется S3. Есть два способа настроить бэкенд - создать вручную `backend.tf` файл в каджом слое. Более простой способ, это выполнить:
235
+
В качестве бэкенда для хранения стейтов терраформа и для обмена данными между слоями используется S3. Есть два способа настроить бэкенд: создать вручную `backend.tf` файл в каждом слое и более простой способ - выполнить из `terraform/`:
В файле `terraform/demo.tfvars.example` представлен пример со значениями для терраформа. Скопируйте его в `terraform/terraform.tfvars` и отредактируйте по своему сомотрению.
244
+
В файле `terraform/demo.tfvars.example` представлен пример со значениями для терраформа. Скопируйте его в `terraform/terraform.tfvars` и отредактируйте по своему усмотрению:
> Все возможные параметры можно посмотреть в Readme для каждого слоя.
247
251
@@ -284,7 +288,7 @@
284
288
Команда `terraform init` используется для инициализации стейта и его бэкенда, провайдеров, плагинов и модулей. Это первая команда, которую необходимо выполнить в `layer1` и `layer2`:
285
289
286
290
```bash
287
-
$ terraform init --var-file=../terraform.tfvars
291
+
$ terraform init
288
292
```
289
293
290
294
Правильный аутпут:
@@ -304,7 +308,7 @@
304
308
Команда `terraform plan` считывает стейт терраформа, конфигурационные файлы и выводит список изменений и действий, которые необходимо произвести, чтобы привести стейт в соответствие с конфигурацией. Удобный способ проверить изменения перед применением. В случае использования с параметром `-out` сохраняет пакет изменений в указанный файл, который позже можно будет использовать при `terraform apply`. Пример вызова:
305
309
306
310
```bash
307
-
$ terraform plan --var-file=../terraform.tfvars
311
+
$ terraform plan
308
312
# ~600 rows skipped
309
313
Plan: 82 to add, 0 to change, 0 to destroy.
310
314
@@ -320,7 +324,7 @@
320
324
Команда `terraform apply` сканирует `.tf` в текущей директории и приводит стейт к описанной в них конфигурации, производя изменения в инфраструктуре. По умолчанию перед применение производится `plan` с диалогом о продолжении. Опционально можно указать в качестве инпута сохраненный план файл:
Таким образом `terragrunt` создаст бакет, подготовит бэкенд терраформа, последовательно в layer-1 и layer-2 произведет `terraform init` и `terraform apply`.
Copy file name to clipboardExpand all lines: README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,7 @@ Further in the [IAM](https://console.aws.amazon.com/iam/home#/home) console:
230
230
231
231
#### S3 state backend
232
232
233
-
S3 is used as a backend for storing terraform state and for exchanging data between layers. You can manually create s3 bucket and then put backend setting into `backend.tf` file in each layer. Alternatively you can run:
233
+
S3 is used as a backend for storing terraform state and for exchanging data between layers. You can manually create s3 bucket and then put backend setting into `backend.tf` file in each layer. Alternatively you can run from `terraform/` directory:
@@ -239,7 +239,13 @@ S3 is used as a backend for storing terraform state and for exchanging data betw
239
239
240
240
#### Inputs
241
241
242
-
File `terraform/demo.tfvars.example` contains example values. Copy this file to `terraform/terraform.tfvars` and set you values. You can find all possible variables in each layer's Readme.
242
+
File `terraform/layer1-aws/demo.tfvars.example` contains example values. Copy this file to `terraform/layer1-aws/terraform.tfvars` and set you values:
> You can find all possible variables in each layer's Readme.
243
249
244
250
#### Secrets
245
251
@@ -280,7 +286,7 @@ By default, the variable `create_acm_certificate` is set to `false`. Which instr
280
286
The `terraform init` command is used to initialize the state and its backend, downloads providers, plugins, and modules. This is the first command to be executed in `layer1` and `layer2`:
281
287
282
288
```bash
283
-
$ terraform init --var-file=../terraform.tfvars
289
+
$ terraform init
284
290
```
285
291
286
292
Correct output:
@@ -300,7 +306,7 @@ The `terraform init` command is used to initialize the state and its backend, do
300
306
The `terraform plan` command reads terraform state and configuration files and displays a list of changes and actions that need to be performed to bring the state in line with the configuration. It's a convenient way to test changes before applying them. When used with the `-out` parameter, it saves a batch of changes to a specified file that can later be used with `terraform apply`. Call example:
301
307
302
308
```bash
303
-
$ terraform plan --var-file=../terraform.tfvars
309
+
$ terraform plan
304
310
# ~600 rows skipped
305
311
Plan: 82 to add, 0 to change, 0 to destroy.
306
312
@@ -316,7 +322,7 @@ The `terraform plan` command reads terraform state and configuration files and d
316
322
The `terraform apply`command scans `.tf`in the current directory and brings the state to the configuration described in them by making changes in the infrastructure. By default, `plan` with a continuation dialog is performed before applying. Optionally, you can specify a saved plan file as input:
317
323
318
324
```bash
319
-
$ terraform apply --var-file=../terraform.tfvars
325
+
$ terraform apply
320
326
# ~600 rows skipped
321
327
Plan: 82 to add, 0 to change, 0 to destroy.
322
328
@@ -345,8 +351,8 @@ We've also used `terragrunt` to simplify s3 bucket creation and terraform backen
By running this `terragrunt` will create s3 bucket, configure terraform backend and then will run `terraform init` and `terraform apply` in layer-1 and layer-2 sequentially.
0 commit comments