Skip to content

Commit bb403cf

Browse files
committed
update terraform 0.12 example README files
1 parent 159cca6 commit bb403cf

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Advanced Dynamic Blocks
2-
The Advanced Dynamic Blocks example shows how [dynamic blocks](https://www.terraform.io/docs/configuration/expressions.html#dynamic-blocks) can be used to dynamically create multiple instances of a block within a resource from a complex value such as a list of maps.
1+
# Advanced Dynamic Blocks Example
2+
This example shows how [dynamic blocks](https://www.terraform.io/docs/configuration/expressions.html#dynamic-blocks) can be used to dynamically create multiple instances of a block within a resource from a complex value such as a list of maps.
33

44
In this example, we create an [Elastic Beanstalk Environment](https://www.terraform.io/docs/providers/aws/r/elastic_beanstalk_environment.html) resource with two option settings dynamically generated from a variable `settings` defined as a list of maps, each of which has three entries: `namespace`, `name`, and `value`.
55

@@ -88,4 +88,3 @@ You should see output from running `terraform apply` that looks like this:
8888
}
8989
}
9090
```
91-

infrastructure-as-code/terraform-0.12-examples/dynamic-blocks-and-splat-expressions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Dynamic Blocks and Splat Expressions Example
2-
The [Dynamic Blocks and Splat Expresions](./dynamic-blocks-and-splat-expressions) example shows how the [dynamic blocks](https://www.terraform.io/docs/configuration/expressions.html#dynamic-blocks) can be used to dynamically create multiple instances of a block within a resource and how [splat expressions](https://www.terraform.io/docs/configuration/expressions.html#splat-expressions) (`[*]`) can now be used to iterate across those blocks. Recall that the old splat expression (`.*`) could only iterate across top-level attributes of a resource.
2+
This example example shows how the [dynamic blocks](https://www.terraform.io/docs/configuration/expressions.html#dynamic-blocks) can be used to dynamically create multiple instances of a block within a resource and how [splat expressions](https://www.terraform.io/docs/configuration/expressions.html#splat-expressions) (`[*]`) can now be used to iterate across those blocks. Recall that the old splat expression (`.*`) could only iterate across top-level attributes of a resource.
33

44
In this example, we create an AWS security group with 2 dynamically generated ingress blocks and then create an output that iterates across the ingress blocks to give us both ports.
55

infrastructure-as-code/terraform-0.12-examples/first-class-expressions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# First Class Expressions Example
2-
The [First Class Expressions](https://github.com/hashicorp/terraform-guides/blob/master/infrastructure-as-code/terraform-0.12-examples/first-class-expressions/main.tf) example creates an AWS VPC, a subnet, a network interface, and an EC2 instance. It illustrates the following new features:
2+
This example creates an AWS VPC, a subnet, a network interface, and an EC2 instance. It illustrates the following new features:
33
1. Referencing of Terraform variables and resource arguments without interpolation using [First Class Expressions](https://www.hashicorp.com/blog/terraform-0-12-preview-first-class-expressions). (Note that this blog post refers to "attributes" instead of to "arguments".)
44
1. The need to include `=` when setting the value for arguments of type map or list.
55

infrastructure-as-code/terraform-0.12-examples/for-each-for-resources/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Resources that Use for_each Example
2-
The [For_each for Resources](./for-each-for-resources) example illustrates how the [for_each meta-argument](https://www.terraform.io/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings) can be used instead of the `count` meta-argument to create multiple instances of a resource with different properties based on the contents of a map or set of strings.
1+
# For_each for Resources Example
2+
This example illustrates how the [for_each meta-argument](https://www.terraform.io/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings) can be used instead of the `count` meta-argument to create multiple instances of a resource with different properties based on the contents of a map or set of strings.
33

44
Note that the `for_each` meta-argument for resources was added in Terraform 0.12.6.
55

infrastructure-as-code/terraform-0.12-examples/for-expressions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# For Expressions Example
2-
The [For Expressions](./for-expressions) example illustrates how the new [For Expression](https://www.terraform.io/docs/configuration/expressions.html#for-expressions) can be used to iterate across multiple items in lists. It does this for several outputs, illustrating the usefulness and power of the **for** expression in several ways. We use two tf files in this example:
2+
This example illustrates how the new [For Expression](https://www.terraform.io/docs/configuration/expressions.html#for-expressions) can be used to iterate across multiple items in lists. It does this for several outputs, illustrating the usefulness and power of the **for** expression in several ways. We use two tf files in this example:
33
1. main.tf creates a VPC, subnet, and 3 EC2 instances and then generates outputs related to the DNS and IP addresses of the EC2 instances.
44
1. lists-and-maps-with-for.tf shows how the **for** expression can be used inside lists and maps.
55

infrastructure-as-code/terraform-0.12-examples/new-template-syntax/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# New Template Syntax
2-
The [New Template Syntax](./new-template-syntax) example illustrates how the new [Template Syntax](https://www.hashicorp.com/blog/terraform-0-12-template-syntax) can be used to support **if** conditionals and **for** expressions inside `%{}` template strings which are also referred to as directives.
1+
# New Template Syntax Example
2+
This example illustrates how the new [Template Syntax](https://www.hashicorp.com/blog/terraform-0-12-template-syntax) can be used to support **if** conditionals and **for** expressions inside `%{}` template strings which are also referred to as directives.
33

44
The new template syntax can be used inside Terraform code just like the older `${}` interpolations. It can also be used inside template files loaded with the template_file data source provided that you use version 2.0 or higher of the Template Provider.
55

infrastructure-as-code/terraform-0.12-examples/reliable-json-syntax/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Reliable JSON Syntax
2-
The [Reliable JSON Syntax](./reliable-json-syntax) example illustrates how the new [Reliable JSON Syntax](https://www.hashicorp.com/blog/terraform-0-12-reliable-json-syntax) makes life easier for customers using Terraform JSON files instead of HCL files.
1+
# Reliable JSON Syntax Example
2+
This example illustrates how the new [Reliable JSON Syntax](https://www.hashicorp.com/blog/terraform-0-12-reliable-json-syntax) makes life easier for customers using Terraform JSON files instead of HCL files.
33

44
As you work through this example, you will need to change the extensions of the files so that only one has the `tf.json` extension at any time. Be sure to change the extension to "tf.json" rather than to "tf".
55

infrastructure-as-code/terraform-0.12-examples/rich-value-types/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Rich Value Types
2-
The [Rich Value Types](./rich-value-types) example illustrates how the new [Rich Value Types](https://www.hashicorp.com/blog/terraform-0-12-rich-value-types) can be passed into and out of a module. It also shows that entire resources can be returned as outputs of a module. In fact, you can even return an entire module as an output of the root module.
1+
# Rich Value Types Example
2+
This example illustrates how the new [Rich Value Types](https://www.hashicorp.com/blog/terraform-0-12-rich-value-types) can be passed into and out of a module. It also shows that entire resources can be returned as outputs of a module. In fact, you can even return an entire module as an output of the root module.
33

44
The top-level main.tf file passes a single map with 4 strings into a module after defining the map as a local value:
55
```

0 commit comments

Comments
 (0)