Skip to content

fix: #3630 Slightly improve HCL rendering for skipped attributes #3878

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

Merged
merged 2 commits into from
May 23, 2025

Conversation

mutahhir
Copy link
Member

Related issue

Fixes #3630 (Partially)

Description

This is a side-effect of our effort to reduce provider size from blowing up. We use a skip list to ignore a very small number of attributes that are known to bloat the size of the provider significantly.

This doesn't cause a problem for our JSON synthesis, since it doesn't care too much about types, but the HCL synthesis is more sensitive.

This commit, while not fixing the problem, will do two things. First, it tries its best to output the attribute contents, and secondly, lets the user know this is a problem and one that they might want to fix either manually, or just use JSON output

It is important to note that this does not solve the issue completely, as the HCL output will probably not be usable directly without modification, but this is a best effort solution that leaves the developer in a slightly better state with more context. Until we get to a solution where skipping attributes is not needed, this will be the best solution.

Checklist

  • I have updated the PR title to match CDKTF's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

…locks better

This is a side-effect of our effort to reduce provider size from blowing
up. We use a skip list to ignore a very small number of attributes that
are known to bloat the size of the provider significantly.

This doesn't cause a problem for our JSON synthesis, since it doesn't
care too much about types, but the HCL synthesis is more sensitive.

This commit, while not fixing the problem, will do two things. First,
it tries its best to output the attribute contents, and secondly,
lets the user know this is a problem and one that they might want to fix
either manually, or just use JSON output
@mutahhir mutahhir requested a review from a team as a code owner May 22, 2025 10:52
@mutahhir mutahhir requested review from ansgarm and DanielMSchmidt and removed request for a team May 22, 2025 10:52
@mutahhir mutahhir merged commit 9db3043 into main May 23, 2025
432 checks passed
@mutahhir mutahhir deleted the fix/3630 branch May 23, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cdktf: synth --hcl: Generating hcl for Wafv2 web acl is invalid
2 participants