hallowed-printer-89159
11/10/2022, 4:43 PMconst sshKey = new SshPublicKey('test', {
expirationTimeUsec: '250000',
key: '',
project: 'example',
user: '<mailto:----@univision.net|----@univision.net>',
});
The types for SshPublicKey is but the Args are not enough clear and I got Error creating SSHPublicKey: googleapi: Error 400: SSH key is expired.
/**
* Create a SshPublicKey resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SshPublicKeyArgs, opts?: pulumi.CustomResourceOptions);
billowy-army-68599
11/10/2022, 4:51 PMhallowed-printer-89159
11/10/2022, 4:51 PMbillowy-army-68599
11/10/2022, 4:57 PMconst sshKey = new tls.PrivateKey("bastion", {
algorithm: "RSA",
})
const sshKey = new SshPublicKey('test', {
expirationTimeUsec: '250000',
key: sshKey.publicKeyOpenssh,
project: 'example',
user: '<mailto:----@univision.net|----@univision.net>',
});
hallowed-printer-89159
11/10/2022, 4:59 PMbillowy-army-68599
11/10/2022, 5:22 PM// Create a GCP resource (Storage Bucket)
const sshKey = new tls.PrivateKey("example",{
algorithm: "RSA",
})
const gcloudKey = new gcp.oslogin.SshPublicKey("example",{
key: sshKey.publicKeyOpenssh,
user: "<mailto:lbriggs@pulumi.com|lbriggs@pulumi.com>",
})
hallowed-printer-89159
11/10/2022, 5:29 PMbillowy-army-68599
11/10/2022, 5:32 PMexport const privateKey = sshKey.privateKeyOpenssh
Then run pulumi up
Then run pulumi stack outputs --show-secrets
hallowed-printer-89159
11/10/2022, 5:33 PMmetadata: {
'enable-oslogin': "true",
'ssh-keys': '<mailto:----@univision.net|----@univision.net>' +":"+ sshKey.key
},
Got the following error: Calling [toString] on an [Output<T>] is not supported.billowy-army-68599
11/10/2022, 6:45 PMapply
hallowed-printer-89159
11/10/2022, 6:49 PMmetadata: {
'enable-oslogin': "true",
'ssh-keys': '<mailto:----@univision.net|----@univision.net>' +":"+ sshKey.key.apply(v => v.toString())
},
billowy-army-68599
11/10/2022, 6:52 PM'ssh-keys': pulumi.interpolate`--- +":" ssh.key
hallowed-printer-89159
11/10/2022, 6:58 PM