RepositoryDeployKey
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: - About deploy keys
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a deploy key
var exampleRepositoryDeployKey = new Github.RepositoryDeployKey("exampleRepositoryDeployKey", new Github.RepositoryDeployKeyArgs
{
Key = "ssh-rsa AAA...",
ReadOnly = false,
Repository = "test-repo",
Title = "Repository test key",
});
}
}
Coming soon!
import pulumi
import pulumi_github as github
# Add a deploy key
example_repository_deploy_key = github.RepositoryDeployKey("exampleRepositoryDeployKey",
key="ssh-rsa AAA...",
read_only="false",
repository="test-repo",
title="Repository test key")import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Add a deploy key
const exampleRepositoryDeployKey = new github.RepositoryDeployKey("example_repository_deploy_key", {
key: "ssh-rsa AAA...",
readOnly: false,
repository: "test-repo",
title: "Repository test key",
});Create a RepositoryDeployKey Resource
new RepositoryDeployKey(name: string, args: RepositoryDeployKeyArgs, opts?: CustomResourceOptions);def RepositoryDeployKey(resource_name, opts=None, key=None, read_only=None, repository=None, title=None, __props__=None);func NewRepositoryDeployKey(ctx *Context, name string, args RepositoryDeployKeyArgs, opts ...ResourceOption) (*RepositoryDeployKey, error)public RepositoryDeployKey(string name, RepositoryDeployKeyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RepositoryDeployKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RepositoryDeployKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryDeployKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
RepositoryDeployKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RepositoryDeployKey resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryDeployKey resource produces the following output properties:
Look up an Existing RepositoryDeployKey Resource
Get an existing RepositoryDeployKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RepositoryDeployKeyState, opts?: CustomResourceOptions): RepositoryDeployKeystatic get(resource_name, id, opts=None, etag=None, key=None, read_only=None, repository=None, title=None, __props__=None);func GetRepositoryDeployKey(ctx *Context, name string, id IDInput, state *RepositoryDeployKeyState, opts ...ResourceOption) (*RepositoryDeployKey, error)public static RepositoryDeployKey Get(string name, Input<string> id, RepositoryDeployKeyState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
Package Details
- Repository
- https://github.com/pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.