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

Manage SSH keys in a repo

Open EliiseS opened this issue 4 years ago • 2 comments


Migrated from https://github.com/microsoft/terraform-provider-azuredevops/issues/372 Originally created by @ams0 on Wed, 10 Jun 2020 12:03:36 GMT


Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

I want to be able to manage SSH keys for a user account (similar to deploy key for Github).

New or Affected Resource(s)

  • azuredevops_ssh_key

Potential Terraform Configuration


resource "tls_private_key" "ssh-key" {
  algorithm = "RSA"
  rsa_bits  = 4096
}

resource "azuredevops_ssh_key" "ssh-key" {
    name = "ssh-key"
    content = tls_private_key.ssh-key.public_key_openssh
}

References

This feature can come very handy when for example I want to add an SSH key generated for use by Flux controller when I use a repo in Azure DevOps for GitOps. See this example how I do it with Github provider.

  • #0000

Looks like the API is undocumented.

EliiseS avatar Jul 02 '20 14:07 EliiseS