Skip to content

Commit

Permalink
feat: Add broken link checking to Starlight docs (#3849)
Browse files Browse the repository at this point in the history
* feat: Bare minimum starlight server as a starting point for prototyping

* feat: Upgrading starlight

* feat: Adding minimal starlight prototype

* feat: Switching to starlight Filetrees

* wip: WIP work on getting dynamic content

* chore: Pinning relevant versions in mise.toml

* fix: Fixing more filetrees

* fix: Working refactor

* fix: Adding dynamicity to astro

* fix: Fixing another Filetree

* fix: Fixing astro config

* feat: Done prototyping

* fix: Setting up routes to work like the legacy docs site

* fix: Adding a `TODO.md`

* fix: Fixing typo

* fix: Fixing favicon

* fix: Renaming all docs files so that they're lexically sorted

* fix: Adding logo

* feat: Working on getting features docs put together

* fix: Cleaning up Stacks feature docs

* feat: Adding includes docs

* feat: Small adjustment to trigger deployment

* fix: Add file names to all code fences

* fix: Adding file names to code fences

* feat: Adding scaffold

* feat: Adding extra arguments docs

* feat: Adding AWS authentication docs

* feat: Adding hooks docs

* feat: Updating hoomepage

* feat: Adding auto-init docs

* feat: Adding runtime control

* feat: Adding provider cache server docs

* feat: Adding engine docs

* fix: Fixing contribution docs

* fix: Fixing support docs

* feat: Adding license docs

* feat: Adding configuration overview

* feat: Adding configuration block docs

* feat: Adding attributes docs

* feat: Adding functions docs

* feat: Migrating CLI docs

* feat: Cleaning up old configuration docs

* fix: Moving over the rest of the docs

* feat: Adding strict controls and experiments docs

* chore: Bump pnpm

* feat: Adding remaining content

* fix: Bugs from merge

* fix: Downgrading node and pnpm

* fix: Adding package-lock.json

* fix: Moving to bun

* fix: Update README.md to point out that we're using bun

* fix: Fixing codespell ignore to ignore bun instead of pnpm

* Update docs-starlight/src/content/docs/02-features/09-hooks.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update docs-starlight/src/content/docs/02-features/12-provider-cache-server.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: Updating banner

* fix: Better TODO

* fix: Fixing experiments docs

* fix: Cleaning up lock file handling docs

* fix: Fixing `auto-init` docs

* fix: More grammar updates

* fix: Fixing strict controls docs

* fix: Updating scaffold docs

* fix: Fixing functions docs

* fix: Moving engine docs to MDX so that we can add a script to fetch the latest version on request

* fix: Fixing runtime-control

* fix: Fixing hooks docs

* fix: Fixing aws-authentication docs

* fix: Fixing includes docs

* fix: Fixing state backend docs

* fix: Fixing configuration blocks and terragrunt cache

* fix: More typo fixes

* fix: More typo fixes

* fix: More English fixes

* fix: More English fixes

* fix: Don't try to use a link here

* fix: Fixing `TODO.md` formatting

* feat: Adding Docker Compose for local development

* feat: Adding broken link checking

* fix: Getting rid of `{{site.baseurl}}` everywhere

* feat: Create HCL directory for configuration

* wip: Fixing broken links

* wip: Fixing more broken links

* fix: Fixing bug from merge conflict

* fix: Fixing a bunch of broken links

* fix: Fixing English bugs

* fix: Use excludes instead of conditional build with link checks

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
yhakbar and coderabbitai[bot] authored Feb 7, 2025
1 parent 30fcc73 commit 8a2f17b
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 92 deletions.
33 changes: 19 additions & 14 deletions docs-starlight/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,26 @@ The Starlight rewrite of the Terragrunt website is a work in progress.
Here are some of the tasks that need to be completed:

## Infrastructure
- [x] **Docker compose local dev setup**
- [ ] **Vercel deployment**
- [x] **Vercel preview deployments**
- [ ] **Custom domain setup**
- [x] **Docker compose local dev setup**
- [ ] **Vercel deployment**
- [x] **Vercel preview deployments**
- [ ] **Custom domain setup**

## Content
- [ ] **Content parity with current docs site**
- [x] **Parity for all docs except CLI reference**
- [ ] **Parity for CLI reference**
- [ ] **Redesign reference to use cards**
- [ ] **Setup redirects for all old URLs**
- [ ] **Automate keeping versions updated**
- [ ] **Automate IaC Engine version lookup in docs**
- [ ] **Content parity with current docs site**
- [x] **Parity for all docs except CLI reference**
- [ ] **Parity for CLI reference**
- [ ] **Redesign reference to use cards**
- [ ] **Setup redirects for all old URLs**
- [ ] **Automate keeping versions updated**
- [ ] **Automate IaC Engine version lookup in docs**

## User Experience
- [ ] **User feedback collection**
- [ ] **Broken link checking**
- [ ] **Jekyll site banner indicating new site**
- [ ] **User feedback collection**
- [ ] **Broken link checking**
- [x] **Automate broken link checking**
- [ ] **Fix broken links**
- [ ] **Fix broken links in CLI reference**
- [x] **Fix broken links in all other docs**
- [ ] **Require link checking**
- [ ] **Jekyll site banner indicating new site**
19 changes: 17 additions & 2 deletions docs-starlight/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -30,7 +31,7 @@ export default defineConfig({
{
label: 'Reference',
items: [
{ label: 'Configuration', autogenerate: { directory: '04-reference/01-configuration', collapsed: true } },
{ label: 'HCL', autogenerate: { directory: '04-reference/01-hcl', collapsed: true } },
{
label: 'CLI', collapsed: true, items: [
{ label: 'Commands', autogenerate: { directory: '04-reference/02-cli/commands', collapsed: true } },
Expand All @@ -39,7 +40,7 @@ export default defineConfig({
{ label: 'Strict Controls', slug: 'docs/reference/strict-controls' },
{ label: 'Experiments', slug: 'docs/reference/experiments' },
{ label: 'Supported Versions', slug: 'docs/reference/supported-versions' },
{ label: 'Lock File Handling', slug: 'docs/reference/lock-file-handling' },
{ label: 'Lock Files', slug: 'docs/reference/lock-files' },
{ label: 'Terragrunt Cache', slug: 'docs/reference/terragrunt-cache' },
],
},
Expand All @@ -52,6 +53,20 @@ export default defineConfig({
autogenerate: { directory: '06-migrate', collapsed: true },
},
],
// NOTE: We don't currently check links by default because the CLI
// Redesign isn't done yet. Once those pages are built out, we'll require
// links to be checked for all builds.
plugins: [starlightLinksValidator({
exclude: [
// Used in the docs for OpenTelemetry
'http://localhost:16686/',
'http://localhost:9090/',

// TODO: Remove these once the CLI redesign is done
'/docs/reference/cli**/*',
'/docs/reference/cli*',
],
})],
}),
],
});
21 changes: 11 additions & 10 deletions docs-starlight/bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@astrojs/starlight": "^0.31.1",
"astro": "^5.2.1",
"sharp": "^0.32.5",
"starlight-links-validator": "^0.14.2",
},
},
},
Expand Down Expand Up @@ -239,6 +240,8 @@

