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

Test that map keys don't get renamed #101

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Test that map keys don't get renamed #101

merged 1 commit into from
Feb 6, 2024

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Jan 29, 2024

Fixes #100.

This doesn't fix every rename, there's still cases where we should be leaving keys as is but are renaming them.

value = {
CAPS = aResource.result
camelCase = 1
snakeCase = 2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that these are still being renamed. Fixing this is a bit more involved. If we just flip the logic to assume things are maps not objects then we end up renaming a lot of { k: v} expressions in TF source code which are then used for object values.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is probably fine that output objects are renamed because the type of these becomes are object type from component outputs, not a map.

@Frassle Frassle requested a review from a team January 29, 2024 17:38
@Frassle
Copy link
Member Author

Frassle commented Jan 29, 2024

Actually this probably fixes #53 as well.

@justinvp
Copy link
Member

Sorry, I need to take care of #99

@justinvp
Copy link
Member

justinvp commented Feb 6, 2024

Tests are unblocked and should now pass with #105

@Frassle Frassle merged commit cb75d3b into main Feb 6, 2024
5 checks passed
@Frassle Frassle deleted the fraser/renameMaps branch February 6, 2024 15:57
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.

pulumi convert --from terraform does not preserve casing for keys in HCL maps (like tags)
3 participants