DeployKeyEnable

class DeployKeyEnable : KotlinCustomResource

The gitlab.DeployKeyEnable resource allows to enable an already existing deploy key (see gitlab.DeployKey resource) for a specific project. 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.Project;
import com.pulumi.gitlab.DeployKey;
import com.pulumi.gitlab.DeployKeyArgs;
import com.pulumi.gitlab.DeployKeyEnable;
import com.pulumi.gitlab.DeployKeyEnableArgs;
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 parentProject = new Project("parentProject");
var fooProject = new Project("fooProject");
var parentDeployKey = new DeployKey("parentDeployKey", DeployKeyArgs.builder()
.project(parentProject.id())
.title("Example deploy key")
.key("ssh-ed25519 AAAA...")
.build());
var fooDeployKeyEnable = new DeployKeyEnable("fooDeployKeyEnable", DeployKeyEnableArgs.builder()
.project(fooProject.id())
.keyId(parentDeployKey.id())
.build());
}
}

Import

GitLab enabled 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/deployKeyEnable:DeployKeyEnable example 12345:67890
$ pulumi import gitlab:index/deployKeyEnable:DeployKeyEnable example richardc/example:67890

Properties

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

Can deploy key push to the project's repository.

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

Deploy key.

Link copied to clipboard
val keyId: Output<String>

The Gitlab key id for the pre-existing deploy key

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val title: Output<String>

Deploy key's title.

Link copied to clipboard
val urn: Output<String>