Proposal: port forwarding via SSH tunnel
proposal: port forwarding via SSH tunnel I'd like to start adding port forwarding via SSH tunnels to terraform. This is useful when you want to use terraform with systems which are only accessible via a jump host, ie. company internal systems. Right now terraform already ships with a bunch of providers which might need to talk to internal systems (e.g. postgres/ mysql/ influxdb/…). The status quo is to create a SSH tunnel beforehand, or, in cases where the entire infrastructure is created from scratch, to be split terraform scripts into multiple stages with glue code outside. E.g. one might setup a private cluster with a jump host, open an SSH tunnel via bash, and then run a differen terraform script using the newly created tunnel to access private systems, all wrapped in a single `setup.sh` script. Assuming that the SSH tunnel is required for all resources of a given provider, I suggest adding connection settings to the terraform providers as well, like this: ``` provider "consul" { address = "localhost:80" datacenter = "nyc1" # run "ssh -L localhost:80:demo.consul.io:80" for any resources of this provider connection { user = "private-user" host = "private.jump-host.io" forward { remote_host = "demo.consul.io" remote_port = 80 local_port = 80 } } } # Access a key in Consul; consul is only available via SSH tunnel resource "consul_keys" "app" { key { name = "ami"
Posted by nicolai86 on Aug 22, 2016, 7:08 AM
Tags
Related issues
- Qt is fully of bugs on Wayland, some of which are unfixable because the API makes guarantees that are impossible to uphold.
- I took the plunge into GrapheneOS a week ago.
- [FEATURE] Multi-device Cowork: Allow concurrent Cowork agents on multiple machines under a single account
- [BUG] Claude Desktop spawns 1.8 GB Hyper-V VM on every launch, even for chat-only use
- Those cheap Bluetooth Tesla coils on AliExpress use A2DP audio as their control signal - a comparator converts the audio into spark pulses.
- [Prisma 7.0.0] TypeScript TS2742 errors with pnpm monorepo - cannot resolve @prisma/client-runtime-utils types
Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments
onboarding (SaaS)
Qt is fully of bugs on Wayland, some of which are unfixable because the API makes guarantees that are impossible to uphold.
I took the plunge into GrapheneOS a week ago.
[FEATURE] Multi-device Cowork: Allow concurrent Cowork agents on multiple machines under a single account
[BUG] Claude Desktop spawns 1.8 GB Hyper-V VM on every launch, even for chat-only use
Those cheap Bluetooth Tesla coils on AliExpress use A2DP audio as their control signal - a comparator converts the audio into spark pulses.
[Prisma 7.0.0] TypeScript TS2742 errors with pnpm monorepo - cannot resolve @prisma/client-runtime-utils types
I built a routine management app for my kids (7 and 10) called "Oh Yah!" after their constant "Oh yah!
> If it is open source, then I can build and install it myself.
Proposal: port forwarding via SSH tunnel
proposal: port forwarding via SSH tunnel I'd like to start adding port forwarding via SSH tunnels to terraform. This is useful when you want to use terraform with systems which are only accessible via a jump host, ie. company internal systems. Right now terraform already ships with a bunch of providers which might need to talk to internal systems (e.g. postgres/ mysql/ influxdb/…). The status quo is to create a SSH tunnel beforehand, or, in cases where the entire infrastructure is created from scratch, to be split terraform scripts into multiple stages with glue code outside. E.g. one might setup a private cluster with a jump host, open an SSH tunnel via bash, and then run a differen terraform script using the newly created tunnel to access private systems, all wrapped in a single `setup.sh` script. Assuming that the SSH tunnel is required for all resources of a given provider, I suggest adding connection settings to the terraform providers as well, like this: ``` provider "consul" { address = "localhost:80" datacenter = "nyc1" # run "ssh -L localhost:80:demo.consul.io:80" for any resources of this provider connection { user = "private-user" host = "private.jump-host.io" forward { remote_host = "demo.consul.io" remote_port = 80 local_port = 80 } } } # Access a key in Consul; consul is only available via SSH tunnel resource "consul_keys" "app" { key { name = "ami"
Comments (0)
No comments yet. Start the discussion.