import * as pulumi from "@pulumi/pulumi"; /** * Provides a GitHub repository deploy key resource. * * A deploy key is an SSH key that is stored on your server and grants * access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user * account. * * This resource allows you to add/remove repository deploy keys. * * > **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing deploy key modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. * * Further documentation on GitHub repository deploy keys: * - [About deploy keys](https://developer.github.com/guides/managing-deploy-keys/#deploy-keys) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * import * as tls from "@pulumi/tls"; * * // Generate an ssh key using provider "hashicorp/tls" * const exampleRepositoryDeployKey = new tls.PrivateKey("example_repository_deploy_key", {algorithm: "ED25519"}); * // Add the ssh key as a deploy key * const exampleRepositoryDeployKeyRepositoryDeployKey = new github.RepositoryDeployKey("example_repository_deploy_key", { * title: "Repository test key", * repository: "test-repo", * key: exampleRepositoryDeployKey.publicKeyOpenssh, * readOnly: true, * }); * ``` * * ## Import * * Repository deploy keys can be imported using a colon-separated pair of repository name * and GitHub's key id. The latter can be obtained by GitHub's SDKs and API. * * ```sh * $ pulumi import github:index/repositoryDeployKey:RepositoryDeployKey foo test-repo:23824728 * ``` */ export declare class RepositoryDeployKey extends pulumi.CustomResource { /** * Get an existing RepositoryDeployKey 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, state?: RepositoryDeployKeyState, opts?: pulumi.CustomResourceOptions): RepositoryDeployKey; /** * Returns true if the given object is an instance of RepositoryDeployKey. 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 RepositoryDeployKey; readonly etag: pulumi.Output; /** * A SSH key. */ readonly key: pulumi.Output; /** * A boolean qualifying the key to be either read only or read/write. */ readonly readOnly: pulumi.Output; /** * Name of the GitHub repository. */ readonly repository: pulumi.Output; /** * A title. * * Changing any of the fields forces re-creating the resource. */ readonly title: pulumi.Output; /** * Create a RepositoryDeployKey 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: RepositoryDeployKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RepositoryDeployKey resources. */ export interface RepositoryDeployKeyState { etag?: pulumi.Input; /** * A SSH key. */ key?: pulumi.Input; /** * A boolean qualifying the key to be either read only or read/write. */ readOnly?: pulumi.Input; /** * Name of the GitHub repository. */ repository?: pulumi.Input; /** * A title. * * Changing any of the fields forces re-creating the resource. */ title?: pulumi.Input; } /** * The set of arguments for constructing a RepositoryDeployKey resource. */ export interface RepositoryDeployKeyArgs { /** * A SSH key. */ key: pulumi.Input; /** * A boolean qualifying the key to be either read only or read/write. */ readOnly?: pulumi.Input; /** * Name of the GitHub repository. */ repository: pulumi.Input; /** * A title. * * Changing any of the fields forces re-creating the resource. */ title: pulumi.Input; } //# sourceMappingURL=repositoryDeployKey.d.ts.map