crossplane / upjet

A code generation framework and runtime for Crossplane providers
Apache License 2.0
303 stars 87 forks source link

Ignore `for_each` blocks coming from the Terraform Provider documentation #276

Open marcoths opened 1 year ago

marcoths commented 1 year ago

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. These blocks end up being parsed in the examples-generated directory of the resulting Crossplane Provider - Example in provider-aws

How could Upjet help solve your problem?

When parsing 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

displague commented 11 months ago

It would be helpful to be able to skip or ignore any particular example based on resource, filename, or example number in order to get around paved interpretation problems: https://github.com/crossplane-contrib/provider-jet-equinix/issues/29#issuecomment-1742156459