crossplane / crossplane/upjet

Ignore `for_each` blocks coming from the Terraform Provider documentation

Open
#276 1 comment 0 reactions 0 assignees View on GitHub
docgen enhancement is:triaged v2
Dominant language
Go
Stars
481
Forks
131
Avg merge
2d 1h
Merged PRs (30d)
11

Description

### What problem are you facing?

Some resources in the Terraform docs have a `for_each` block in the Example Usage - For example [aws_autoscaling_group_tag](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group_tag#example-usage). These blocks end up being parsed in the `examples-generated` directory of the resulting Crossplane Provider - [Example in provider-aws](https://github.com/upbound/provider-aws/blob/0f0d7a43d9d3b4919fb0f708f3a4794081dfbdd8/examples-generated/autoscaling/grouptag.yaml#L14)

### How could Upjet help solve your problem?

When parsing [provider-metadata.yaml](https://github.com/upbound/provider-aws/blob/v0.40.0/config/provider-metadata.yaml) (Example from line 8023), it would be useful to skip the `for_each` keys from the `examples.manifest` block so that they don't end up as YAML examples

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.