getCodespacesSecrets

Use this data source to retrieve the list of codespaces secrets for a GitHub repository.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getCodespacesSecrets({
name: "example_repository",
});
const example2 = github.getCodespacesSecrets({
fullName: "org/example_repository",
});
import pulumi
import pulumi_github as github
example = github.get_codespaces_secrets(name="example_repository")
example2 = github.get_codespaces_secrets(full_name="org/example_repository")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetCodespacesSecrets.Invoke(new()
{
Name = "example_repository",
});
var example2 = Github.GetCodespacesSecrets.Invoke(new()
{
FullName = "org/example_repository",
});
});
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.GetCodespacesSecrets(ctx, &github.GetCodespacesSecretsArgs{
Name: pulumi.StringRef("example_repository"),
}, nil)
if err != nil {
return err
}
_, err = github.GetCodespacesSecrets(ctx, &github.GetCodespacesSecretsArgs{
FullName: pulumi.StringRef("org/example_repository"),
}, 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.github.GithubFunctions;
import com.pulumi.github.inputs.GetCodespacesSecretsArgs;
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.getCodespacesSecrets(GetCodespacesSecretsArgs.builder()
.name("example_repository")
.build());
final var example2 = GithubFunctions.getCodespacesSecrets(GetCodespacesSecretsArgs.builder()
.fullName("org/example_repository")
.build());
}
}
variables:
example:
fn::invoke:
function: github:getCodespacesSecrets
arguments:
name: example_repository
example2:
fn::invoke:
function: github:getCodespacesSecrets
arguments:
fullName: org/example_repository

Return

A collection of values returned by getCodespacesSecrets.

Parameters

argument

A collection of arguments for invoking getCodespacesSecrets.


suspend fun getCodespacesSecrets(fullName: String? = null, name: String? = null): GetCodespacesSecretsResult

Return

A collection of values returned by getCodespacesSecrets.

Parameters

fullName

Full name of the repository (in org/name format).

name

The name of the repository.

See also


Return

A collection of values returned by getCodespacesSecrets.

Parameters

argument

Builder for com.pulumi.github.kotlin.inputs.GetCodespacesSecretsPlainArgs.

See also