Skip to content

create 'gitlab_project_push_rules' to allow management of rules outside of project configration

New Resource

spawned from #6189

i'd like a resource that allows me to configure push rules of a repository independent of the gitlab_project resource. we want to create another long lived branch at the time the project is created. this fails when push rules are enabled b/c the long live branch does not match the specified pattern.

having a separate resource to manage this would allow me to create the project and the additional branch and then configure the rules after that has been created.

i can work around this issue by including the additional branch name in the regexp rule but that's not ideal.

  gitlab_project_push_rules {
    project              = "gitlab/project" (or id?)
    branch_name_regex    = "pattern"
    commit_message_regex = "patterh"
  }

Related GitLab APIs

API documentation: https://docs.gitlab.com/ee/api/projects.html

Additional Details

Edited by Jae Gangemi