RepositoryDeployKey

class RepositoryDeployKey : KotlinCustomResource

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. Further documentation on GitHub repository deploy keys:

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.RepositoryDeployKey;
import com.pulumi.github.RepositoryDeployKeyArgs;
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 exampleRepositoryDeployKey = new RepositoryDeployKey("exampleRepositoryDeployKey", RepositoryDeployKeyArgs.builder()
.key("ssh-rsa AAA...")
.readOnly("false")
.repository("test-repo")
.title("Repository test key")
.build());
}
}

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.

$ pulumi import github:index/repositoryDeployKey:RepositoryDeployKey foo test-repo:23824728

Properties

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

A SSH key.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val readOnly: Output<Boolean>?

A boolean qualifying the key to be either read only or read/write.

Link copied to clipboard
val repository: Output<String>

Name of the GitHub repository.

Link copied to clipboard
val title: Output<String>

A title. Changing any of the fields forces re-creating the resource.

Link copied to clipboard
val urn: Output<String>