We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Yours is the most reliable SSH tunnel for terraform, but was very sad when I tried to add a second tunnel
terraform { required_version = ">= 1.0.9" required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } ssh = { source = "AndrewChubatiuk/ssh" version = "0.1.5" } mysql = { source = "petoju/mysql" version = "3.0.18" } redshift = { source = "brainly/redshift" version = "1.0.2" } } backend "s3" { ... } } provider "aws" { ... } provider "ssh" {} data "ssh_tunnel" "mysql" { user = var.bastion_username auth { private_key { content = file(pathexpand("~/.ssh/id_rsa")) } } server { host = "---" } remote { host = "rds.${local.env}.local" port = 3306 } } provider "mysql" { endpoint = data.ssh_tunnel.mysql.local.0.address username = "${local.env}_master" password = data.aws_ssm_parameter.cluster_password.value tls = false } data "aws_ssm_parameter" "cluster_password" { name = "---" with_decryption = true } data "ssh_tunnel" "redshift" { user = var.bastion_username auth { private_key { content = file(pathexpand("~/.ssh/id_rsa")) } } server { host = "bastion.---" } local { port = 5439 } remote { host = "redshift.---" port = 5439 } }
Open two tunnels
Fail with rror: rpc: service already defined: SSHTunnelServer
rror: rpc: service already defined: SSHTunnelServer
The text was updated successfully, but these errors were encountered:
Added ability to run multiple tunnels in v0.2.2
Sorry, something went wrong.
No branches or pull requests
Yours is the most reliable SSH tunnel for terraform, but was very sad when I tried to add a second tunnel
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Open two tunnels
Actual Behavior
Fail with
rror: rpc: service already defined: SSHTunnelServer
Steps to Reproduce
The text was updated successfully, but these errors were encountered: