CodespacesUserSecretArgs

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

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.CodespacesUserSecret;
import com.pulumi.github.CodespacesUserSecretArgs;
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 exampleSecretCodespacesUserSecret = new CodespacesUserSecret("exampleSecretCodespacesUserSecret", CodespacesUserSecretArgs.builder()
.secretName("example_secret_name")
.plaintextValue(var_.some_secret_string())
.selectedRepositoryIds(repo.applyValue(getRepositoryResult -> getRepositoryResult.repoId()))
.build());
var exampleSecretIndex_codespacesUserSecretCodespacesUserSecret = new CodespacesUserSecret("exampleSecretIndex/codespacesUserSecretCodespacesUserSecret", CodespacesUserSecretArgs.builder()
.secretName("example_secret_name")
.encryptedValue(var_.some_encrypted_secret_string())
.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/codespacesUserSecret:CodespacesUserSecret test_secret test_secret_name

NOTEthe implementation is limited in that it won't fetch the value of the plaintext_value or encrypted_value fields when importing. You may need to ignore changes for these as a workaround.

Constructors

Link copied to clipboard
constructor(encryptedValue: Output<String>? = null, plaintextValue: Output<String>? = null, secretName: Output<String>? = null, selectedRepositoryIds: Output<List<Int>>? = null)

Properties

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

Encrypted value of the secret using the GitHub public key in Base64 format.

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

Plaintext value of the secret to be encrypted

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

Name of the secret

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

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

Functions

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