1. Packages
  2. Github Provider
  3. API Docs
  4. CodespacesSecret
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.CodespacesSecret

Explore with Pulumi AI

Example Usage

Create CodespacesSecret Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CodespacesSecret(name: string, args: CodespacesSecretArgs, opts?: CustomResourceOptions);
@overload
def CodespacesSecret(resource_name: str,
                     args: CodespacesSecretArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def CodespacesSecret(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     repository: Optional[str] = None,
                     secret_name: Optional[str] = None,
                     encrypted_value: Optional[str] = None,
                     plaintext_value: Optional[str] = None)
func NewCodespacesSecret(ctx *Context, name string, args CodespacesSecretArgs, opts ...ResourceOption) (*CodespacesSecret, error)
public CodespacesSecret(string name, CodespacesSecretArgs args, CustomResourceOptions? opts = null)
public CodespacesSecret(String name, CodespacesSecretArgs args)
public CodespacesSecret(String name, CodespacesSecretArgs args, CustomResourceOptions options)
type: github:CodespacesSecret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CodespacesSecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CodespacesSecretArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CodespacesSecretArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CodespacesSecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CodespacesSecretArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var codespacesSecretResource = new Github.CodespacesSecret("codespacesSecretResource", new()
{
    Repository = "string",
    SecretName = "string",
    EncryptedValue = "string",
    PlaintextValue = "string",
});
Copy
example, err := github.NewCodespacesSecret(ctx, "codespacesSecretResource", &github.CodespacesSecretArgs{
	Repository:     pulumi.String("string"),
	SecretName:     pulumi.String("string"),
	EncryptedValue: pulumi.String("string"),
	PlaintextValue: pulumi.String("string"),
})
Copy
var codespacesSecretResource = new CodespacesSecret("codespacesSecretResource", CodespacesSecretArgs.builder()
    .repository("string")
    .secretName("string")
    .encryptedValue("string")
    .plaintextValue("string")
    .build());
Copy
codespaces_secret_resource = github.CodespacesSecret("codespacesSecretResource",
    repository="string",
    secret_name="string",
    encrypted_value="string",
    plaintext_value="string")
Copy
const codespacesSecretResource = new github.CodespacesSecret("codespacesSecretResource", {
    repository: "string",
    secretName: "string",
    encryptedValue: "string",
    plaintextValue: "string",
});
Copy
type: github:CodespacesSecret
properties:
    encryptedValue: string
    plaintextValue: string
    repository: string
    secretName: string
Copy

CodespacesSecret Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CodespacesSecret resource accepts the following input properties:

Repository
This property is required.
Changes to this property will trigger replacement.
string
Name of the repository
SecretName
This property is required.
Changes to this property will trigger replacement.
string
Name of the secret
EncryptedValue Changes to this property will trigger replacement. string
Encrypted value of the secret using the GitHub public key in Base64 format.
PlaintextValue Changes to this property will trigger replacement. string
Plaintext value of the secret to be encrypted
Repository
This property is required.
Changes to this property will trigger replacement.
string
Name of the repository
SecretName
This property is required.
Changes to this property will trigger replacement.
string
Name of the secret
EncryptedValue Changes to this property will trigger replacement. string
Encrypted value of the secret using the GitHub public key in Base64 format.
PlaintextValue Changes to this property will trigger replacement. string
Plaintext value of the secret to be encrypted
repository
This property is required.
Changes to this property will trigger replacement.
String
Name of the repository
secretName
This property is required.
Changes to this property will trigger replacement.
String
Name of the secret
encryptedValue Changes to this property will trigger replacement. String
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintextValue Changes to this property will trigger replacement. String
Plaintext value of the secret to be encrypted
repository
This property is required.
Changes to this property will trigger replacement.
string
Name of the repository
secretName
This property is required.
Changes to this property will trigger replacement.
string
Name of the secret
encryptedValue Changes to this property will trigger replacement. string
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintextValue Changes to this property will trigger replacement. string
Plaintext value of the secret to be encrypted
repository
This property is required.
Changes to this property will trigger replacement.
str
Name of the repository
secret_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the secret
encrypted_value Changes to this property will trigger replacement. str
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintext_value Changes to this property will trigger replacement. str
Plaintext value of the secret to be encrypted
repository
This property is required.
Changes to this property will trigger replacement.
String
Name of the repository
secretName
This property is required.
Changes to this property will trigger replacement.
String
Name of the secret
encryptedValue Changes to this property will trigger replacement. String
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintextValue Changes to this property will trigger replacement. String
Plaintext value of the secret to be encrypted

Outputs

All input properties are implicitly available as output properties. Additionally, the CodespacesSecret resource produces the following output properties:

CreatedAt string
Date of codespaces_secret creation.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
Date of codespaces_secret update.
CreatedAt string
Date of codespaces_secret creation.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
Date of codespaces_secret update.
createdAt String
Date of codespaces_secret creation.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
Date of codespaces_secret update.
createdAt string
Date of codespaces_secret creation.
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
Date of codespaces_secret update.
created_at str
Date of codespaces_secret creation.
id str
The provider-assigned unique ID for this managed resource.
updated_at str
Date of codespaces_secret update.
createdAt String
Date of codespaces_secret creation.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
Date of codespaces_secret update.

Look up Existing CodespacesSecret Resource

Get an existing CodespacesSecret resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CodespacesSecretState, opts?: CustomResourceOptions): CodespacesSecret
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        encrypted_value: Optional[str] = None,
        plaintext_value: Optional[str] = None,
        repository: Optional[str] = None,
        secret_name: Optional[str] = None,
        updated_at: Optional[str] = None) -> CodespacesSecret
