import * as pulumi from "@pulumi/pulumi"; /** * This resource allows you to create and manage GitHub Dependabot secrets within your GitHub organization. * 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.DependabotOrganizationSecret("example_plaintext", { * secretName: "example_secret_name", * visibility: "all", * value: someSecretString, * }); * const exampleSecret = new github.DependabotOrganizationSecret("example_secret", { * secretName: "example_secret_name", * visibility: "all", * valueEncrypted: someEncryptedSecretString, * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const repo = github.getRepository({ * fullName: "my-org/repo", * }); * const examplePlaintext = new github.DependabotOrganizationSecret("example_plaintext", { * secretName: "example_secret_name", * visibility: "selected", * value: someSecretString, * selectedRepositoryIds: [repo.then(repo => repo.repoId)], * }); * const exampleEncrypted = new github.DependabotOrganizationSecret("example_encrypted", { * secretName: "example_secret_name", * visibility: "selected", * valueEncrypted: someEncryptedSecretString, * selectedRepositoryIds: [repo.then(repo => repo.repoId)], * }); * ``` * * ### Import Command * * The following command imports a GitHub Dependabot organization secret named `mysecret` to a `github.DependabotOrganizationSecret` resource named `example`. * * ```sh * $ pulumi import github:index/dependabotOrganizationSecret:DependabotOrganizationSecret example mysecret * ``` */ export declare class DependabotOrganizationSecret extends pulumi.CustomResource { /** * Get an existing DependabotOrganizationSecret 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?: DependabotOrganizationSecretState, opts?: pulumi.CustomResourceOptions): DependabotOrganizationSecret; /** * Returns true if the given object is an instance of DependabotOrganizationSecret. 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 DependabotOrganizationSecret; /** * 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`. * * @deprecated Use value. */ readonly plaintextValue: pulumi.Output; /** * Date the secret was last updated in GitHub. */ readonly remoteUpdatedAt: pulumi.Output; /** * Name of the secret. */ readonly secretName: pulumi.Output; /** * An array of repository IDs that can access the organization variable; this requires `visibility` to be set to `selected`. * * > **Note**: One of either `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` must be specified. * * @deprecated This field is deprecated and will be removed in a future release. Please use the `github.DependabotOrganizationSecretRepositories` or `github.DependabotOrganizationSecretRepository` resources to manage repository access to organization secrets. */ readonly selectedRepositoryIds: 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; /** * Configures the access that repositories have to the organization secret; must be one of `all`, `private`, or `selected`. */ readonly visibility: pulumi.Output; /** * Create a DependabotOrganizationSecret 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: DependabotOrganizationSecretArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DependabotOrganizationSecret resources. */ export interface DependabotOrganizationSecretState { /** * 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`. * * @deprecated Use value. */ plaintextValue?: pulumi.Input; /** * Date the secret was last updated in GitHub. */ remoteUpdatedAt?: pulumi.Input; /** * Name of the secret. */ secretName?: pulumi.Input; /** * An array of repository IDs that can access the organization variable; this requires `visibility` to be set to `selected`. * * > **Note**: One of either `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` must be specified. * * @deprecated This field is deprecated and will be removed in a future release. Please use the `github.DependabotOrganizationSecretRepositories` or `github.DependabotOrganizationSecretRepository` resources to manage repository access to organization secrets. */ selectedRepositoryIds?: pulumi.Input[] | undefined>; /** * 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; /** * Configures the access that repositories have to the organization secret; must be one of `all`, `private`, or `selected`. */ visibility?: pulumi.Input; } /** * The set of arguments for constructing a DependabotOrganizationSecret resource. */ export interface DependabotOrganizationSecretArgs { /** * (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`. * * @deprecated Use value. */ plaintextValue?: pulumi.Input; /** * Name of the secret. */ secretName: pulumi.Input; /** * An array of repository IDs that can access the organization variable; this requires `visibility` to be set to `selected`. * * > **Note**: One of either `value`, `valueEncrypted`, `encryptedValue`, or `plaintextValue` must be specified. * * @deprecated This field is deprecated and will be removed in a future release. Please use the `github.DependabotOrganizationSecretRepositories` or `github.DependabotOrganizationSecretRepository` resources to manage repository access to organization secrets. */ selectedRepositoryIds?: pulumi.Input[] | undefined>; /** * 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; /** * Configures the access that repositories have to the organization secret; must be one of `all`, `private`, or `selected`. */ visibility: pulumi.Input; } //# sourceMappingURL=dependabotOrganizationSecret.d.ts.map