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.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
:information_source: This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE
4
4
5
-
:bar_chart: There are currently **2610** exercises and questions
5
+
:bar_chart: There are currently **2619** exercises and questions
6
6
7
7
:warning: You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [FAQ page](faq.md) for more details
Copy file name to clipboardExpand all lines: topics/terraform/README.md
+45-7Lines changed: 45 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1327,6 +1327,24 @@ dynamic "tag" {
1327
1327
1328
1328
#### Misc
1329
1329
1330
+
<details>
1331
+
<summary>What are meta-arguments in Terraform?</summary><br><b>
1332
+
1333
+
Arguments that affect the lifecycle of a resources (its creation, modification, ...) and supported by Terraform regardless to the type of resource in which they are used.
1334
+
1335
+
Some examples:
1336
+
1337
+
* count: how many resources to create out of one definition of a resource
1338
+
* lifecycle: how to treat resource creation or removal
1339
+
1340
+
</b></details>
1341
+
1342
+
<details>
1343
+
<summary>What meta-arguments are you familiar with?</summary><br><b>
1344
+
1345
+
* count: how many resources to create out of one definition of a resource
1346
+
* lifecycle: how to treat resource creation or removal
1347
+
* depends_on: create a dependency between resources
1330
1348
</b></details>
1331
1349
1332
1350
<details>
@@ -1367,14 +1385,9 @@ False. terraform console is ready-only.
1367
1385
</b></details>
1368
1386
1369
1387
<details>
1370
-
<summary>What are meta-arguments in Terraform?</summary><br><b>
1371
-
1372
-
Arguments that affect the lifecycle of a resources (its creation, modification, ...) and supported by Terraform regardless to the type of resource in which they are used.
1373
-
1374
-
Some examples:
1388
+
<summary>Explain what <code>depends_on</code> used for and given an example</summary><br><b>
1375
1389
1376
-
* count: how many resources to create out of one definition of a resource
1377
-
* lifecycle: how to treat resource creation or removal
1390
+
`depends_on` used to create a dependency between resources in Terraform. For example, there is an application you would like to deploy in a cluster. If the cluster isn't ready (and also managed by Terraform of course) then you can't deploy the app. In this case, you will define "depends_on" in the app configuration and its value will be the cluster resource.
1378
1391
1379
1392
</b></details>
1380
1393
@@ -1636,6 +1649,24 @@ module "some_module" {
1636
1649
1637
1650
</b></details>
1638
1651
1652
+
<details>
1653
+
<summary>How to manage multiple AWS accounts?</summary><br><b>
1654
+
1655
+
One way is to define multiple different provider blocks, each with its own "assume_role"
@@ -1845,3 +1876,10 @@ Instead of defining tags at resource level, consider using `default_tags` as par
1845
1876
If it's a matter of changing a resource name, you could make use of `terraform state mv <ORIGINAL_RESOURCE_NAME> <NEW_RESOURCE_NAME>`
1846
1877
1847
1878
</b></details>
1879
+
1880
+
<details>
1881
+
<summary>You try to deploy a cluster and an app on that cluster, but the app resource was created before the cluster. How to manage such situation?</summary><br><b>
1882
+
1883
+
Use the meta-argument `depends_on` in the app resource definition. This way the app will depend on the cluster resource and order will be maintained in creation of the resources.
0 commit comments