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

Handle pulumi.Output recursively when translating CDK properties to Pulumi #228

Merged
merged 7 commits into from
Nov 19, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Nov 18, 2024

pulumi.Output values seem to be able to reach the normalize step of translating properties from a CDK notation to a Pulumi notation and making sure the casing is right. This may be happening in particular because CF intrinsic evaluator may emit Output values. With the fix, the normalize step can deeply recur into these eventual values and make sure that the property casing is correctly handled regardless of whether a value is an eventual or not.

This seems to resolve an issue I have been running into when testing a Kinesis Stream.

src/interop.ts Outdated Show resolved Hide resolved
if (Array.isArray(value)) {
const result: any[] = [];
for (let i = 0; i < value.length; i++) {
result[i] = normalize(value[i], cfnType);
result[i] = normalize(value[i], cfnType, pulumiProvider);
Copy link
Member Author

Choose a reason for hiding this comment

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

Should keep recurring with provider set, right? Sounds like a slightly unrelated bug fix.

@t0yv0 t0yv0 changed the title Use lift in normalize Handle pulumi.Output recursively when translating CDK properties to Pulumi Nov 18, 2024
@t0yv0 t0yv0 marked this pull request as ready for review November 18, 2024 21:22
@t0yv0
Copy link
Member Author

t0yv0 commented Nov 18, 2024

Iterating on the integration failure, it is rather interesting.

@t0yv0 t0yv0 force-pushed the t0yv0/normalize-outputs-bug branch from 9e27f4f to 077d267 Compare November 18, 2024 23:04
@t0yv0 t0yv0 requested a review from corymhall November 18, 2024 23:54
@t0yv0 t0yv0 merged commit be3a4f2 into main Nov 19, 2024
13 checks passed
@t0yv0 t0yv0 deleted the t0yv0/normalize-outputs-bug branch November 19, 2024 14:14
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v1.0.0.

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.

3 participants