Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add CodeTabs component #3443

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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