"@types/node": ["@types/node@17.0.45", "", {}, "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw=="],

"@types/picomatch": ["@types/picomatch@3.0.2", "", {}, "sha512-n0i8TD3UDB7paoMMxA3Y65vUncFJXjcUf7lQY7YyKGl6031FNjfsLs6pdLFCy2GNFxItPJG8GvvpbZc2skH7WA=="],

"@types/sax": ["@types/sax@1.2.7", "", { "dependencies": { "@types/node": "*" } }, "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A=="],

"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
Expand Down Expand Up @@ -345,8 +348,6 @@

"common-ancestor-path": ["common-ancestor-path@1.0.1", "", {}, "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w=="],

"consola": ["consola@3.4.0", "", {}, "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA=="],

"cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="],

"cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="],
Expand Down Expand Up @@ -459,7 +460,7 @@

"graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],

"h3": ["h3@1.14.0", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.2", "defu": "^6.1.4", "destr": "^2.0.3", "iron-webcrypto": "^1.2.1", "ohash": "^1.1.4", "radix3": "^1.1.2", "ufo": "^1.5.4", "uncrypto": "^0.1.3", "unenv": "^1.10.0" } }, "sha512-ao22eiONdgelqcnknw0iD645qW0s9NnrJHr5OBz4WOMdBdycfSas1EQf1wXRsm+PcB2Yoj43pjBPwqIpJQTeWg=="],
"h3": ["h3@1.15.0", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.3", "defu": "^6.1.4", "destr": "^2.0.3", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.0", "ohash": "^1.1.4", "radix3": "^1.1.2", "ufo": "^1.5.4", "uncrypto": "^0.1.3" } }, "sha512-OsjX4JW8J4XGgCgEcad20pepFQWnuKH+OwkCJjogF3C+9AZ1iYdtB4hX6vAb5DskBiu5ljEXqApINjR8CqoCMQ=="],

