Documentation ¶
Index ¶
- type SshPublicKey
- type SshPublicKeyArgs
- type SshPublicKeyArray
- type SshPublicKeyArrayInput
- type SshPublicKeyArrayOutput
- func (SshPublicKeyArrayOutput) ElementType() reflect.Type
- func (o SshPublicKeyArrayOutput) Index(i pulumi.IntInput) SshPublicKeyOutput
- func (o SshPublicKeyArrayOutput) ToSshPublicKeyArrayOutput() SshPublicKeyArrayOutput
- func (o SshPublicKeyArrayOutput) ToSshPublicKeyArrayOutputWithContext(ctx context.Context) SshPublicKeyArrayOutput
- type SshPublicKeyInput
- type SshPublicKeyMap
- type SshPublicKeyMapInput
- type SshPublicKeyMapOutput
- func (SshPublicKeyMapOutput) ElementType() reflect.Type
- func (o SshPublicKeyMapOutput) MapIndex(k pulumi.StringInput) SshPublicKeyOutput
- func (o SshPublicKeyMapOutput) ToSshPublicKeyMapOutput() SshPublicKeyMapOutput
- func (o SshPublicKeyMapOutput) ToSshPublicKeyMapOutputWithContext(ctx context.Context) SshPublicKeyMapOutput
- type SshPublicKeyOutput
- func (SshPublicKeyOutput) ElementType() reflect.Type
- func (o SshPublicKeyOutput) ExpirationTimeUsec() pulumi.StringPtrOutput
- func (o SshPublicKeyOutput) Fingerprint() pulumi.StringOutput
- func (o SshPublicKeyOutput) Key() pulumi.StringOutput
- func (o SshPublicKeyOutput) Project() pulumi.StringPtrOutput
- func (o SshPublicKeyOutput) ToSshPublicKeyOutput() SshPublicKeyOutput
- func (o SshPublicKeyOutput) ToSshPublicKeyOutputWithContext(ctx context.Context) SshPublicKeyOutput
- func (o SshPublicKeyOutput) User() pulumi.StringOutput
- type SshPublicKeyState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SshPublicKey ¶
type SshPublicKey struct { pulumi.CustomResourceState // An expiration time in microseconds since epoch. ExpirationTimeUsec pulumi.StringPtrOutput `pulumi:"expirationTimeUsec"` // The SHA-256 fingerprint of the SSH public key. Fingerprint pulumi.StringOutput `pulumi:"fingerprint"` // Public key text in SSH format, defined by RFC4253 section 6.6. Key pulumi.StringOutput `pulumi:"key"` // The project ID of the Google Cloud Platform project. Project pulumi.StringPtrOutput `pulumi:"project"` // The user email. // // *** User pulumi.StringOutput `pulumi:"user"` }
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
```go package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations" "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/oslogin" "github.com/pulumi/pulumi-std/sdk/go/std" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { me, err := organizations.GetClientOpenIdUserInfo(ctx, nil, nil) if err != nil { return err } invokeFile, err := std.File(ctx, &std.FileArgs{ Input: "path/to/id_rsa.pub", }, nil) if err != nil { return err } _, err = oslogin.NewSshPublicKey(ctx, "cache", &oslogin.SshPublicKeyArgs{ User: pulumi.String(me.Email), Key: invokeFile.Result, }) if err != nil { return err } return nil }) }
```
## 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}} ```
func GetSshPublicKey ¶
func GetSshPublicKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SshPublicKeyState, opts ...pulumi.ResourceOption) (*SshPublicKey, error)
GetSshPublicKey gets an existing SshPublicKey resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewSshPublicKey ¶
func NewSshPublicKey(ctx *pulumi.Context, name string, args *SshPublicKeyArgs, opts ...pulumi.ResourceOption) (*SshPublicKey, error)
NewSshPublicKey registers a new resource with the given unique name, arguments, and options.
func (*SshPublicKey) ElementType ¶
func (*SshPublicKey) ElementType() reflect.Type
func (*SshPublicKey) ToSshPublicKeyOutput ¶
func (i *SshPublicKey) ToSshPublicKeyOutput() SshPublicKeyOutput
func (*SshPublicKey) ToSshPublicKeyOutputWithContext ¶
func (i *SshPublicKey) ToSshPublicKeyOutputWithContext(ctx context.Context) SshPublicKeyOutput
type SshPublicKeyArgs ¶
type SshPublicKeyArgs struct { // An expiration time in microseconds since epoch. ExpirationTimeUsec pulumi.StringPtrInput // Public key text in SSH format, defined by RFC4253 section 6.6. Key pulumi.StringInput // The project ID of the Google Cloud Platform project. Project pulumi.StringPtrInput // The user email. // // *** User pulumi.StringInput }
The set of arguments for constructing a SshPublicKey resource.
func (SshPublicKeyArgs) ElementType ¶
func (SshPublicKeyArgs) ElementType() reflect.Type
type SshPublicKeyArray ¶
type SshPublicKeyArray []SshPublicKeyInput
func (SshPublicKeyArray) ElementType ¶
func (SshPublicKeyArray) ElementType() reflect.Type
func (SshPublicKeyArray) ToSshPublicKeyArrayOutput ¶
func (i SshPublicKeyArray) ToSshPublicKeyArrayOutput() SshPublicKeyArrayOutput
func (SshPublicKeyArray) ToSshPublicKeyArrayOutputWithContext ¶
func (i SshPublicKeyArray) ToSshPublicKeyArrayOutputWithContext(ctx context.Context) SshPublicKeyArrayOutput
type SshPublicKeyArrayInput ¶
type SshPublicKeyArrayInput interface { pulumi.Input ToSshPublicKeyArrayOutput() SshPublicKeyArrayOutput ToSshPublicKeyArrayOutputWithContext(context.Context) SshPublicKeyArrayOutput }
SshPublicKeyArrayInput is an input type that accepts SshPublicKeyArray and SshPublicKeyArrayOutput values. You can construct a concrete instance of `SshPublicKeyArrayInput` via:
SshPublicKeyArray{ SshPublicKeyArgs{...} }
type SshPublicKeyArrayOutput ¶
type SshPublicKeyArrayOutput struct{ *pulumi.OutputState }
func (SshPublicKeyArrayOutput) ElementType ¶
func (SshPublicKeyArrayOutput) ElementType() reflect.Type
func (SshPublicKeyArrayOutput) Index ¶
func (o SshPublicKeyArrayOutput) Index(i pulumi.IntInput) SshPublicKeyOutput
func (SshPublicKeyArrayOutput) ToSshPublicKeyArrayOutput ¶
func (o SshPublicKeyArrayOutput) ToSshPublicKeyArrayOutput() SshPublicKeyArrayOutput
func (SshPublicKeyArrayOutput) ToSshPublicKeyArrayOutputWithContext ¶
func (o SshPublicKeyArrayOutput) ToSshPublicKeyArrayOutputWithContext(ctx context.Context) SshPublicKeyArrayOutput
type SshPublicKeyInput ¶
type SshPublicKeyInput interface { pulumi.Input ToSshPublicKeyOutput() SshPublicKeyOutput ToSshPublicKeyOutputWithContext(ctx context.Context) SshPublicKeyOutput }
type SshPublicKeyMap ¶
type SshPublicKeyMap map[string]SshPublicKeyInput
func (SshPublicKeyMap) ElementType ¶
func (SshPublicKeyMap) ElementType() reflect.Type
func (SshPublicKeyMap) ToSshPublicKeyMapOutput ¶
func (i SshPublicKeyMap) ToSshPublicKeyMapOutput() SshPublicKeyMapOutput
func (SshPublicKeyMap) ToSshPublicKeyMapOutputWithContext ¶
func (i SshPublicKeyMap) ToSshPublicKeyMapOutputWithContext(ctx context.Context) SshPublicKeyMapOutput
type SshPublicKeyMapInput ¶
type SshPublicKeyMapInput interface { pulumi.Input ToSshPublicKeyMapOutput() SshPublicKeyMapOutput ToSshPublicKeyMapOutputWithContext(context.Context) SshPublicKeyMapOutput }
SshPublicKeyMapInput is an input type that accepts SshPublicKeyMap and SshPublicKeyMapOutput values. You can construct a concrete instance of `SshPublicKeyMapInput` via:
SshPublicKeyMap{ "key": SshPublicKeyArgs{...} }
type SshPublicKeyMapOutput ¶
type SshPublicKeyMapOutput struct{ *pulumi.OutputState }
func (SshPublicKeyMapOutput) ElementType ¶
func (SshPublicKeyMapOutput) ElementType() reflect.Type
func (SshPublicKeyMapOutput) MapIndex ¶
func (o SshPublicKeyMapOutput) MapIndex(k pulumi.StringInput) SshPublicKeyOutput
func (SshPublicKeyMapOutput) ToSshPublicKeyMapOutput ¶
func (o SshPublicKeyMapOutput) ToSshPublicKeyMapOutput() SshPublicKeyMapOutput
func (SshPublicKeyMapOutput) ToSshPublicKeyMapOutputWithContext ¶
func (o SshPublicKeyMapOutput) ToSshPublicKeyMapOutputWithContext(ctx context.Context) SshPublicKeyMapOutput
type SshPublicKeyOutput ¶
type SshPublicKeyOutput struct{ *pulumi.OutputState }
func (SshPublicKeyOutput) ElementType ¶
func (SshPublicKeyOutput) ElementType() reflect.Type
func (SshPublicKeyOutput) ExpirationTimeUsec ¶
func (o SshPublicKeyOutput) ExpirationTimeUsec() pulumi.StringPtrOutput
An expiration time in microseconds since epoch.
func (SshPublicKeyOutput) Fingerprint ¶
func (o SshPublicKeyOutput) Fingerprint() pulumi.StringOutput
The SHA-256 fingerprint of the SSH public key.
func (SshPublicKeyOutput) Key ¶
func (o SshPublicKeyOutput) Key() pulumi.StringOutput
Public key text in SSH format, defined by RFC4253 section 6.6.
func (SshPublicKeyOutput) Project ¶
func (o SshPublicKeyOutput) Project() pulumi.StringPtrOutput
The project ID of the Google Cloud Platform project.
func (SshPublicKeyOutput) ToSshPublicKeyOutput ¶
func (o SshPublicKeyOutput) ToSshPublicKeyOutput() SshPublicKeyOutput
func (SshPublicKeyOutput) ToSshPublicKeyOutputWithContext ¶
func (o SshPublicKeyOutput) ToSshPublicKeyOutputWithContext(ctx context.Context) SshPublicKeyOutput
func (SshPublicKeyOutput) User ¶
func (o SshPublicKeyOutput) User() pulumi.StringOutput
The user email.
***
type SshPublicKeyState ¶
type SshPublicKeyState struct { // An expiration time in microseconds since epoch. ExpirationTimeUsec pulumi.StringPtrInput // The SHA-256 fingerprint of the SSH public key. Fingerprint pulumi.StringPtrInput // Public key text in SSH format, defined by RFC4253 section 6.6. Key pulumi.StringPtrInput // The project ID of the Google Cloud Platform project. Project pulumi.StringPtrInput // The user email. // // *** User pulumi.StringPtrInput }
func (SshPublicKeyState) ElementType ¶
func (SshPublicKeyState) ElementType() reflect.Type