Apply suggestions from code review
This commit is contained in:
parent
b838a93023
commit
bd64d07e6b
|
@ -202,9 +202,9 @@ resource "aws_subnet" "example" {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `network_subnets` block in the example above creates one subnet instance per combination of network and subnet elements in the input variables. So for this example input:
|
The `network_subnets` list in the example above creates one subnet instance per combination of network and subnet elements in the input variables. So for this example input:
|
||||||
|
|
||||||
``` hcl
|
```hcl
|
||||||
networks = {
|
networks = {
|
||||||
a = {
|
a = {
|
||||||
base_cidr_block = "10.1.0.0/16"
|
base_cidr_block = "10.1.0.0/16"
|
||||||
|
@ -226,57 +226,58 @@ subnets = {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `nework_subnets` block output would look similar to the following:
|
The `nework_subnets` output would look similar to the following:
|
||||||
|
|
||||||
``` hcl
|
```hcl
|
||||||
{
|
[
|
||||||
|
{
|
||||||
"cidr_block" = "10.1.16.0/20"
|
"cidr_block" = "10.1.16.0/20"
|
||||||
"network_id" = "vpc-0bfb00ca6173ea5aa"
|
"network_id" = "vpc-0bfb00ca6173ea5aa"
|
||||||
"network_key" = "a"
|
"network_key" = "a"
|
||||||
"subnet_key" = "a"
|
"subnet_key" = "a"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cidr_block" = "10.1.32.0/20"
|
"cidr_block" = "10.1.32.0/20"
|
||||||
"network_id" = "vpc-0bfb00ca6173ea5aa"
|
"network_id" = "vpc-0bfb00ca6173ea5aa"
|
||||||
"network_key" = "a"
|
"network_key" = "a"
|
||||||
"subnet_key" = "b"
|
"subnet_key" = "b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cidr_block" = "10.1.48.0/20"
|
"cidr_block" = "10.1.48.0/20"
|
||||||
"network_id" = "vpc-0bfb00ca6173ea5aa"
|
"network_id" = "vpc-0bfb00ca6173ea5aa"
|
||||||
"network_key" = "a"
|
"network_key" = "a"
|
||||||
"subnet_key" = "c"
|
"subnet_key" = "c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cidr_block" = "10.2.16.0/20"
|
"cidr_block" = "10.2.16.0/20"
|
||||||
"network_id" = "vpc-0d193e011f6211a7d"
|
"network_id" = "vpc-0d193e011f6211a7d"
|
||||||
"network_key" = "b"
|
"network_key" = "b"
|
||||||
"subnet_key" = "a"
|
"subnet_key" = "a"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cidr_block" = "10.2.32.0/20"
|
"cidr_block" = "10.2.32.0/20"
|
||||||
"network_id" = "vpc-0d193e011f6211a7d"
|
"network_id" = "vpc-0d193e011f6211a7d"
|
||||||
"network_key" = "b"
|
"network_key" = "b"
|
||||||
"subnet_key" = "b"
|
"subnet_key" = "b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cidr_block" = "10.2.48.0/20"
|
"cidr_block" = "10.2.48.0/20"
|
||||||
"network_id" = "vpc-0d193e011f6211a7d"
|
"network_id" = "vpc-0d193e011f6211a7d"
|
||||||
"network_key" = "b"
|
"network_key" = "b"
|
||||||
"subnet_key" = "c"
|
"subnet_key" = "c"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Related Functions
|
## Related Functions
|
||||||
|
|
||||||
* [`contains`](./contains.html) tests whether a given list or set contains
|
- [`contains`](./contains.html) tests whether a given list or set contains
|
||||||
a given element value.
|
a given element value.
|
||||||
* [`flatten`](./flatten.html) is useful for flattening hierarchical data
|
- [`flatten`](./flatten.html) is useful for flattening hierarchical data
|
||||||
into a single list, for situations where the relationships between two
|
into a single list, for situations where the relationships between two
|
||||||
object types are defined explicitly.
|
object types are defined explicitly.
|
||||||
* [`setintersection`](./setintersection.html) computes the _intersection_ of
|
- [`setintersection`](./setintersection.html) computes the _intersection_ of
|
||||||
multiple sets.
|
multiple sets.
|
||||||
* [`setsubtract`](./setsubtract.html) computes the _relative complement_ of two sets
|
- [`setsubtract`](./setsubtract.html) computes the _relative complement_ of two sets
|
||||||
* [`setunion`](./setunion.html) computes the _union_ of multiple
|
- [`setunion`](./setunion.html) computes the _union_ of multiple
|
||||||
sets.
|
sets.
|
||||||
|
|
Loading…
Reference in New Issue