import * as pulumi from "@pulumi/pulumi"; /** * This resource allows you to manage GitHub Actions workflow permissions for a GitHub Enterprise account. This controls the default permissions granted to the GITHUB_TOKEN when running workflows and whether GitHub Actions can approve pull request reviews. * * You must have enterprise admin access to use this resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * // Basic workflow permissions configuration * const example = new github.EnterpriseActionsWorkflowPermissions("example", { * enterpriseSlug: "my-enterprise", * defaultWorkflowPermissions: "read", * canApprovePullRequestReviews: false, * }); * // Allow write permissions and PR approvals * const permissive = new github.EnterpriseActionsWorkflowPermissions("permissive", { * enterpriseSlug: "my-enterprise", * defaultWorkflowPermissions: "write", * canApprovePullRequestReviews: true, * }); * ``` * * ## Notes * * > **Note:** This resource requires a GitHub Enterprise account and enterprise admin permissions. * * When this resource is destroyed, the workflow permissions will be reset to safe defaults: * - `defaultWorkflowPermissions` = `read` * - `canApprovePullRequestReviews` = `false` * * ## Import * * Enterprise Actions workflow permissions can be imported using the enterprise slug: * * ```sh * $ pulumi import github:index/enterpriseActionsWorkflowPermissions:EnterpriseActionsWorkflowPermissions example my-enterprise * ``` */ export declare class EnterpriseActionsWorkflowPermissions extends pulumi.CustomResource { /** * Get an existing EnterpriseActionsWorkflowPermissions 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?: EnterpriseActionsWorkflowPermissionsState, opts?: pulumi.CustomResourceOptions): EnterpriseActionsWorkflowPermissions; /** * Returns true if the given object is an instance of EnterpriseActionsWorkflowPermissions. 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 EnterpriseActionsWorkflowPermissions; /** * Whether GitHub Actions can approve pull request reviews. Defaults to `false`. */ readonly canApprovePullRequestReviews: pulumi.Output; /** * The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be `read` or `write`. Defaults to `read`. */ readonly defaultWorkflowPermissions: pulumi.Output; /** * The slug of the enterprise. */ readonly enterpriseSlug: pulumi.Output; /** * Create a EnterpriseActionsWorkflowPermissions 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: EnterpriseActionsWorkflowPermissionsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EnterpriseActionsWorkflowPermissions resources. */ export interface EnterpriseActionsWorkflowPermissionsState { /** * Whether GitHub Actions can approve pull request reviews. Defaults to `false`. */ canApprovePullRequestReviews?: pulumi.Input; /** * The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be `read` or `write`. Defaults to `read`. */ defaultWorkflowPermissions?: pulumi.Input; /** * The slug of the enterprise. */ enterpriseSlug?: pulumi.Input; } /** * The set of arguments for constructing a EnterpriseActionsWorkflowPermissions resource. */ export interface EnterpriseActionsWorkflowPermissionsArgs { /** * Whether GitHub Actions can approve pull request reviews. Defaults to `false`. */ canApprovePullRequestReviews?: pulumi.Input; /** * The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be `read` or `write`. Defaults to `read`. */ defaultWorkflowPermissions?: pulumi.Input; /** * The slug of the enterprise. */ enterpriseSlug: pulumi.Input; } //# sourceMappingURL=enterpriseActionsWorkflowPermissions.d.ts.map