UserGpgKey

class UserGpgKey : KotlinCustomResource

Provides a GitHub user's GPG key resource. This resource allows you to add/remove GPG keys from your user account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.UserGpgKey("example", {armoredPublicKey: `-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----`});
import pulumi
import pulumi_github as github
example = github.UserGpgKey("example", armored_public_key="""-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.UserGpgKey("example", new()
{
ArmoredPublicKey = @"-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----",
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.NewUserGpgKey(ctx, "example", &github.UserGpgKeyArgs{
ArmoredPublicKey: pulumi.String("-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.UserGpgKey;
import com.pulumi.github.UserGpgKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new UserGpgKey("example", UserGpgKeyArgs.builder()
.armoredPublicKey("""
-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK----- """)
.build());
}
}
resources:
example:
type: github:UserGpgKey
properties:
armoredPublicKey: |-
-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----

Import

GPG keys are not importable due to the fact that API does not return previously uploaded GPG key.

Properties

Link copied to clipboard

Your public GPG key, generated in ASCII-armored format. See Generating a new GPG key for help on creating a GPG key.

Link copied to clipboard
val etag: Output<String>
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val keyId: Output<String>

The key ID of the GPG key, e.g. 3262EFF25BA0D270

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>