Deploy Key Args
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-ed25519 AAAA...")
.project("example/deploying")
.title("Example deploy key")
.build());
}
}
Content copied to clipboard
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
Content copied to clipboard
$ pulumi import gitlab:index/deployKey:DeployKey test richardc/example:3
Content copied to clipboard