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

Support for multiple virtual networks #102

Open
martinhausio opened this issue Sep 24, 2024 · 3 comments
Open

Support for multiple virtual networks #102

martinhausio opened this issue Sep 24, 2024 · 3 comments

Comments

@martinhausio
Copy link

Hi, we have multiple virtual networks in our setup and would like to be able to choose which one the action will connect to.

the warp-cli supports this by configuring the vnet parameter, passing it the vnet ID prior to connecting

example:

warp-cli vnet abcd1234-12ab-34bc-1234-a12344321a

warp-cli connect

@F21
Copy link
Member

F21 commented Sep 24, 2024

Would you be happy to open a PR to implement this?

I think we can add it as a with parameter in the action's configuration:

uses: Boostport/setup-cloudflare-warp@v1
with:
  organization: your-organization
  auth_client_id: ${{ secrets.CLOUDFLARE_AUTH_CLIENT_ID }}
  auth_client_secret: ${{ secrets.CLOUDFLARE_AUTH_CLIENT_SECRET }}
  vnet: ${{ secrets.CLOUDFLARE_VNET }}

@giriparus
Copy link

I can pick this up soon, over this or the next weekend. I was also thinking of adding another parameter "profile" in case you have different profiles to differentiate between the split tunnels they use as well.

@bruce-szalwinski-he
Copy link

we put a wrapper around setup-cloudflare-warp that takes an additional parameter for the virtual network. We call the base action and then shell out to command line to switch to the selected virtual network, if supplied. It works mostly, but we have to do some shenanigans to force the route table to include the CloudflareWarp entries.

That is, after we run setup-cloudflare-warp and switch to selected vnet, ip route show table all does not include the CloudFlare warp entries. We sit in a loop and try to connect to an RDS inside the VPC (the shenanigans). It eventually succeeds. Then running ip route show table all now shows CloudflareWarp entries.

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

No branches or pull requests

4 participants