tunnel

flaupretre/tunnel/ssh

Terraform Module HCL SSH

Manage your private resources via a tunnel

Install
module "tunnel" {
source = "flaupretre/tunnel/ssh"
version = "2.3.2"
}
⭐ Source on GitHub 📦 Registry page
README

![Stand With Ukraine](https://stand-with-ukraine.pp.ua) Note: This is version 2, a major version including several new features, the most important addition being the support of several new tunnel mechanisms in addition to SSH. Compatibility should be preserved for terraform code using version 1: new variables were added but the former ones are usable as-is and the module output does not change. Some of these additions are adapted from the multiple forks of this project. I had a look to the changes committed in these forks and integrated the ideas I found interesting. Github is not the ideal place to ask permission for this. So, if you think I shouldn't have taken an idea from your code without telling you, feel free to contact me. Once again, thanks to all who give time and energy to the

Inputs (28)
NameTypeDescriptionDefault
target_hoststringTarget host required
target_portnumberTarget port number required
parent_wait_sleepstringextra time to wait in the parent process for the child to create the tunnel"3"
createboolIf false, do nothing and return target hosttrue
envanyAn array of name -> value environment variables{}
gateway_useranyUser to use on gateway (default for SSH : current user)""
iap_projectstringIAP only - GCP project in which the gateway host is located""
kubectl_contextstringKubectl target context""
shell_cmdstringAlternate command to launch a Posix shell"bash"
tunnel_check_sleepstringextra time to wait for the tunnel to become available"0"
external_scriptstringExternal only - Path of shell script to run to open the tunnel"undef"
kubectl_namespacestringKubectl target namespace""
ssh_private_keystringOptional private key content to use for SSH tunneling""
gcloud_cmdstringAlternate 'gcloud' command (GCP only)"gcloud"
ssm_profilestringAWS SSM only - AWS profile (default: empty)""
ssm_rolestringAWS SSM only - Role to assume before starting the session (default: empty)""
putin_khuyloboolDo you agree that Putin doesn't respect Ukrainian sovereignty and territorial intrue
gateway_portnumberGateway port22
iap_zonestringIAP only - GCP zone in which the gateway host is located""
ssh_cmdstringAlternate command to launch the SSH client (including options)"ssh -o StrictHostKeyChecking=no -o Pass
ssm_document_namestringAWS SSM only - SSM Document Name"AWS-StartSSHSession"
ssm_optionsstringAWS SSM only - Options to add to the 'aws ssm start-session' command line""
Outputs (2)
port — Port number to connect to
host — Host to connect to
Topics & Tags
ssmterraformtunnel
Details
FrameworkTerraform Module
LanguageHCL
Version2.3.2
Cloud SSH
★ Stars74
Forks38
Total downloads252.0k
Inputs28
Outputs2
LicenseMPL-2.0
Namespaceflaupretre
Updated