terraform-provider-gitlab icon indicating copy to clipboard operation
terraform-provider-gitlab copied to clipboard

project commit resource

Open lukegriffith opened this issue 4 years ago • 5 comments

As template repositories are an EE only feature, it would be handy to be able to IAC my repository templates. Having a commit resource that can be used on a project would enable me to template my repositories as code.

Looking for guidance on this, can happily implement myself too.

API provides a commit action. https://docs.gitlab.com/ee/api/commits.html#create-a-commit-with-multiple-files-and-actions

and is implemented in the underlying go-gitlab library. https://github.com/xanzy/go-gitlab/blob/16ee0e484c173ddb8da2e798f2a3db0f7b34856e/commits.go#L217

lukegriffith avatar Jan 06 '20 10:01 lukegriffith

Template projects are available in GitLab hosted, it would be nice to see something like this supported in the terraform provider.

barundel avatar Feb 18 '20 12:02 barundel

What would you expect the DELETE operation to do? Should it create a revert?

armsnyder avatar Jul 19 '20 06:07 armsnyder

@barundel as an fyi there is an issue and an open PR for templates #333

Let's keep this issue open for discussion a potential project commit resource.

armsnyder avatar Sep 13 '20 01:09 armsnyder

@armsnyder & @timofurrer Can we close this based on #333, #927 and the PR https://github.com/gitlabhq/terraform-provider-gitlab/pull/724 being done?

Shocktrooper avatar Mar 20 '22 17:03 Shocktrooper

Yes, I assume @lukegriffith that would solve your problem, right?

timofurrer avatar Mar 20 '22 18:03 timofurrer

Because there wasn't any update on this issue and the problem statement can most likely be solved with the gitlab_repository_file resource I'm taking the liberty to close this issue. Please create a new one if this is still something people would want to see. I'd also be curious about the ideas for all the CRUD functions of a commit.

timofurrer avatar Aug 27 '22 11:08 timofurrer