DeployKeyArgs

data class DeployKeyArgs(val canPush: Output<Boolean>? = null, val key: Output<String>? = null, val project: Output<String>? = null, val title: Output<String>? = null) : ConvertibleToJava<DeployKeyArgs>

The gitlab.DeployKey resource allows to manage the lifecycle of a deploy key.

To enable an already existing deploy key for another project use the gitlab_project_deploy_key resource. Upstream API: GitLab REST API docs

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.DeployKey;
import com.pulumi.gitlab.DeployKeyArgs;
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 DeployKey("example", DeployKeyArgs.builder()
.key("ssh-rsa AAAA...")
.project("example/deploying")
.title("Example deploy key")
.build());
}
}

Import

GitLab deploy keys can be imported using an id made up of {project_id}:{deploy_key_id}, e.g. project_id can be whatever the get_single_project takes for its :id value, so for example

$ pulumi import gitlab:index/deployKey:DeployKey test 1:3
$ pulumi import gitlab:index/deployKey:DeployKey test richardc/example:3

Constructors

Link copied to clipboard
constructor(canPush: Output<Boolean>? = null, key: Output<String>? = null, project: Output<String>? = null, title: Output<String>? = null)

Properties

Link copied to clipboard
val canPush: Output<Boolean>? = null

Allow this deploy key to be used to push changes to the project. Defaults to false.

Link copied to clipboard
val key: Output<String>? = null

The public ssh key body.

Link copied to clipboard
val project: Output<String>? = null

The name or id of the project to add the deploy key to.

Link copied to clipboard
val title: Output<String>? = null

A title to describe the deploy key with.

Functions

Link copied to clipboard
open override fun toJava(): DeployKeyArgs