Skip to content

dhoppeIT/terraform-gitlab-user_sshkey

Repository files navigation

terraform-gitlab-user_sshkey

Terraform module to manage the following Twingate resources:

  • gitlab_user_sshkey

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "gitlab_user" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-user/local"
  version = "1.2.0"

  name     = "John Doe"
  username = "jdoe"
  password = "XKvhCJp9MtwTgwRu" # gitleaks:allow
  email    = "[email protected]"
}

module "gitlab_user_sshkey" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-user-sshkey/local"
  version = "1.0.0"

  key   = file("${path.module}/id_ed25519.pub")
  title = "example-key"

  user_id = module.gitlab_user.id
}

Requirements

Name Version
terraform >= 1.0
gitlab ~> 18.0

Providers

Name Version
gitlab ~> 18.0

Modules

No modules.

Resources

Name Type
gitlab_user_sshkey.this resource

Inputs

Name Description Type Default Required
expires_at The expiration date of the SSH key in ISO 8601 format string null no
key The ssh key string n/a yes
title The title of the ssh key string n/a yes
user_id The ID or username of the user number null no

Outputs

Name Description
created_at The time when this key was created in GitLab
id The ID of this resource
key_id The ID of the SSH key

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.