Skip to content

Commit 7148218

Browse files
Apply suggestions from code review
Co-authored-by: Judith Malnick <judith@hashicorp.com>
1 parent 1a84bdc commit 7148218

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

content/terraform/v1.13.x/docs/language/meta-arguments/for_each.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Learn how the `for_each` meta-argument works in Terraform configura
77

88
By default, [`resource` block](/terraform/language/block/resource) configures one real infrastructure object. Similarly, a [`module` block](/terraform/language/block/module) includes a child module's contents into the configuration one time.
99

10-
Use the `for_each` meta-argument to manage several similar objects, such as a fixed pool of compute instances, without writing a separate block for each object. When a `resource`, `module`, or `ephemeral` block includes a `count` argument whose value is a whole number, Terraform creates that many instances.
10+
Use the `for_each` meta-argument to manage several similar objects, such as a fixed pool of compute instances, without writing a separate block for each object. When a `resource`, `module`, or `ephemeral` block includes a `for_each` argument, Terraform creates an instance for each member of the list or map specified as the value.
1111

1212
## Usage
1313

content/terraform/v1.13.x/docs/language/meta-arguments/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ By default, Terraform configures one infrastructure object for each `resource`,
3333

3434
> **Hands-on**: Complete the [Manage similar resources with for each](/terraform/tutorials/configuration-language/for-each) tutorial to learn how to create multiple instances of a resource.
3535
36+
## `lifecycle`
37+
38+
The `lifecycle` block accepts a rule that customizes how Terraform performs the lifecycle stages for each resource. Support for each `lifecycle` rule varies across Terraform configuration blocks. Refer to the [`lifecycle` reference](/terraform/language/meta-arguments/lifecycle) for details.
39+
40+
> **Hands-on**: Complete the [Manage resource lifecycle](/terraform/tutorials/state/resource-lifecycle) tutorial to learn how to manage the lifecycle of your infrastructure resources.
3641
3742
## `provider`
3843

@@ -42,8 +47,3 @@ By default, Terraform determines the local name of the provider from the first w
4247

4348
By default, child modules inherit the default provider configurations of their parent module. You can specify an alternate provider configuration in the `module` block using the `providers` argument. The `providers` argument instructs Terraform to use the reference provider configuration to create the module resources. Refer to the [`providers` reference](/terraform/language/meta-arguments/providers) for details.
4449

45-
## `lifecycle`
46-
47-
The `lifecycle` block accepts a rule that customizes how Terraform performs the lifecycle stages for each resource. Support for each `lifecycle` rule varies across Terraform configuration blocks. Refer to the [`lifecycle` reference](/terraform/language/meta-arguments/lifecycle) for details.
48-
49-
> **Hands-on**: Complete the [Manage resource lifecycle](/terraform/tutorials/state/resource-lifecycle) tutorial to learn how to manage the lifecycle of your infrastructure resources.

content/terraform/v1.13.x/docs/language/meta-arguments/lifecycle.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This is an opt-in behavior because many remote object types have unique name req
3535
Terraform propagates and applies `create_before_destroy` behavior to all resource dependencies. For example:
3636

3737
- `create_before_destroy` is enabled on resource `A` but not on resource `B`.
38-
- Because resource `A` is dependent on resource `B1, Terraform enables `create_before_destroy` for resource `B` implicitly by default and stores it to the state file.
38+
- Because resource `A` is dependent on resource `B`, Terraform enables `create_before_destroy` for resource `B` implicitly by default and stores it to the state file.
3939

4040
As a result, you cannot override `create_before_destroy`
4141
to `false` on resource `B` because that would imply dependency cycles in the graph.

0 commit comments

Comments
 (0)