Skip to content

Commit e25b21c

Browse files
committed
Small tweaks to DELAR model
1 parent 0b164c8 commit e25b21c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content/articles/delar-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ Why do we need them? Because root modules should not be reused, but we also want
8383

8484
An example of an apex module might be a Kubernetes cluster management module. It might depend on a control plane module, multiple calls to a node group module, and maybe some additional configuration modules. Since your root module would grow quite large if you called all of them and were doing `for_each` over the node groups, you decide to create one single apex module that defines parameters and calls all the dependent modules. Now your root modules are simplified because they only need to call one module and pass parameters to it.
8585

86-
Note that as discussed in the library layer, the apex module doesn't embed a bunch of other modules, it depends on them and calls them.
86+
Note that as discussed in the library layer, the apex module doesn't embed a bunch of other modules, it depends on them and calls them. And again, this is not really Terraform-specific. You can create apex Ansible roles, for example.
8787

8888
## Example
8989

9090
The repository [https://github.com/cloudboss/terraform-aws-tailscale-subnet-router](https://github.com/cloudboss/terraform-aws-tailscale-subnet-router/tree/v0.2.1/example) has an example root module structured according to the DELAR model.
9191

9292
It contains three files: `main.tf`, `state.tf`, and `vars.tf`. Notice how `vars.tf` just defines locals that are passed to the module in `main.tf`. There is no need for a `variables.tf` and `*.tfvars` because this is not meant to be reused. Another environment would use the same `main.tf` and modify only `state.tf` and `vars.tf`.
9393

94-
The execution layer for this is to run the following commands with my AWS credentials in scope:
94+
The execution layer for this is to run the following commands with your AWS credentials in scope:
9595

9696
```bash
9797
terraform init

0 commit comments

Comments
 (0)