Skip to content

Commit

Permalink
Prevent the private key from being stored in the state file.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed May 28, 2019
1 parent 9747b7b commit 37fa983
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data_source_ssh_tunnel.go
Expand Up @@ -121,6 +121,8 @@ func dataSourceSSHTunnelRead(d *schema.ResourceData, meta interface{}) error {
panic(err)
}
sshConf.Auth = append(sshConf.Auth, pubKeyAuth)
// prevent the clear text key from being stored in the state file
d.Set("private_key", "REDACTED")
}

if sshAgent {
Expand Down

0 comments on commit 37fa983

Please sign in to comment.