Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
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")
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
})
}
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 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
Using getCodespacesSecrets
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 getCodespacesSecrets(args: GetCodespacesSecretsArgs, opts?: InvokeOptions): Promise<GetCodespacesSecretsResult>
function getCodespacesSecretsOutput(args: GetCodespacesSecretsOutputArgs, opts?: InvokeOptions): Output<GetCodespacesSecretsResult>def get_codespaces_secrets(full_name: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCodespacesSecretsResult
def get_codespaces_secrets_output(full_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCodespacesSecretsResult]func GetCodespacesSecrets(ctx *Context, args *GetCodespacesSecretsArgs, opts ...InvokeOption) (*GetCodespacesSecretsResult, error)
func GetCodespacesSecretsOutput(ctx *Context, args *GetCodespacesSecretsOutputArgs, opts ...InvokeOption) GetCodespacesSecretsResultOutput> Note: This function is named GetCodespacesSecrets in the Go SDK.
public static class GetCodespacesSecrets
{
public static Task<GetCodespacesSecretsResult> InvokeAsync(GetCodespacesSecretsArgs args, InvokeOptions? opts = null)
public static Output<GetCodespacesSecretsResult> Invoke(GetCodespacesSecretsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCodespacesSecretsResult> getCodespacesSecrets(GetCodespacesSecretsArgs args, InvokeOptions options)
public static Output<GetCodespacesSecretsResult> getCodespacesSecrets(GetCodespacesSecretsArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getCodespacesSecrets:getCodespacesSecrets
arguments:
# arguments dictionaryThe following arguments are supported:
getCodespacesSecrets Result
The following output properties are available:
- Full
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Secret name
- Secrets
List<Get
Codespaces Secrets Secret> - list of codespaces secrets for the repository
- Full
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Secret name
- Secrets
[]Get
Codespaces Secrets Secret - list of codespaces secrets for the repository
- full
Name String - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Secret name
- secrets
List<Get
Codespaces Secrets Secret> - list of codespaces secrets for the repository
- full
Name string - id string
- The provider-assigned unique ID for this managed resource.
- name string
- Secret name
- secrets
Get
Codespaces Secrets Secret[] - list of codespaces secrets for the repository
- full_
name str - id str
- The provider-assigned unique ID for this managed resource.
- name str
- Secret name
- secrets
Sequence[Get
Codespaces Secrets Secret] - list of codespaces secrets for the repository
- full
Name String - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Secret name
- secrets List<Property Map>
- list of codespaces secrets for the repository
Supporting Types
GetCodespacesSecretsSecret
- created_
at str - Timestamp of the secret creation
- name str
- The name of the repository.
- updated_
at str - Timestamp of the secret last update
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
