-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
sam build --hook-name terraform --beta-features command fails when creating nested resources in API Gateway #5639
Comments
Thanks @arvindkurhe for raising this issue, could you please share with us your terraform project to be able to reproduce this issue. |
Also, as a workaround can you check if running |
This issue persist from the sam version 1.83.0 to latest version |
Here are the terraform files, We are referring article "Better together: AWS SAM CLI and HashiCorp Terraform" from the following page, And using the Github repo link provided in the above-mentioned link, We have updated API Gateway implementation with API Gateway REST API as per our needs. |
|
Closed issue by mistake |
I was able to reproduce this issue, we will work on fixing this issue. |
Thanks for the SAM CLI. Do we know when this fix will be released and/or is it possible to build from source? We are blocked by this. |
Patch is released in v1.95.0. Closing |
Hello @mudassir-ahmed, the fix for this problem got released in v1.95.0. Regarding your question to build from source, unfortunately we will not support that for Terraform projects. The reason is SAM CLI depends on running Also, in case of remote backend states, SAM CLI overwrites that to use local states instead, and these types of changes we do not want to do it to the customer's project. Could you please let us know why you are looking for build from source for Terraform project, if it is related to this problem, so the team is working now on a fix for it, that will be shipped soon. |
Thanks @moelasmar . We've just tried version 1.95 and everything is working for us. Regarding the build from source: I meant is it possible to build the SAM CLI from source so we have the latest - however, we don't need to do this anymore since version 1.95 has the fix we're after. Thanks again. |
Hello Sir,
We are having existing terraform code with Lambda functions ready with API Gateway's parent and child resrouces at muli-level.
However when we are running following command getting errors
Command:sam build --hook-name terraform --beta-features
Error: Error: An error occurred when attempting to link two resources: Could not use the value aws_api_gateway_resource.parent._id
as a destination for the source resource module.module_dev.aws_api_gateway_resource.child. The source resource value should refer to valid destination ARN property.
We are attaching terrform code for you in this case.
SAM build command fails when creating/genrating
resource "aws_api_gateway_resource" "child_id_resource"
Awaiting resonse soon as this needs to resolve on priority.
API ID / Invoke URL: d
Region: us-east-1
Please select the type of API Gateway: REST API
The text was updated successfully, but these errors were encountered: