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
An Azure OIDC authentication block that determines how Pipelines will authenticate with Azure using OIDC. See more [below](#azure_oidc-block-attributes).
A custom authentication block that determines how Pipelines will authenticate with custom authentication logic when running Terragrunt commands. See more [below](#custom-block-attributes).
185
204
</HclListItemDescription>
186
205
</HclListItem>
187
206
@@ -280,7 +299,7 @@ Whether or not Pipelines will consolidate deleted resources when running Terragr
280
299
281
300
The Infrastructure as Code(Iac) binary that Pipelines will instruct Terragrunt to use. Valid values are:
282
301
-`opentofu` (default): Use OpenTofu for managing infrastructure. Gruntwork recommends customers use OpenTofu.
283
-
-`terraform`: Use Terraform for managing infrastructure.
302
+
-`terraform`: Use Terraform for managing infrastructure.
284
303
285
304
:::note
286
305
@@ -344,27 +363,31 @@ This is to make it convenient to tuck the `accounts.yml` file away somewhere in
344
363
<HclListItemDescription>
345
364
346
365
The AWS account ID that Pipelines will authenticate with.
Copy file name to clipboardExpand all lines: docs/2.0/reference/pipelines/configurations-as-code/index.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,9 @@ To process configurations, Pipelines parses all `.hcl` files within a `.gruntwor
9
9
We recommend reviewing our [concepts page](/2.0/docs/pipelines/concepts/hcl-config-language) on the HCL language to ensure familiarity with its features before configuring Pipelines.
10
10
:::
11
11
12
-
13
12
## Basic configuration
14
13
15
-
The minimum configuration required for Pipelines to function depends on the specific context. In most scenarios, Pipelines must determine how to authenticate with a cloud provider to execute Terragrunt commands. If authentication is not configured where required, Pipelines will generate an error.
14
+
The minimum configuration required for Pipelines to function depends on the specific context. In most scenarios, Pipelines must determine how to authenticate with a cloud provider to execute Terragrunt commands. Unless running Pipelines on a host machine that is already authenticated with a cloud provider (e.g. a self-hosted runner), it is generally required to configure some form of authentication within the `authentication` block.
16
15
17
16
Below is an example of a minimal configuration for a single Terragrunt unit, demonstrating how to enable Pipelines to authenticate with AWS using OIDC:
18
17
@@ -31,6 +30,17 @@ unit {
31
30
32
31
Placing this configuration in a `gruntwork.hcl` file within the same directory as a `terragrunt.hcl` file directs Pipelines to assume the `role-to-assume-for-plans` role in the AWS account with the ID `an-aws-account-id` when executing Terragrunt plan commands. The authentication process leverages [OIDC](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services) to securely connect to AWS and assume the specified role.
33
32
33
+
:::tip
34
+
35
+
If you are running Pipelines on a host machine that is already authenticated with a cloud provider, you can explicitly leave the `authentication` block empty to signal that Pipelines should not attempt to perform any authentication itself.
36
+
37
+
```hcl
38
+
unit {
39
+
authentication {}
40
+
}
41
+
```
42
+
43
+
:::
34
44
35
45
It is common for multiple Terragrunt units within a repository to assume the same AWS role. For instance, all units within a specific directory may provision resources for the same AWS account. Configuring AWS authentication at the environment level is more efficient in these cases. You can do this by defining an `environment` block within one of the `.hcl` files in the `.gruntwork` directory at the repository root and specifying the AWS authentication configuration.
36
46
@@ -63,7 +73,6 @@ Details regarding the functionality of each configuration type are outlined belo
63
73
64
74
Pipelines configurations are structured into a hierarchy to manage specificity. Configurations that are more specific to an individual unit of IaC will take precedence over more general configurations in cases of conflict.
65
75
66
-
67
76
The configuration hierarchy is as follows:
68
77
69
78
### Repository configurations
@@ -221,6 +230,7 @@ Job consolidation is a process by which Pipelines merges multiple related jobs (
221
230
This optimization significantly reduces CI/CD costs by consolidating Terragrunt execution into fewer jobs, spreading the operational expenses more efficiently. Additionally, it enhances accuracy by allowing Terragrunt to leverage a Directed Acyclic Graph (DAG) for proper sequencing of updates.
222
231
223
232
For example:
233
+
224
234
- Instead of running the following independent jobs:
225
235
A. `ModuleAdded`
226
236
B. `ModuleChanged` (which depends on `ModuleAdded`)
@@ -243,6 +253,7 @@ In rare cases, you might disable job consolidation to allocate maximum resources
243
253
Configurations must be specified within a single file named gruntwork.hcl, located in the same directory as the terragrunt.hcl file. These configurations are referred to as local configurations and are generally used to define settings specific to a single unit of Infrastructure as Code (IaC) within a repository. .
244
254
245
255
These configurations can serve two purposes:
256
+
246
257
1. Define all the settings necessary for Pipelines to operate within the scope of a single unit.
247
258
2. Override global configurations defined in the `.gruntwork` directory, tailoring them to the unit's specific needs.
248
259
@@ -288,17 +299,16 @@ filter {
288
299
289
300
All configuration blocks containing a `filter` block will apply only to units that match the specified filter.
290
301
291
-
292
302
### Authentication blocks
293
303
294
304
[Full Reference for Authentication Blocks](/2.0/reference/pipelines/configurations-as-code/api#authentication-block)
295
305
296
306
Authentication blocks are configuration components used by [environment](#environment-blocks) and [unit](#unit-blocks) blocks to specify how Pipelines will authenticate with cloud platforms when executing Terragrunt commands.
297
307
298
308
:::note
299
-
Authentication blocks encapsulate more specific authentication configurations tailored to individual cloud platforms. When Pipelines processes an `authentication` block, it attempts to authenticate with all cloud platforms defined within it.
300
309
301
-
Currently, the only supported block that can be nested within an `authentication` block is `aws_oidc`.
310
+
Authentication blocks encapsulate more specific authentication configurations tailored to individual cloud platforms. When Pipelines processes an `authentication` block, it attempts to authenticate with the relevant cloud platform defined within it.
0 commit comments