jfrog / terraform-provider-platform

Terraform provider to manage JFrog Platform
https://jfrog.com
Apache License 2.0
1 stars 1 forks source link

Support for defining OIDC providers & Identity Mappings #29

Closed davidcorrigan714 closed 3 months ago

davidcorrigan714 commented 4 months ago

Is your feature request related to a problem? Please describe. I'm starting to explore how we can use the OIDC features with GitHub, Terraform Cloud & Azure DevOps. Would love to see those configurations available as Terraform resources.

Describe the solution you'd like Something like:

resource "artifactory_oidc_provider" "github" {
  name = "GitHub"
  type = "GitHub"
  description = "GitHub OIDC Provider"
  url = "https://token.actions.githubusercontent.com" # Maybe optional for GitHub?
  audience = "[artifactory](https://github.com/octo-org)"
}

resource "artifactory_oidc_identity_mapping" "my_repo" {
  oidc_provider_id = artifactory_oidc_provider.github.id
  priority = 100
  description = "Product A Main Pipelines"
  claims_json {
     "repository": "ni/product-a"
     "ref": "refs/heads/main"
  }
  scope = "group"
  scope_identifier = "role-ci-product-publishers"
  service = "artifactory"
  all_services = true
  token_expiration_minutes = 36000
}
alexhung commented 4 months ago

Dups of #26

davidcorrigan714 commented 4 months ago

Didn't realize there's 2 providers now.

alexhung commented 4 months ago

@davidcorrigan714 We have 5 in total 😄 https://registry.terraform.io/namespaces/jfrog

davidcorrigan714 commented 4 months ago

Oh of course, I've probably used the xray one too in our main config workspace and not realized it / forgotten about it.