"hast-util-embedded": ["hast-util-embedded@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-is-element": "^3.0.0" } }, "sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA=="],

Expand Down Expand Up @@ -523,6 +524,8 @@

"iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="],

"is-absolute-url": ["is-absolute-url@4.0.1", "", {}, "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A=="],

"is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="],

"is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="],
Expand Down Expand Up @@ -683,8 +686,6 @@

"micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],

"mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="],

"mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="],

"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
Expand All @@ -709,6 +710,8 @@

"node-fetch-native": ["node-fetch-native@1.6.6", "", {}, "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ=="],

"node-mock-http": ["node-mock-http@1.0.0", "", {}, "sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ=="],

"normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="],

"nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="],
Expand Down Expand Up @@ -741,8 +744,6 @@

"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],

"pathe": ["pathe@1.1.2", "", {}, "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ=="],

"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],

"picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="],
Expand Down Expand Up @@ -867,6 +868,8 @@

"sprintf-js": ["sprintf-js@1.0.3", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="],

"starlight-links-validator": ["starlight-links-validator@0.14.2", "", { "dependencies": { "@types/picomatch": "^3.0.1", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", "hast-util-has-property": "^3.0.0", "is-absolute-url": "^4.0.1", "kleur": "^4.1.5", "mdast-util-to-string": "^4.0.0", "picomatch": "^4.0.2", "unist-util-visit": "^5.0.0" }, "peerDependencies": { "@astrojs/starlight": ">=0.15.0" } }, "sha512-OsPngajtW4kB/oxiW3Kt1Fd+rY3opdIWbD/n5pGQMzil03QujT6rAeHEBR4tXRdjQW4HnFZYIy/ANhBu4kUNfQ=="],

"stream-replace-string": ["stream-replace-string@2.0.0", "", {}, "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w=="],

"streamx": ["streamx@2.22.0", "", { "dependencies": { "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" } }, "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw=="],
Expand Down Expand Up @@ -899,7 +902,7 @@

"trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="],

"tsconfck": ["tsconfck@3.1.4", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"], "bin": { "tsconfck": "bin/tsconfck.js" } }, "sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ=="],
"tsconfck": ["tsconfck@3.1.5", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"], "bin": { "tsconfck": "bin/tsconfck.js" } }, "sha512-CLDfGgUp7XPswWnezWwsCRxNmgQjhYq3VXHM0/XIRxhVrKw0M1if9agzryh1QS3nxjCROvV+xWxoJO1YctzzWg=="],

"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],

Expand All @@ -915,8 +918,6 @@

"uncrypto": ["uncrypto@0.1.3", "", {}, "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="],

"unenv": ["unenv@1.10.0", "", { "dependencies": { "consola": "^3.2.3", "defu": "^6.1.4", "mime": "^3.0.0", "node-fetch-native": "^1.6.4", "pathe": "^1.1.2" } }, "sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ=="],

"unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="],

"unist-util-find-after": ["unist-util-find-after@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ=="],
Expand Down
5 changes: 3 additions & 2 deletions docs-starlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@astrojs/starlight": "^0.31.1",
"astro": "^5.2.1",
"sharp": "^0.32.5"
"sharp": "^0.32.5",
"starlight-links-validator": "^0.14.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ You can also see what to expect in your filesystem at each step [here](https://g

4. **Use Terragrunt to manage your units**

Luckily, Terragrunt has a built-in feature to control the inputs passed to your OpenTofu/Terraform configurations. This feature is called (aptly enough) [inputs](/docs/reference/config-blocks-and-attributes/#inputs).
Luckily, Terragrunt has a built-in feature to control the inputs passed to your OpenTofu/Terraform configurations. This feature is called (aptly enough) [inputs](/docs/reference/hcl/attributes/#inputs).

Let's add inputs to both `terragrunt.hcl` files in the `foo` and `bar` directories:
Expand Down Expand Up @@ -504,7 +504,7 @@ You can also see what to expect in your filesystem at each step [here](https://g
The next step of the Getting Started guide is to follow the [Overview](/docs/getting-started/overview/) guide. This guide will introduce you to more advanced Terragrunt features, and show you how to use Terragrunt to manage your infrastructure across multiple environments in a real-world AWS account.
If you're ready to get your hands dirty with more advanced Terragrunt features yourself, you can skip ahead to the [Features](/docs#features) section of the documentation.
If you're ready to get your hands dirty with more advanced Terragrunt features yourself, you can skip ahead to the [Features](/docs/features/units) section of the documentation.
If you ever need help with a particular problem, take a look at the resources available to you in the [Support](/docs/community/support/) section. You are especially encouraged to join the [Terragrunt Discord](https://discord.gg/YENaT9h8jh) server, and become part of the Terragrunt community.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ You want to be mindful not to do too much with this configuration block, as it c

The `terraform` block is used to indicate where to source the OpenTofu/Terraform module from (it's called `terraform` for historical reasons, but it controls behavior pertinent to both OpenTofu and Terraform).

In this example, all it is doing is controlling where Terragrunt should fetch the OpenTofu/Terraform module from. The configuration block [can do a lot more](/docs/reference/config-blocks-and-attributes/#terraform), but the `source` attribute is the most common attribute you'll set on the `terraform` block.
In this example, all it is doing is controlling where Terragrunt should fetch the OpenTofu/Terraform module from. The configuration block [can do a lot more](/docs/reference/hcl/blocks#terraform), but the `source` attribute is the most common attribute you'll set on the `terraform` block.

You'll notice that in the examples above, we were using `find` to locate the `.tf` files being generated and placed within the OpenTofu/Terraform module being downloaded here within the `.terragrunt-cache` directory. This is because Terragrunt aims to operate as an orchestrator, at a level of abstraction higher than OpenTofu/Terraform.

Expand Down Expand Up @@ -220,7 +220,7 @@ Under the hood, what happens here is that Terragrunt sets relevant `TF_VAR_` pre

#### Further Reading

You can learn more about all the configuration blocks and attributes available in Terragrunt in the [reference documentation](/docs/reference/config-blocks-and-attributes/).
You can learn more about all the configuration [blocks](/docs/reference/hcl/blocks) and [attributes](/docs/reference/hcl/attributes) available in Terragrunt in the docs.

## Core Patterns

Expand Down Expand Up @@ -498,7 +498,7 @@ Following this pattern, you can create as many units of infrastructure in your p

Note that while this is the idiomatic approach for defining the `key` attribute for your `backend` configuration, it is not a requirement. You can set the `key` attribute to any value you like, and you can use any Terragrunt HCL function to generate that value dynamically such that you avoid collisions in your remote state.

Another completely valid approach, for example, is to utilize [get_repo_root](/docs/reference/built-in-functions/#get_repo_root), which returns a path relative to the root of the git repository. This, of course, has the drawback that it will not work if you are not using git.
Another completely valid approach, for example, is to utilize [get_repo_root](/docs/reference/hcl/functions#get_repo_root), which returns a path relative to the root of the git repository. This, of course, has the drawback that it will not work if you are not using git.

Just make sure to test your configuration carefully, and document your approach so that others can understand what you're doing.

Expand Down Expand Up @@ -1013,9 +1013,9 @@ You have to exercise your best judgment when deciding how much complexity to int
Now that you’ve learned the basics of Terragrunt, here is some further reading to learn more:
1. [Features](/docs/#features): Learn about the core features Terragrunt supports.
1. [Features](/docs/features/units): Learn about the core features Terragrunt supports.
2. [Documentation](/docs/): Check out the detailed Terragrunt documentation.
2. [Documentation](/docs/reference/hcl/overview): Check out the detailed Terragrunt reference documentation.
3. [_Fundamentals of DevOps and Software Delivery_](https://www.gruntwork.io/fundamentals-of-devops): Learn the fundamentals of DevOps and Software Delivery from one of the founders of Gruntwork!
Expand Down
Loading

0 comments on commit 8a2f17b

Please sign in to comment.