Files
opentf/website/source/docs/providers/gitlab/r/deploy_key.html.markdown
Richard Clamp 395f1d5bbf provider/gitlab: add gitlab_deploy_key (#14734)
* provider/gitlab: add `gitlab_deploy_key`

Here we extend the gitlab provider further by adding a `gitlab_deploy_key`
resource.  This resource allows management of a projects deploy
keys.

* provider/gitlab: Do not test `gitlab_deploy_key` `can_push`

Here we remove the testing of the `can_push` attribute.  This makes the
tests less comprehensive, but will allow them to work with the current
release of gitlab-ce.

This change is staged as a distinct commit so it can be easily
dropped/reverted once gitlab MR !11607 has reached a released state.

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11607

* provider/gitlab: Update docs for gitlab_deploy_key/can_push

Note that the can_push attribute of gitlab_deploy_key doesn't currently
work.  This note can be removed once
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11607 is merged
and in general circulation.
2017-05-24 11:41:40 +01:00

910 B

layout: "gitlab" page_title: "GitLab: gitlab_deploy_key" sidebar_current: "docs-gitlab-resource-deploy_key" description: |- Creates and manages deploy keys for GitLab projects

gitlab_deploy_key

This resource allows you to create and manage deploy keys for your GitLab projects.

Example Usage

resource "gitlab_deploy_key" "example" {
  project = "example/deploying"
  title   = "Example deploy key"
  key     = "ssh-rsa AAAA..."
}

Argument Reference

The following arguments are supported:

  • project - (Required, string) The name or id of the project to add the deploy key to.

  • title - (Required, string) A title to describe the deploy key with.

  • key - (Required, string) The public ssh key body.

  • can_push - (Optional, boolean) Allow this deploy key to be used to push changes to the project. Defaults to false. NOTE:: this cannot currently be managed.