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

PATCH 0044-Allow-creating-lambdas-without-code-related-properti.patch #3724

Open
t0yv0 opened this issue Mar 25, 2024 · 4 comments
Open

PATCH 0044-Allow-creating-lambdas-without-code-related-properti.patch #3724

t0yv0 opened this issue Mar 25, 2024 · 4 comments
Labels
area/patch An issue describing an existing patch on upstream and the criteria to close it. kind/engineering Work that is not visible to an external user

Comments

@t0yv0
Copy link
Member

t0yv0 commented Mar 25, 2024

Reverts a bridge bug temporarily.

@t0yv0 t0yv0 added the area/patch An issue describing an existing patch on upstream and the criteria to close it. label Mar 25, 2024
@mjeffryes mjeffryes added the kind/engineering Work that is not visible to an external user label Mar 26, 2024
@t0yv0
Copy link
Member Author

t0yv0 commented May 20, 2024

Per #3959 this creates friction in routine upstrem upgrades. Digging up some more information here.

@t0yv0
Copy link
Member Author

t0yv0 commented May 20, 2024

This has the back-history here: #3420

When importing lambdas, we run afoul of ExactlyOneOf due to a bridge issue, so the patch replaces that with ConflictsWith.

@t0yv0
Copy link
Member Author

t0yv0 commented May 20, 2024

It looks really like a good example of pulumi/pulumi-terraform-bridge#1949

This is harder to automatically fix in the bridge.. It is indeed something that needs lambda-specific thought. We cannot plausibly manufacture a value here:

│ Error: Invalid combination of arguments
│
│   with aws_lambda_function.test_lambda,
│   on generated.tf line 4:
│   (source code not available)
│
│ "filename": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│
│   with aws_lambda_function.test_lambda,
│   on generated.tf line 7:
│   (source code not available)
│
│ "image_uri": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│
│   with aws_lambda_function.test_lambda,
│   on generated.tf line 16:
│   (source code not available)
│
│ "s3_bucket": one of `filename,image_uri,s3_bucket` must be specified

I think once we figure out a good answer to #3376 we can also revisit this patch.

@VenelinMartinov
Copy link
Contributor

Two regression tests which are relevant here: TestSourceCodeHashImportedLambdaChecksCleanly and TestUpdateImportedLambda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/patch An issue describing an existing patch on upstream and the criteria to close it. kind/engineering Work that is not visible to an external user
Projects
None yet
Development

No branches or pull requests

3 participants