Closed ruanbekker closed 1 day ago
@ruanbekker sorry for the delayed response. Yes, it is possible to run multiple tunnels. The way to do so is to use multiple instances of the provider.
provider "awsssmtunnels" {
region = "us-east-2"
shared_config_files = [var.tfc_aws_dynamic_credentials.default.shared_config_file]
target = "i-...."
}
provider "awsssmtunnels" {
alias = "rds"
region = "us-east-2"
shared_config_files = [var.tfc_aws_dynamic_credentials.default.shared_config_file]
target = "i-...."
}
resource "awsssmtunnels_remote_tunnel" "eks" {
refresh_id = "one"
remote_host = ...
remote_port = ...
local_port = ...
}
resource "awsssmtunnels_remote_tunnel" "rds" {
provider = awsssmtunnels.rds
refresh_id = "two"
remote_host = ...
remote_port = ...
local_port = ...
}
Note, you can use the same target
for both instances of the provider (if it happens to be a common bastion for the multiple tunnels).
Closing issue as using multiple instances of the provider achieves the goal.
Hi,
Great project.
I would like to know if its possible to run multiple tunnels at the same time?
Currently I have an active tunnel for RDS:
And that works fine.
As soon as I add an additional tunnel, eg. elasticache:
The connection breaks for the rds tunnel: