Skip to content

Missing required "Organization" field for GitHub OIDC configuration #213

@ram-devsecops

Description

@ram-devsecops

Describe the bug
When creating a GitHub OIDC configuration using the Terraform provider, I receive an error because the provider does not support the "Organization" field which is required by the JFrog API. The web UI shows this as a mandatory field when creating a GitHub OIDC configuration, but the Terraform provider doesn't have this field in its schema.
Requirements for and issue

  • A description of the bug: The Terraform provider is missing support for the required "Organization" field when creating GitHub OIDC configurations
  • A fully functioning terraform snippet that can be copy & pasted (no outside files or ENV vars unless that's part of the issue). If this is not supplied, this issue will likely be closed without any effort expended.
 resource "platform_oidc_configuration" "github-oidc-config" {
  name          = "github-oidc-configuration"
  description   = "GitHub OIDC configuration for CI/CD"
  issuer_url    = "https://token.actions.githubusercontent.com"
  provider_type = "GitHub"
  audience      = "jfrog-github"
  # There is no way to specify the required Organization field
}
  • Your version of Artifactory (you can curl it at $host/artifactory/api/system/version): latest
  • Is your Artifactory Cloud or Self-Hosted: Cloud
  • Your version of Terraform CLI: 1.7.3
  • Your version of Terraform provider: 2.2.1

Expected behavior
The provider should include support for the "Organization" field for GitHub OIDC configurations, which is shown as a required field in the JFrog UI. This would allow creating OIDC configurations for GitHub through Terraform without manual intervention.
Error

Error: Unable to Create Resource

  with module.oidc_configurations.platform_oidc_configuration.oidc_configs["github-oidc-configuration"],
  on ../oidc_configuration/main.tf line 10, in resource "platform_oidc_configuration" "oidc_configs":
  10: resource "platform_oidc_configuration" "oidc_configs" {

An unexpected error occurred while creating the resource update request.
Please report this issue to the provider developers.

Error: {
  "errors" : [ {
    "code" : "BAD_REQUEST",
    "message" : "oidc_setting Organization is not valid"
  } ]
}

Additional context
When creating a GitHub OIDC configuration through the JFrog UI, there is a mandatory field for "Organization" that doesn't exist in the Terraform provider schema. I've examined the provider's source code and confirmed that this field is not included in the oidcConfigurationAPIModel struct.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions