-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add aws custom configuration support for local testing (i.e: localstack use) #495
base: main
Are you sure you want to change the base?
Add aws custom configuration support for local testing (i.e: localstack use) #495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
901bf9e
to
bd55bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates! I suggested a few more changes. One other important thing: we need to add an automated test of some kind for this behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay; I was on vacation. Left a few more thoughts.
a347f4e
to
ae936ee
Compare
…ools like localstack
…e: localstack use) or use the default one
…e localstack or other local tool. The new approach to avoid any concurrency issues is just apply custom endpoint resolver to use local url service
Co-Authored-By: Yevgeniy Brikman <[email protected]>
Sorry folks, we are unusually busy right now, and doing our best to work through the backlog of issues/PRs. We'll get to this as soon as we can. |
Been over two months now since last update. I'm hoping to open source some code for terratest & localstack soon and I'd really like to avoid requiring people to pin a custom fork for terratest in their |
So one thing that this PR does not support is running multiple localstack containers for testing in parallel. This is because the variables storing the AWS Endpoints are global. Ideally this would not be the case, but TBH this is better than nothing. That said, I'm not sure adding this is supported without massive changes to terratest. |
Ugh, this PR has been open for 18 months and now has a merge conflict because of that. Right now I have code I'd like to open source which depends on this being merged, but it just doesn't make sense to release it if I have to maintain a fork. @brikis98 How can I help move this forward? Or is this PR/solution dead in the water? |
This looks awesome - would also love to see this getting merged. 👍 Anything we can do to help push this forward? @ffernandezcast @brikis98 Thanks! 🙏 |
I did a quick update. Maybe could you test it to verify if keep backward compatibility. @whummer |
I did a quick update. Maybe could you test it to verify if keep backward compatibility. @synfinatic |
@ffernandezcast : Yep, all my unit tests pass with your latest PR. |
Would be nice to get this merged. Any reason it is sitting for so long? |
Are there any updates on this PR? Will this PR be merged at all? |
It would be great to have this merged! https://github.com/spulec/moto is another use case for this feature |
why is this not yet merged? how people test with localstack? |
Hey folks, my apologies for the continued delay here. There are two things at play here:
|
@brikis98 Well, it's been 18mo since I started following this PR and honestly I no longer care at this point. I've killed my project which was dependent on this PR and moved on to other projects. |
Hi @brikis98 , thanks for the detailed response!
That's a great point - in fact, the list of services would need to be adjusted to cover the latest additions to LocalStack. The endpoint URL is the same for all services (port 4566 by default), so we can parameterize the list of services, then generate the
Thanks for the pointer - that would be quite useful indeed!
That's great, glad to hear that! And yes, very much understandable that you need to pick your battles. I'll see if I or someone from the LocalStack team can help address the points you've raised, so we can jointly work on getting this over the line. Thanks for your help! @ffernandezcast Would you be ok if we work on this PR collaboratively, could you please give me push access to your fork/branch? (Alternatively, I could branch off your PR, and make sure that your original authorship is retained..) Thanks! |
@ ffernandezcast Thank you for this, I've had to fork this repo and apply your patch. Works perfectly, too bad GruntWork hasn't addressed this in the 2+ years now |
@brikis98 , there are two different things we are talking about
First point is not even an issue currently as this can be easily handled from the PR is targeting point 2 where we are unable to use the Regarding your comment on time crunch, I can fully understand and that is why there is a community to help. When @ffernandezcast has spent considerable time on PR and even you have spent time reviewing it, I don't understand where its stuck? Reviewer's team has to spend time reviewing it, which is already being done. This PR is fulfilling the purpose it was open for. It is not meant to do a full-fledge support for LocalStack as such. Cos this implementation can support |
I have it working flawlessly in my own fork, it is a pity as I opened an MR but they wanted way too much from me to merge it. I'll continue to use my fork and maybe open it up to everyone else so the community can provide input If you're interested, it's an easy fix with: |
It seems like there is still active development to make terratest work well with localstack. See gruntwork-io/terratest#495
Issues related:
Assert failing if you are using local configuration for testing (i.e: localstack locally) #494
No valid credential sources found for AWS Provider when running terratest in github actions #453
The goal is be able to use Terratest assert like AssertS3BucketExists without receive credentials issues because is trying to use aws cloud and not localstack terraform provider config
i.e:
include in your test something like:
Global test config file
Inside Global Setup Tests Suite File