import * as pulumi from "@pulumi/pulumi"; /** * This resource allows you to create and manage GitHub Actions secrets within your GitHub repository environments. * You must have write access to a repository to use this resource. * * Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is * interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. * * For the purposes of security, the contents of the `value` field have been marked as `sensitive` to Terraform, * but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. * It is also advised that you do not store plaintext values in your code but rather populate the `valueEncrypted` * using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible * in your code. See below for an example of this abstraction. * * ## Example Lifecycle Ignore Changes * * This resource supports using the `lifecycle` `ignoreChanges` block on `remoteUpdatedAt` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const exampleAllowDrift = new github.ActionsEnvironmentSecret("example_allow_drift", { * repository: "example-repo", * environment: "example-environment", * secretName: "example_secret_name", * value: "placeholder", * }); * ``` * * ## Import * * This resource can be imported using an ID made of the repository name, environment name (URL escaped), and secret name all separated by a `:`. * * > **Note**: When importing secrets, the `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` fields will not be populated in the state. You may need to ignore changes for these as a workaround if you're not planning on updating the secret through Terraform. * * ### Import Command * * The following command imports a GitHub actions environment secret named `mysecret` for the repo `myrepo` and environment `myenv` to a `github.ActionsEnvironmentSecret` resource named `example`. * * ```sh * $ pulumi import github:index/actionsEnvironmentSecret:ActionsEnvironmentSecret example myrepo:myenv:mysecret * ``` */ export declare class ActionsEnvironmentSecret extends pulumi.CustomResource { /** * Get an existing ActionsEnvironmentSecret resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ActionsEnvironmentSecretState, opts?: pulumi.CustomResourceOptions): ActionsEnvironmentSecret; /** * Returns true if the given object is an instance of ActionsEnvironmentSecret. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ActionsEnvironmentSecret; /** * Date the secret was created. */ readonly createdAt: pulumi.Output; /** * (Optional) Please use `valueEncrypted`. * * @deprecated Use valueEncrypted and key_id. */ readonly encryptedValue: pulumi.Output; /** * Name of the environment. */ readonly environment: pulumi.Output; /** * ID of the public key used to encrypt the secret, required when setting `encryptedValue`. */ readonly keyId: pulumi.Output; /** * (Optional) Please use `value`. * * > **Note**: One of either `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` must be specified. * * @deprecated Use value. */ readonly plaintextValue: pulumi.Output; /** * Date the secret was last updated in GitHub. */ readonly remoteUpdatedAt: pulumi.Output; /** * Name of the repository. */ readonly repository: pulumi.Output; /** * ID of the repository. */ readonly repositoryId: pulumi.Output; /** * Name of the secret. */ readonly secretName: pulumi.Output; /** * Date the secret was last updated by the provider. */ readonly updatedAt: pulumi.Output; /** * Plaintext value of the secret to be encrypted. This conflicts with `valueEncrypted`, `encryptedValue` & `plaintextValue`. */ readonly value: pulumi.Output; /** * Encrypted value of the secret using the GitHub public key in Base64 format, `keyId` is required with this value. This conflicts with `value`, `encryptedValue` & `plaintextValue`. */ readonly valueEncrypted: pulumi.Output; /** * Create a ActionsEnvironmentSecret resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ActionsEnvironmentSecretArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ActionsEnvironmentSecret resources. */ export interface ActionsEnvironmentSecretState { /** * Date the secret was created. */ createdAt?: pulumi.Input; /** * (Optional) Please use `valueEncrypted`. * * @deprecated Use valueEncrypted and key_id. */ encryptedValue?: pulumi.Input; /** * Name of the environment. */ environment?: pulumi.Input; /** * ID of the public key used to encrypt the secret, required when setting `encryptedValue`. */ keyId?: pulumi.Input; /** * (Optional) Please use `value`. * * > **Note**: One of either `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` must be specified. * * @deprecated Use value. */ plaintextValue?: pulumi.Input; /** * Date the secret was last updated in GitHub. */ remoteUpdatedAt?: pulumi.Input; /** * Name of the repository. */ repository?: pulumi.Input; /** * ID of the repository. */ repositoryId?: pulumi.Input; /** * Name of the secret. */ secretName?: pulumi.Input; /** * Date the secret was last updated by the provider. */ updatedAt?: pulumi.Input; /** * Plaintext value of the secret to be encrypted. This conflicts with `valueEncrypted`, `encryptedValue` & `plaintextValue`. */ value?: pulumi.Input; /** * Encrypted value of the secret using the GitHub public key in Base64 format, `keyId` is required with this value. This conflicts with `value`, `encryptedValue` & `plaintextValue`. */ valueEncrypted?: pulumi.Input; } /** * The set of arguments for constructing a ActionsEnvironmentSecret resource. */ export interface ActionsEnvironmentSecretArgs { /** * (Optional) Please use `valueEncrypted`. * * @deprecated Use valueEncrypted and key_id. */ encryptedValue?: pulumi.Input; /** * Name of the environment. */ environment: pulumi.Input; /** * ID of the public key used to encrypt the secret, required when setting `encryptedValue`. */ keyId?: pulumi.Input; /** * (Optional) Please use `value`. * * > **Note**: One of either `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` must be specified. * * @deprecated Use value. */ plaintextValue?: pulumi.Input; /** * Name of the repository. */ repository: pulumi.Input; /** * Name of the secret. */ secretName: pulumi.Input; /** * Plaintext value of the secret to be encrypted. This conflicts with `valueEncrypted`, `encryptedValue` & `plaintextValue`. */ value?: pulumi.Input; /** * Encrypted value of the secret using the GitHub public key in Base64 format, `keyId` is required with this value. This conflicts with `value`, `encryptedValue` & `plaintextValue`. */ valueEncrypted?: pulumi.Input; } //# sourceMappingURL=actionsEnvironmentSecret.d.ts.map