Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added output structure to hold oidc token verifier output data. #12540

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dekiel
Copy link
Contributor

@dekiel dekiel commented Jan 10, 2025

Added methods to set the values in output struct and method to write the value as json file. Added supporting cli flag, interface, mocks and tests.

Description

Added type and methods to separate providing an output data from the tool and logs. The output data will be written to the json file. This let a tool caller read a file content and make further decisions based on provided data.

Added ClientID to the output data. This is needed to let us customise an image building process based on calling client. At present this will be used to influence building process for SRE client until it will get a full certification.

Changes proposed in this pull request:

  • Added output struct to hold oidc token verifier output data.
  • Added output methods to set GitHub URL and Client ID fields values.
  • Added output method to write output data to json file.
  • Added clientID to the output data.
  • Updated main function to set the output values and write a file after the token is successfully verified.

Added methods to set the values in output struct and method to write the value as json file.
Added supporting cli flag, interface, mocks and tests.
@kyma-bot kyma-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cla: yes Indicates the PR's author has signed the CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 10, 2025
@dekiel
Copy link
Contributor Author

dekiel commented Jan 10, 2025

The #12530 must be merged first as it's providing Issuer.ClientID implementation.

@kyma-bot
Copy link
Contributor

kyma-bot commented Jan 10, 2025

Plan Result

CI link

Only Outputs will be changed.
Change Result (Click me)
Changes to Outputs:
  ~ artifact_registry                              = {
      ~ modules-internal = {
          ~ artifact_registry_collection = {
                id                        = "projects/kyma-project/locations/europe/repositories/modules-internal"
                name                      = "modules-internal"
              ~ update_time               = "2025-01-10T06:54:38.932007Z" -> "2025-01-10T12:30:53.798760Z"
                # (18 unchanged attributes hidden)
            }
        }
    }

You can apply this plan to save these new output values to the OpenTofu
state, without changing any real infrastructure.
ℹ️ Objects have changed outside of Terraform

This feature was introduced from Terraform v0.15.4.

OpenTofu detected the following changes made outside of OpenTofu since the
last "tofu apply" which may have affected this plan:

  # module.artifact_registry["modules-internal"].google_artifact_registry_repository.artifact_registry has changed
  ~ resource "google_artifact_registry_repository" "artifact_registry" {
        id                     = "projects/kyma-project/locations/europe/repositories/modules-internal"
        name                   = "modules-internal"
      ~ update_time            = "2025-01-10T06:54:38.932007Z" -> "2025-01-10T12:30:53.798760Z"
        # (11 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the

@dekiel dekiel marked this pull request as ready for review January 10, 2025 10:58
@dekiel dekiel requested review from neighbors-dev-bot and a team as code owners January 10, 2025 10:58
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 10, 2025
@dekiel dekiel added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-or-update cla: yes Indicates the PR's author has signed the CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants