File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if ($splitted_instance.Length -gt 1)
50
50
}
51
51
52
52
Write-Output " Add public key $ssh_public_key_path for $ssh_user at instance $ec2_instance_id for $ssh_public_key_timeout seconds"
53
- $addPublicKeyScript = @"
53
+ $addPublicKeyCommands = @"
54
54
\"
55
55
mkdir -p ~$ssh_user /.ssh && cd ~$ssh_user /.ssh || exit 1
56
56
@@ -67,7 +67,7 @@ aws ssm send-command `
67
67
-- instance- ids " $ec2_instance_id " `
68
68
-- document- name ' AWS-RunShellScript' `
69
69
-- comment " Add an SSH public key to authorized_keys for $ssh_public_key_timeout seconds" `
70
- -- parameters commands= " $addPublicKeyScript "
70
+ -- parameters commands= " $addPublicKeyCommands "
71
71
if ($LASTEXITCODE -ne 0 ) { Write-Error " Failed to add public key with error $output " }
72
72
73
73
Write-Output " Start ssm session to instance $ec2_instance_id "
You can’t perform that action at this time.
0 commit comments