-
Notifications
You must be signed in to change notification settings - Fork 7
Description
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
curlit 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.