GitLab

v4.9.0 published on Monday, Oct 24, 2022 by Pulumi

getInstanceDeployKeys

The gitlab.getInstanceDeployKeys data source allows to retrieve a list of deploy keys for a GitLab instance.

This data source requires administration privileges.

Upstream API: GitLab REST API docs

Example Usage

using System.Collections.Generic;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    var example = GitLab.GetInstanceDeployKeys.Invoke(new()
    {
        Public = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = gitlab.GetInstanceDeployKeys(ctx, &GetInstanceDeployKeysArgs{
			Public: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetInstanceDeployKeysArgs;
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) {
        final var example = GitlabFunctions.getInstanceDeployKeys(GetInstanceDeployKeysArgs.builder()
            .public_(true)
            .build());

    }
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_instance_deploy_keys(public=True)
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

// only public deploy keys
const example = pulumi.output(gitlab.getInstanceDeployKeys({
    public: true,
}));
variables:
  example:
    fn::invoke:
      Function: gitlab:getInstanceDeployKeys
      Arguments:
        public: true

Using getInstanceDeployKeys

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getInstanceDeployKeys(args: GetInstanceDeployKeysArgs, opts?: InvokeOptions): Promise<GetInstanceDeployKeysResult>
function getInstanceDeployKeysOutput(args: GetInstanceDeployKeysOutputArgs, opts?: InvokeOptions): Output<GetInstanceDeployKeysResult>
def get_instance_deploy_keys(public: Optional[bool] = None,
                             opts: Optional[InvokeOptions] = None) -> GetInstanceDeployKeysResult
def get_instance_deploy_keys_output(public: Optional[pulumi.Input[bool]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetInstanceDeployKeysResult]
func GetInstanceDeployKeys(ctx *Context, args *GetInstanceDeployKeysArgs, opts ...InvokeOption) (*GetInstanceDeployKeysResult, error)
func GetInstanceDeployKeysOutput(ctx *Context, args *GetInstanceDeployKeysOutputArgs, opts ...InvokeOption) GetInstanceDeployKeysResultOutput

> Note: This function is named GetInstanceDeployKeys in the Go SDK.

public static class GetInstanceDeployKeys 
{
    public static Task<GetInstanceDeployKeysResult> InvokeAsync(GetInstanceDeployKeysArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceDeployKeysResult> Invoke(GetInstanceDeployKeysInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceDeployKeysResult> getInstanceDeployKeys(GetInstanceDeployKeysArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gitlab:index/getInstanceDeployKeys:getInstanceDeployKeys
  arguments:
    # arguments dictionary

The following arguments are supported:

Public bool

Only return deploy keys that are public.

Public bool

Only return deploy keys that are public.

public_ Boolean

Only return deploy keys that are public.

public boolean

Only return deploy keys that are public.

public bool

Only return deploy keys that are public.

public Boolean

Only return deploy keys that are public.

getInstanceDeployKeys Result

The following output properties are available:

DeployKeys List<Pulumi.GitLab.Outputs.GetInstanceDeployKeysDeployKey>

The list of all deploy keys across all projects of the GitLab instance.

Id string

The provider-assigned unique ID for this managed resource.

Public bool

Only return deploy keys that are public.

DeployKeys []GetInstanceDeployKeysDeployKey

The list of all deploy keys across all projects of the GitLab instance.

Id string

The provider-assigned unique ID for this managed resource.

Public bool

Only return deploy keys that are public.

deployKeys List<GetInstanceDeployKeysDeployKey>

The list of all deploy keys across all projects of the GitLab instance.

id String

The provider-assigned unique ID for this managed resource.

public_ Boolean

Only return deploy keys that are public.

deployKeys GetInstanceDeployKeysDeployKey[]

The list of all deploy keys across all projects of the GitLab instance.

id string

The provider-assigned unique ID for this managed resource.

public boolean

Only return deploy keys that are public.

deploy_keys Sequence[GetInstanceDeployKeysDeployKey]

The list of all deploy keys across all projects of the GitLab instance.

id str

The provider-assigned unique ID for this managed resource.

public bool

Only return deploy keys that are public.

deployKeys List<Property Map>

The list of all deploy keys across all projects of the GitLab instance.

id String

The provider-assigned unique ID for this managed resource.

public Boolean

Only return deploy keys that are public.

Supporting Types

GetInstanceDeployKeysDeployKey

createdAt String
fingerprint String
id Number

The ID of this resource.

key String
projectsWithWriteAccesses List<Property Map>
title String

GetInstanceDeployKeysDeployKeyProjectsWithWriteAccess

CreatedAt string
Description string
Id int

The ID of this resource.

Name string
NameWithNamespace string
Path string
PathWithNamespace string
CreatedAt string
Description string
Id int

The ID of this resource.

Name string
NameWithNamespace string
Path string
PathWithNamespace string
createdAt String
description String
id Integer

The ID of this resource.

name String
nameWithNamespace String
path String
pathWithNamespace String
createdAt string
description string
id number

The ID of this resource.

name string
nameWithNamespace string
path string
pathWithNamespace string
created_at str
description str
id int

The ID of this resource.

name str
name_with_namespace str
path str
path_with_namespace str
createdAt String
description String
id Number

The ID of this resource.

name String
nameWithNamespace String
path String
pathWithNamespace String

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.