Skip to content

Commit

Permalink
Move the code for the meta key out.. not sure if it is still needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed May 30, 2019
1 parent 20f8610 commit 1aba225
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data_source_ssh_tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func dataSourceSSHTunnelRead(d *schema.ResourceData, meta interface{}) error {
privateKey := d.Get("private_key").(string)
localAddress := d.Get("local_address").(string)
remoteAddress := d.Get("remote_address").(string)
tunnelEstablished := d.Get("tunnel_established").(bool)
sshAgent := d.Get("ssh_agent").(bool)
// default to port 22 if not specified
if !strings.Contains(host, ":") {
Expand All @@ -111,9 +110,11 @@ func dataSourceSSHTunnelRead(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] host: %v", host)
log.Printf("[DEBUG] localAddress: %v", localAddress)
log.Printf("[DEBUG] remoteAddress: %v", remoteAddress)
log.Printf("[DEBUG] tunnelEstablished: %v", tunnelEstablished)
log.Printf("[DEBUG] sshAgent: %v", sshAgent)

tunnelEstablished := d.Get("tunnel_established").(bool)
log.Printf("[DEBUG] tunnelEstablished: %v", tunnelEstablished)

if tunnelEstablished == false {
d.Set("tunnel_established", true)

Expand Down

0 comments on commit 1aba225

Please sign in to comment.