GitHub

Pulumi Official
Package maintained by Pulumi
v4.11.0 published on Wednesday, Apr 6, 2022 by Pulumi

ActionsOrganizationPermissions

This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise organizations. You must have admin access to an organization to use this resource.

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Github.Repository("example", new Github.RepositoryArgs
        {
        });
        var test = new Github.ActionsOrganizationPermissions("test", new Github.ActionsOrganizationPermissionsArgs
        {
            AllowedActions = "selected",
            EnabledRepositories = "selected",
            AllowedActionsConfig = new Github.Inputs.ActionsOrganizationPermissionsAllowedActionsConfigArgs
            {
                GithubOwnedAllowed = true,
                PatternsAlloweds = 
                {
                    "actions/cache@*",
                    "actions/checkout@*",
                },
                VerifiedAllowed = true,
            },
            EnabledRepositoriesConfig = new Github.Inputs.ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs
            {
                RepositoryIds = 
                {
                    example.RepoId,
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-github/sdk/v4/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := github.NewRepository(ctx, "example", nil)
		if err != nil {
			return err
		}
		_, err = github.NewActionsOrganizationPermissions(ctx, "test", &github.ActionsOrganizationPermissionsArgs{
			AllowedActions:      pulumi.String("selected"),
			EnabledRepositories: pulumi.String("selected"),
			AllowedActionsConfig: &ActionsOrganizationPermissionsAllowedActionsConfigArgs{
				GithubOwnedAllowed: pulumi.Bool(true),
				PatternsAlloweds: pulumi.StringArray{
					pulumi.String("actions/cache@*"),
					pulumi.String("actions/checkout@*"),
				},
				VerifiedAllowed: pulumi.Bool(true),
			},
			EnabledRepositoriesConfig: &ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs{
				RepositoryIds: pulumi.IntArray{
					example.RepoId,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_github as github

example = github.Repository("example")
test = github.ActionsOrganizationPermissions("test",
    allowed_actions="selected",
    enabled_repositories="selected",
    allowed_actions_config=github.ActionsOrganizationPermissionsAllowedActionsConfigArgs(
        github_owned_allowed=True,
        patterns_alloweds=[
            "actions/cache@*",
            "actions/checkout@*",
        ],
        verified_allowed=True,
    ),
    enabled_repositories_config=github.ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs(
        repository_ids=[example.repo_id],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const example = new github.Repository("example", {});
const test = new github.ActionsOrganizationPermissions("test", {
    allowedActions: "selected",
    enabledRepositories: "selected",
    allowedActionsConfig: {
        githubOwnedAllowed: true,
        patternsAlloweds: [
            "actions/cache@*",
            "actions/checkout@*",
        ],
        verifiedAllowed: true,
    },
    enabledRepositoriesConfig: {
        repositoryIds: [example.repoId],
    },
});

Coming soon!

Create a ActionsOrganizationPermissions Resource

new ActionsOrganizationPermissions(name: string, args: ActionsOrganizationPermissionsArgs, opts?: CustomResourceOptions);
@overload
def ActionsOrganizationPermissions(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   allowed_actions: Optional[str] = None,
                                   allowed_actions_config: Optional[ActionsOrganizationPermissionsAllowedActionsConfigArgs] = None,
                                   enabled_repositories: Optional[str] = None,
                                   enabled_repositories_config: Optional[ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs] = None)
@overload
def ActionsOrganizationPermissions(resource_name: str,
                                   args: ActionsOrganizationPermissionsArgs,
                                   opts: Optional[ResourceOptions] = None)
func NewActionsOrganizationPermissions(ctx *Context, name string, args ActionsOrganizationPermissionsArgs, opts ...ResourceOption) (*ActionsOrganizationPermissions, error)
public ActionsOrganizationPermissions(string name, ActionsOrganizationPermissionsArgs args, CustomResourceOptions? opts = null)
public ActionsOrganizationPermissions(String name, ActionsOrganizationPermissionsArgs args)
public ActionsOrganizationPermissions(String name, ActionsOrganizationPermissionsArgs args, CustomResourceOptions options)
type: github:ActionsOrganizationPermissions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

ActionsOrganizationPermissions Resource Properties

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

Inputs

The ActionsOrganizationPermissions resource accepts the following input properties:

EnabledRepositories string

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

AllowedActions string

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

AllowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

EnabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

EnabledRepositories string

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

AllowedActions string

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

AllowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

EnabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

enabledRepositories String

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

allowedActions String

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

enabledRepositories string

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

allowedActions string

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

enabled_repositories str

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

allowed_actions str

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowed_actions_config ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabled_repositories_config ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

enabledRepositories String

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

allowedActions String

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowedActionsConfig Property Map

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabledRepositoriesConfig Property Map

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing ActionsOrganizationPermissions Resource

Get an existing ActionsOrganizationPermissions 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?: ActionsOrganizationPermissionsState, opts?: CustomResourceOptions): ActionsOrganizationPermissions
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allowed_actions: Optional[str] = None,
        allowed_actions_config: Optional[ActionsOrganizationPermissionsAllowedActionsConfigArgs] = None,
        enabled_repositories: Optional[str] = None,
        enabled_repositories_config: Optional[ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs] = None) -> ActionsOrganizationPermissions
func GetActionsOrganizationPermissions(ctx *Context, name string, id IDInput, state *ActionsOrganizationPermissionsState, opts ...ResourceOption) (*ActionsOrganizationPermissions, error)
public static ActionsOrganizationPermissions Get(string name, Input<string> id, ActionsOrganizationPermissionsState? state, CustomResourceOptions? opts = null)
public static ActionsOrganizationPermissions get(String name, Output<String> id, ActionsOrganizationPermissionsState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:
AllowedActions string

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

AllowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

EnabledRepositories string

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

EnabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

AllowedActions string

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

AllowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

EnabledRepositories string

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

EnabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

allowedActions String

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabledRepositories String

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

enabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

allowedActions string

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowedActionsConfig ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabledRepositories string

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

enabledRepositoriesConfig ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

allowed_actions str

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowed_actions_config ActionsOrganizationPermissionsAllowedActionsConfigArgs

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabled_repositories str

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

enabled_repositories_config ActionsOrganizationPermissionsEnabledRepositoriesConfigArgs

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

allowedActions String

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

allowedActionsConfig Property Map

Sets the actions that are allowed in an organization. Only available when allowed_actions = selected. See Allowed Actions Config below for details.

enabledRepositories String

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

enabledRepositoriesConfig Property Map

Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when enabled_repositories = selected. See Enabled Repositories Config below for details.

Supporting Types

ActionsOrganizationPermissionsAllowedActionsConfig

GithubOwnedAllowed bool

Whether GitHub-owned actions are allowed in the organization.

PatternsAlloweds List<string>

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@, monalisa/octocat@v2, monalisa/."

VerifiedAllowed bool

Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.

GithubOwnedAllowed bool

Whether GitHub-owned actions are allowed in the organization.

PatternsAlloweds []string

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@, monalisa/octocat@v2, monalisa/."

VerifiedAllowed bool

Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.

githubOwnedAllowed Boolean

Whether GitHub-owned actions are allowed in the organization.

patternsAlloweds List<String>

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@, monalisa/octocat@v2, monalisa/."

verifiedAllowed Boolean

Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.

githubOwnedAllowed boolean

Whether GitHub-owned actions are allowed in the organization.

patternsAlloweds string[]

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@, monalisa/octocat@v2, monalisa/."

verifiedAllowed boolean

Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.

github_owned_allowed bool

Whether GitHub-owned actions are allowed in the organization.

patterns_alloweds Sequence[str]

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@, monalisa/octocat@v2, monalisa/."

verified_allowed bool

Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.

githubOwnedAllowed Boolean

Whether GitHub-owned actions are allowed in the organization.

patternsAlloweds List<String>

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@, monalisa/octocat@v2, monalisa/."

verifiedAllowed Boolean

Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators.

ActionsOrganizationPermissionsEnabledRepositoriesConfig

RepositoryIds List<int>

List of repository IDs to enable for GitHub Actions.

RepositoryIds []int

List of repository IDs to enable for GitHub Actions.

repositoryIds List<Integer>

List of repository IDs to enable for GitHub Actions.

repositoryIds number[]

List of repository IDs to enable for GitHub Actions.

repository_ids Sequence[int]

List of repository IDs to enable for GitHub Actions.

repositoryIds List<Number>

List of repository IDs to enable for GitHub Actions.

Import

This resource can be imported using the ID of the GitHub organization

 $ pulumi import github:index/actionsOrganizationPermissions:ActionsOrganizationPermissions test <github_organization_name>

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes

This Pulumi package is based on the github Terraform Provider.