CodespacesOrganizationSecretRepositoriesArgs

data class CodespacesOrganizationSecretRepositoriesArgs(val secretName: Output<String>? = null, val selectedRepositoryIds: Output<List<Int>>? = null) : ConvertibleToJava<CodespacesOrganizationSecretRepositoriesArgs>

This resource allows you to manage repository allow list for existing GitHub Codespaces secrets within your GitHub organization. You must have write access to an organization secret to use this resource. This resource is only applicable when visibility of the existing organization secret has been set to selected.

Example Usage

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.GetRepositoryArgs;
import com.pulumi.github.CodespacesOrganizationSecretRepositories;
import com.pulumi.github.CodespacesOrganizationSecretRepositoriesArgs;
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 repo = GithubFunctions.getRepository(GetRepositoryArgs.builder()
.fullName("my-org/repo")
.build());
var orgSecretRepos = new CodespacesOrganizationSecretRepositories("orgSecretRepos", CodespacesOrganizationSecretRepositoriesArgs.builder()
.secretName("existing_secret_name")
.selectedRepositoryIds(repo.applyValue(getRepositoryResult -> getRepositoryResult.repoId()))
.build());
}
}

Import

This resource can be imported using an ID made up of the secret name:

$ pulumi import github:index/codespacesOrganizationSecretRepositories:CodespacesOrganizationSecretRepositories org_secret_repos existing_secret_name

Constructors

constructor(secretName: Output<String>? = null, selectedRepositoryIds: Output<List<Int>>? = null)

Properties

Link copied to clipboard
val secretName: Output<String>? = null

Name of the existing secret

Link copied to clipboard
val selectedRepositoryIds: Output<List<Int>>? = null

An array of repository ids that can access the organization secret.

Functions

Link copied to clipboard
open override fun toJava(): CodespacesOrganizationSecretRepositoriesArgs