DeployKeyEnable

This resource allows you to enable pre-existing deploy keys for your GitLab projects.

the GITLAB KEY_ID for the deploy key must be known

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        // A repo to host the deployment key
        var parentProject = new GitLab.Project("parentProject", new GitLab.ProjectArgs
        {
        });
        // A second repo to use the deployment key from the parent project
        var fooProject = new GitLab.Project("fooProject", new GitLab.ProjectArgs
        {
        });
        // Upload a deployment key for the parent repo
        var parentDeployKey = new GitLab.DeployKey("parentDeployKey", new GitLab.DeployKeyArgs
        {
            Key = "ssh-rsa AAAA...",
            Project = parentProject.Id,
            Title = "Example deploy key",
        });
        // Enable the deployment key on the second repo
        var fooDeployKeyEnable = new GitLab.DeployKeyEnable("fooDeployKeyEnable", new GitLab.DeployKeyEnableArgs
        {
            KeyId = parentDeployKey.Id,
            Project = fooProject.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_gitlab as gitlab

# A repo to host the deployment key
parent_project = gitlab.Project("parentProject")
# A second repo to use the deployment key from the parent project
foo_project = gitlab.Project("fooProject")
# Upload a deployment key for the parent repo
parent_deploy_key = gitlab.DeployKey("parentDeployKey",
    key="ssh-rsa AAAA...",
    project=parent_project.id,
    title="Example deploy key")
# Enable the deployment key on the second repo
foo_deploy_key_enable = gitlab.DeployKeyEnable("fooDeployKeyEnable",
    key_id=parent_deploy_key.id,
    project=foo_project.id)
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

// A repo to host the deployment key
const parentProject = new gitlab.Project("parent", {});
// A second repo to use the deployment key from the parent project
const fooProject = new gitlab.Project("foo", {});
// Upload a deployment key for the parent repo
const parentDeployKey = new gitlab.DeployKey("parent", {
    key: "ssh-rsa AAAA...",
    project: parentProject.id,
    title: "Example deploy key",
});
// Enable the deployment key on the second repo
const fooDeployKeyEnable = new gitlab.DeployKeyEnable("foo", {
    keyId: parentDeployKey.id,
    project: fooProject.id,
});

Create a DeployKeyEnable Resource

def DeployKeyEnable(resource_name, opts=None, can_push=None, key=None, key_id=None, project=None, title=None, __props__=None);
name string
The unique name of the resource.
args DeployKeyEnableArgs
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 DeployKeyEnableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DeployKeyEnableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DeployKeyEnable Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DeployKeyEnable resource accepts the following input properties:

KeyId string

The Gitlab key id for the pre-existing deploy key

Project string

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

CanPush bool
Key string
Title string
KeyId string

The Gitlab key id for the pre-existing deploy key

Project string

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

CanPush bool
Key string
Title string
keyId string

The Gitlab key id for the pre-existing deploy key

project string

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

canPush boolean
key string
title string
key_id str

The Gitlab key id for the pre-existing deploy key

project str

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

can_push bool
key str
title str

Outputs

All input properties are implicitly available as output properties. Additionally, the DeployKeyEnable resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing DeployKeyEnable Resource

Get an existing DeployKeyEnable 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?: DeployKeyEnableState, opts?: CustomResourceOptions): DeployKeyEnable
static get(resource_name, id, opts=None, can_push=None, key=None, key_id=None, project=None, title=None, __props__=None);
func GetDeployKeyEnable(ctx *Context, name string, id IDInput, state *DeployKeyEnableState, opts ...ResourceOption) (*DeployKeyEnable, error)
public static DeployKeyEnable Get(string name, Input<string> id, DeployKeyEnableState? 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:

CanPush bool
Key string
KeyId string

The Gitlab key id for the pre-existing deploy key

Project string

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

Title string
CanPush bool
Key string
KeyId string

The Gitlab key id for the pre-existing deploy key

Project string

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

Title string
canPush boolean
key string
keyId string

The Gitlab key id for the pre-existing deploy key

project string

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

title string
can_push bool
key str
key_id str

The Gitlab key id for the pre-existing deploy key

project str

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

title str

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.