func GetCodespacesSecret(ctx *Context, name string, id IDInput, state *CodespacesSecretState, opts ...ResourceOption) (*CodespacesSecret, error)
public static CodespacesSecret Get(string name, Input<string> id, CodespacesSecretState? state, CustomResourceOptions? opts = null)
public static CodespacesSecret get(String name, Output<String> id, CodespacesSecretState state, CustomResourceOptions options)
resources:  _:    type: github:CodespacesSecret    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreatedAt string
Date of codespaces_secret creation.
EncryptedValue Changes to this property will trigger replacement. string
Encrypted value of the secret using the GitHub public key in Base64 format.
PlaintextValue Changes to this property will trigger replacement. string
Plaintext value of the secret to be encrypted
Repository Changes to this property will trigger replacement. string
Name of the repository
SecretName Changes to this property will trigger replacement. string
Name of the secret
UpdatedAt string
Date of codespaces_secret update.
CreatedAt string
Date of codespaces_secret creation.
EncryptedValue Changes to this property will trigger replacement. string
Encrypted value of the secret using the GitHub public key in Base64 format.
PlaintextValue Changes to this property will trigger replacement. string
Plaintext value of the secret to be encrypted
Repository Changes to this property will trigger replacement. string
Name of the repository
SecretName Changes to this property will trigger replacement. string
Name of the secret
UpdatedAt string
Date of codespaces_secret update.
createdAt String
Date of codespaces_secret creation.
encryptedValue Changes to this property will trigger replacement. String
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintextValue Changes to this property will trigger replacement. String
Plaintext value of the secret to be encrypted
repository Changes to this property will trigger replacement. String
Name of the repository
secretName Changes to this property will trigger replacement. String
Name of the secret
updatedAt String
Date of codespaces_secret update.
createdAt string
Date of codespaces_secret creation.
encryptedValue Changes to this property will trigger replacement. string
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintextValue Changes to this property will trigger replacement. string
Plaintext value of the secret to be encrypted
repository Changes to this property will trigger replacement. string
Name of the repository
secretName Changes to this property will trigger replacement. string
Name of the secret
updatedAt string
Date of codespaces_secret update.
created_at str
Date of codespaces_secret creation.
encrypted_value Changes to this property will trigger replacement. str
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintext_value Changes to this property will trigger replacement. str
Plaintext value of the secret to be encrypted
repository Changes to this property will trigger replacement. str
Name of the repository
secret_name Changes to this property will trigger replacement. str
Name of the secret
updated_at str
Date of codespaces_secret update.
createdAt String
Date of codespaces_secret creation.
encryptedValue Changes to this property will trigger replacement. String
Encrypted value of the secret using the GitHub public key in Base64 format.
plaintextValue Changes to this property will trigger replacement. String
Plaintext value of the secret to be encrypted
repository Changes to this property will trigger replacement. String
Name of the repository
secretName Changes to this property will trigger replacement. String
Name of the secret
updatedAt String
Date of codespaces_secret update.

Import

This resource can be imported using an ID made up of the repository and secret_name:

$ pulumi import github:index/codespacesSecret:CodespacesSecret example_secret example_repository/example_secret_name
Copy

NOTE: the 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.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.