Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

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

Merged
mutahhir merged 2 commits intomainfrom
fix/3630
May 23, 2025
Merged

fix: #3630 Slightly improve HCL rendering for skipped attributes#3878
mutahhir merged 2 commits intomainfrom
fix/3630

Conversation

@mutahhir
Copy link
Copy Markdown
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 DanielMSchmidt and ansgarm and removed request for a team May 22, 2025 10:52
Comment thread packages/cdktf/lib/hcl/render.ts Outdated
@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
@mutahhir mutahhir mentioned this pull request Jun 2, 2025
@github-actions
Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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