@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
147 lines (146 loc) • 4.58 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The SSH public key information associated with a Google account.
*
* To get more information about SSHPublicKey, see:
*
* * [API documentation](https://cloud.google.com/compute/docs/oslogin/rest/v1/users.sshPublicKeys)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/compute/docs/oslogin)
*
* ## Example Usage
*
* ### Os Login Ssh Key Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as std from "@pulumi/std";
*
* const me = gcp.organizations.getClientOpenIdUserInfo({});
* const cache = new gcp.oslogin.SshPublicKey("cache", {
* user: me.then(me => me.email),
* key: std.file({
* input: "path/to/id_rsa.pub",
* }).then(invoke => invoke.result),
* });
* ```
*
* ## Import
*
* SSHPublicKey can be imported using any of these accepted formats:
*
* * `users/{{user}}/sshPublicKeys/{{fingerprint}}`
*
* * `{{user}}/{{fingerprint}}`
*
* When using the `pulumi import` command, SSHPublicKey can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:oslogin/sshPublicKey:SshPublicKey default users/{{user}}/sshPublicKeys/{{fingerprint}}
* ```
*
* ```sh
* $ pulumi import gcp:oslogin/sshPublicKey:SshPublicKey default {{user}}/{{fingerprint}}
* ```
*/
export declare class SshPublicKey extends pulumi.CustomResource {
/**
* Get an existing SshPublicKey resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SshPublicKeyState, opts?: pulumi.CustomResourceOptions): SshPublicKey;
/**
* Returns true if the given object is an instance of SshPublicKey. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is SshPublicKey;
/**
* An expiration time in microseconds since epoch.
*/
readonly expirationTimeUsec: pulumi.Output<string | undefined>;
/**
* The SHA-256 fingerprint of the SSH public key.
*/
readonly fingerprint: pulumi.Output<string>;
/**
* Public key text in SSH format, defined by RFC4253 section 6.6.
*/
readonly key: pulumi.Output<string>;
/**
* The project ID of the Google Cloud Platform project.
*/
readonly project: pulumi.Output<string | undefined>;
/**
* The user email.
*
*
* - - -
*/
readonly user: pulumi.Output<string>;
/**
* 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);
}
/**
* Input properties used for looking up and filtering SshPublicKey resources.
*/
export interface SshPublicKeyState {
/**
* An expiration time in microseconds since epoch.
*/
expirationTimeUsec?: pulumi.Input<string>;
/**
* The SHA-256 fingerprint of the SSH public key.
*/
fingerprint?: pulumi.Input<string>;
/**
* Public key text in SSH format, defined by RFC4253 section 6.6.
*/
key?: pulumi.Input<string>;
/**
* The project ID of the Google Cloud Platform project.
*/
project?: pulumi.Input<string>;
/**
* The user email.
*
*
* - - -
*/
user?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SshPublicKey resource.
*/
export interface SshPublicKeyArgs {
/**
* An expiration time in microseconds since epoch.
*/
expirationTimeUsec?: pulumi.Input<string>;
/**
* Public key text in SSH format, defined by RFC4253 section 6.6.
*/
key: pulumi.Input<string>;
/**
* The project ID of the Google Cloud Platform project.
*/
project?: pulumi.Input<string>;
/**
* The user email.
*
*
* - - -
*/
user: pulumi.Input<string>;
}