import * as pulumi from "@pulumi/pulumi"; /** * This resource allows you to create and manage GitHub Dependabot secrets within your GitHub repositories. * 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 Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const examplePlaintext = new github.DependabotSecret("example_plaintext", { * repository: "example_repository", * secretName: "example_secret_name", * value: someSecretString, * }); * const exampleEncrypted = new github.DependabotSecret("example_encrypted", { * repository: "example_repository", * secretName: "example_secret_name", * valueEncrypted: someEncryptedSecretString, * }); * ``` * * ## 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.DependabotSecret("example_allow_drift", { * repository: "example_repository", * secretName: "example_secret_name", * value: "placeholder", * }); * ``` * * ## Import * * This resource can be imported using an ID made of the repository name, and secret name 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 Dependabot secret named `mysecret` for the repo `myrepo` to a `github.DependabotSecret` resource named `example`. * * ```sh * $ pulumi import github:index/dependabotSecret:DependabotSecret example myrepo:mysecret * ``` */ export declare class DependabotSecret extends pulumi.CustomResource { /** * Get an existing DependabotSecret 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?: DependabotSecretState, opts?: pulumi.CustomResourceOptions): DependabotSecret; /** * Returns true if the given object is an instance of DependabotSecret. 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 DependabotSecret; /** * Date the secret was created. */ readonly createdAt: pulumi.Output; /** * (Optional) Please use `valueEncrypted`. * * @deprecated Use valueEncrypted and key_id. */ readonly encryptedValue: 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 DependabotSecret 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: DependabotSecretArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DependabotSecret resources. */ export interface DependabotSecretState { /** * Date the secret was created. */ createdAt?: pulumi.Input; /** * (Optional) Please use `valueEncrypted`. * * @deprecated Use valueEncrypted and key_id. */ encryptedValue?: 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 DependabotSecret resource. */ export interface DependabotSecretArgs { /** * (Optional) Please use `valueEncrypted`. * * @deprecated Use valueEncrypted and key_id. */ encryptedValue?: 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=dependabotSecret.d.ts.map