1. Packages
  2. Github Provider
  3. API Docs
  4. getDependabotPublicKey
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

github.getDependabotPublicKey

Explore with Pulumi AI

github logo
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

    Use this data source to retrieve information about a GitHub Dependabot public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider token must have admin rights to a repository to retrieve it’s Dependabot public key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getDependabotPublicKey({
        repository: "example_repo",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_dependabot_public_key(repository="example_repo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetDependabotPublicKey(ctx, &github.GetDependabotPublicKeyArgs{
    			Repository: "example_repo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Github.GetDependabotPublicKey.Invoke(new()
        {
            Repository = "example_repo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    import com.pulumi.github.inputs.GetDependabotPublicKeyArgs;
    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 = GithubFunctions.getDependabotPublicKey(GetDependabotPublicKeyArgs.builder()
                .repository("example_repo")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: github:getDependabotPublicKey
          Arguments:
            repository: example_repo
    

    Using getDependabotPublicKey

    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 getDependabotPublicKey(args: GetDependabotPublicKeyArgs, opts?: InvokeOptions): Promise<GetDependabotPublicKeyResult>
    function getDependabotPublicKeyOutput(args: GetDependabotPublicKeyOutputArgs, opts?: InvokeOptions): Output<GetDependabotPublicKeyResult>
    def get_dependabot_public_key(repository: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetDependabotPublicKeyResult
    def get_dependabot_public_key_output(repository: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetDependabotPublicKeyResult]
    func GetDependabotPublicKey(ctx *Context, args *GetDependabotPublicKeyArgs, opts ...InvokeOption) (*GetDependabotPublicKeyResult, error)
    func GetDependabotPublicKeyOutput(ctx *Context, args *GetDependabotPublicKeyOutputArgs, opts ...InvokeOption) GetDependabotPublicKeyResultOutput

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

    public static class GetDependabotPublicKey 
    {
        public static Task<GetDependabotPublicKeyResult> InvokeAsync(GetDependabotPublicKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetDependabotPublicKeyResult> Invoke(GetDependabotPublicKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDependabotPublicKeyResult> getDependabotPublicKey(GetDependabotPublicKeyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getDependabotPublicKey:getDependabotPublicKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Repository string
    Name of the repository to get public key from.
    Repository string
    Name of the repository to get public key from.
    repository String
    Name of the repository to get public key from.
    repository string
    Name of the repository to get public key from.
    repository str
    Name of the repository to get public key from.
    repository String
    Name of the repository to get public key from.

    getDependabotPublicKey Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Actual key retrieved.
    KeyId string
    ID of the key that has been retrieved.
    Repository string
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Actual key retrieved.
    KeyId string
    ID of the key that has been retrieved.
    Repository string
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    Actual key retrieved.
    keyId String
    ID of the key that has been retrieved.
    repository String
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    Actual key retrieved.
    keyId string
    ID of the key that has been retrieved.
    repository string
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    Actual key retrieved.
    key_id str
    ID of the key that has been retrieved.
    repository str
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    Actual key retrieved.
    keyId String
    ID of the key that has been retrieved.
    repository String

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi