Skip to content

Commit

Permalink
chore: add CodeTabs component (#3443)
Browse files Browse the repository at this point in the history
Closes #3438
  • Loading branch information
DanielMSchmidt authored Jan 19, 2024
1 parent 7840fd6 commit f311d86
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/docs/cdktf/concepts/iterators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ The following example validates an ACM certificate through DNS validation:
<!-- #NEXT_CODE_BLOCK_SOURCE:csharp examples/csharp/documentation#iterators-complex-lists -->
<!-- #NEXT_CODE_BLOCK_SOURCE:go examples/go/documentation#iterators-complex-lists -->
<CodeTabs>
```ts
const cert = new AcmCertificate(this, "cert", {
domainName: "example.com",
Expand Down Expand Up @@ -477,6 +480,9 @@ acmcertificatevalidation.NewAcmCertificateValidation(stack, jsii.String("validat
})
```
</CodeTabs>
## Using Iterators for List Attributes
You can also use iterators to create a list of objects based on each item in a list and assign the result as a value to a property of a resource. This is equivalent to using `Array.map` in TypeScript and using [dynamic blocks](/terraform/language/expressions/dynamic-blocks) in a Terraform HCL configuration.
Expand Down

0 comments on commit f311d86

Please sign in to comment.