ProjectPushRules

This resource allows you to create and manage push rules for your GitLab projects. For further information on push rules, consult the gitlab documentation.

Create a ProjectPushRules Resource

def ProjectPushRules(resource_name, opts=None, author_email_regex=None, branch_name_regex=None, commit_message_regex=None, deny_delete_tag=None, file_name_regex=None, max_file_size=None, member_check=None, prevent_secrets=None, project=None, __props__=None);
name string
The unique name of the resource.
args ProjectPushRulesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ProjectPushRulesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectPushRulesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProjectPushRules Resource Properties

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

Inputs

The ProjectPushRules resource accepts the following input properties:

Project string

The name or id of the project to add the push rules to.

AuthorEmailRegex string

All commit author emails must match this regex, e.g. “@my-company.com$”

BranchNameRegex string

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

CommitMessageRegex string

All commit messages must match this regex, e.g. “Fixed \d+..*”

DenyDeleteTag bool

Deny deleting a tag

FileNameRegex string

All commited filenames must not match this regex, e.g. “(jar|exe)$”

MaxFileSize int

Maximum file size (MB)

MemberCheck bool

Restrict commits by author (email) to existing GitLab users

PreventSecrets bool

GitLab will reject any files that are likely to contain secrets

Project string

The name or id of the project to add the push rules to.

AuthorEmailRegex string

All commit author emails must match this regex, e.g. “@my-company.com$”

BranchNameRegex string

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

CommitMessageRegex string

All commit messages must match this regex, e.g. “Fixed \d+..*”

DenyDeleteTag bool

Deny deleting a tag

FileNameRegex string

All commited filenames must not match this regex, e.g. “(jar|exe)$”

MaxFileSize int

Maximum file size (MB)

MemberCheck bool

Restrict commits by author (email) to existing GitLab users

PreventSecrets bool

GitLab will reject any files that are likely to contain secrets

project string

The name or id of the project to add the push rules to.

authorEmailRegex string

All commit author emails must match this regex, e.g. “@my-company.com$”

branchNameRegex string

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

commitMessageRegex string

All commit messages must match this regex, e.g. “Fixed \d+..*”

denyDeleteTag boolean

Deny deleting a tag

fileNameRegex string

All commited filenames must not match this regex, e.g. “(jar|exe)$”

maxFileSize number

Maximum file size (MB)

memberCheck boolean

Restrict commits by author (email) to existing GitLab users

preventSecrets boolean

GitLab will reject any files that are likely to contain secrets

project str

The name or id of the project to add the push rules to.

author_email_regex str

All commit author emails must match this regex, e.g. “@my-company.com$”

branch_name_regex str

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

commit_message_regex str

All commit messages must match this regex, e.g. “Fixed \d+..*”

deny_delete_tag bool

Deny deleting a tag

file_name_regex str

All commited filenames must not match this regex, e.g. “(jar|exe)$”

max_file_size float

Maximum file size (MB)

member_check bool

Restrict commits by author (email) to existing GitLab users

prevent_secrets bool

GitLab will reject any files that are likely to contain secrets

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectPushRules 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ProjectPushRules Resource

Get an existing ProjectPushRules 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?: ProjectPushRulesState, opts?: CustomResourceOptions): ProjectPushRules
static get(resource_name, id, opts=None, author_email_regex=None, branch_name_regex=None, commit_message_regex=None, deny_delete_tag=None, file_name_regex=None, max_file_size=None, member_check=None, prevent_secrets=None, project=None, __props__=None);
func GetProjectPushRules(ctx *Context, name string, id IDInput, state *ProjectPushRulesState, opts ...ResourceOption) (*ProjectPushRules, error)
public static ProjectPushRules Get(string name, Input<string> id, ProjectPushRulesState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AuthorEmailRegex string

All commit author emails must match this regex, e.g. “@my-company.com$”

BranchNameRegex string

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

CommitMessageRegex string

All commit messages must match this regex, e.g. “Fixed \d+..*”

DenyDeleteTag bool

Deny deleting a tag

FileNameRegex string

All commited filenames must not match this regex, e.g. “(jar|exe)$”

MaxFileSize int

Maximum file size (MB)

MemberCheck bool

Restrict commits by author (email) to existing GitLab users

PreventSecrets bool

GitLab will reject any files that are likely to contain secrets

Project string

The name or id of the project to add the push rules to.

AuthorEmailRegex string

All commit author emails must match this regex, e.g. “@my-company.com$”

BranchNameRegex string

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

CommitMessageRegex string

All commit messages must match this regex, e.g. “Fixed \d+..*”

DenyDeleteTag bool

Deny deleting a tag

FileNameRegex string

All commited filenames must not match this regex, e.g. “(jar|exe)$”

MaxFileSize int

Maximum file size (MB)

MemberCheck bool

Restrict commits by author (email) to existing GitLab users

PreventSecrets bool

GitLab will reject any files that are likely to contain secrets

Project string

The name or id of the project to add the push rules to.

authorEmailRegex string

All commit author emails must match this regex, e.g. “@my-company.com$”

branchNameRegex string

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

commitMessageRegex string

All commit messages must match this regex, e.g. “Fixed \d+..*”

denyDeleteTag boolean

Deny deleting a tag

fileNameRegex string

All commited filenames must not match this regex, e.g. “(jar|exe)$”

maxFileSize number

Maximum file size (MB)

memberCheck boolean

Restrict commits by author (email) to existing GitLab users

preventSecrets boolean

GitLab will reject any files that are likely to contain secrets

project string

The name or id of the project to add the push rules to.

author_email_regex str

All commit author emails must match this regex, e.g. “@my-company.com$”

branch_name_regex str

All branch names must match this regex, e.g. “(feature|hotfix)\/*”

commit_message_regex str

All commit messages must match this regex, e.g. “Fixed \d+..*”

deny_delete_tag bool

Deny deleting a tag

file_name_regex str

All commited filenames must not match this regex, e.g. “(jar|exe)$”

max_file_size float

Maximum file size (MB)

member_check bool

Restrict commits by author (email) to existing GitLab users

prevent_secrets bool

GitLab will reject any files that are likely to contain secrets

project str

The name or id of the project to add the push rules to.

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.