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

Add devcontainer and debugging launch task #6195

Closed

Conversation

lawrencegripper
Copy link
Contributor

I wanted to share this as I've recently switched to using VSCode with Devcontainers as my local development environment and think it would be useful to others.

If this is something that could be useful and merged let me know and I can add a section into docs on how to use.

What does this PR do?

If you have VSCode, Docker and VSCode devcontainers installed this PR allows you to simple clone, "reopen in container" and press F5 to start interactively debugging a test or coding a new resource.

The golang env and tooling required to run, debug and test the provider are installed and tracked in the Dockerfile so users don't have to mess around getting an environment setup.

@ghost ghost added the size/M label Mar 20, 2020
@stuartleeks
Copy link
Contributor

This would be amazing to have!

@paultyng
Copy link
Contributor

@lawrencegripper I agree we should have common debug setups in the repo, unfortunately the SDK is introducing a new test driver that changes the way debug will need to work. With the binary test driver the provider code is not what the debugger will attach to in this setup, the code will be executing an external Terraform binary to call the provider and we haven't fully worked out exactly how to attach delve, etc, but its one of our last remaining tasks for v2.

In addition, we plan to create common VSCode/Goland debug setups with the new driver and making sure this is still an option. I'll give the team a pointer to this PR to possibly add devcontainers when we do VSCode.

(Personally this is very interesting, I'm on Win10/WSL2 as my primary, so curious if the container model would simplify it).

@lawrencegripper
Copy link
Contributor Author

lawrencegripper commented Mar 23, 2020

@paultyng thanks for getting back to me on this one. Shall I leave this one open for the time being or best to close off and revisit when new test driver is setup?

@paultyng
Copy link
Contributor

Lets revisit once the new driver is setup, not much actionable here. I don't see a tracking issue for the new testing framework yet, but a PR should be coming this week or next to all the official providers who aren't using it yet.

@paultyng paultyng closed this Mar 23, 2020
@ghost
Copy link

ghost commented Apr 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants