Skip to content

Commit b7f4d5e

Browse files
committed
#58 updated README
1 parent 3b7a156 commit b7f4d5e

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ This diagram shows the namespaces used in the cluster and the services deployed
146146
## Useful tools
147147

148148
- [tfenv](https://github.com/tfutils/tfenv) - tool for managing different versions of terraform; the required version can be specified directly as an argument or via `.terraform-version`
149+
- [tgenv](https://github.com/cunymatthieu/tgenv) - tool for managing different versions of terragrunt.
149150
- [terraform](https://www.terraform.io/) - terraform itself, our main development tool: `tfenv install`
150151
- [awscli](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) - console utility to work with AWS API
151152
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - conssole utility to work with Kubernetes API
@@ -362,6 +363,43 @@ We've also used `terragrunt` to simplify s3 bucket creation and terraform backen
362363
363364
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.
364365
366+
#### Apply infrastructure by layers with `terragrunt`
367+
368+
Go to layer folder `terraform/layer1-aws/` or `terraform/layer2-k8s/` and run this command:
369+
370+
```
371+
terragrunt apply
372+
```
373+
374+
> The `layer2-k8s` has a dependence on `layer1-aws`.
375+
376+
#### Target apply by `terragrunt`
377+
378+
Go to layer folder `terraform/layer1-aws/` or `terraform/layer2-k8s/` and run this command:
379+
380+
```
381+
terragrunt apply -target=module.eks
382+
```
383+
384+
> The `-target` is formed from the following parts `resource type` and `resource name`.
385+
> For example: `-target=module.eks`, `-target=helm_release.loki_stack`
386+
387+
#### Destroy infrastructure by `terragrunt`
388+
389+
For destroy both layers, run this command from `terraform/` folder:
390+
391+
```
392+
terragrant run-all destroy
393+
```
394+
395+
For destroy `layer2-k8s`, run this command from `terraform/layare2-k8s` folder:
396+
397+
```
398+
terragrunt destroy
399+
```
400+
401+
> The `layer2-k8s` has dependence from `layer1-aws` and when you destroy `layer1-aws`, `layer2-k8s` destroyed automatically.
402+
365403
## What to do after deployment
366404
367405
After applying this configuration, you will get the infrastructure described and outlined at the beginning of the document. In AWS and within the EKS cluster, the basic resources and services necessary for the operation of the EKS k8s cluster will be created.

terraform/layer2-k8s/templates/cert-manager-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ affinity:
1414
- matchExpressions:
1515
- key: node.kubernetes.io/lifecycle
1616
operator: In
17-
values:
17+
values:
1818
- ondemand
1919

2020
cainjector:

0 commit comments

Comments
 (0)