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

Identity of the apikey created in prereq #457

Open
in-1911 opened this issue Jul 30, 2024 · 1 comment
Open

Identity of the apikey created in prereq #457

in-1911 opened this issue Jul 30, 2024 · 1 comment

Comments

@in-1911
Copy link

in-1911 commented Jul 30, 2024

When using the module with create_ibmcloud_api_key = true, the new apikey always assumes the identity of the credentials used to run the terraform. In a context of Cloud Project that may lead to unintended results, especially when using trusted profiles authorization.

payload = (var.iam_api_key_secret == "") ? ibm_iam_api_key.iam_api_key[0].apikey : var.iam_api_key_secret

The credentials / identity designated for the pipelines may need to be different from the one used to deploy the ALM components.

It would be helpful if the user can supply a combination of parameters to use one of the following options:

  • A service ID that the new apikey should be generated for.
  • A literal value of the apikey (separate form the one used for deployment or provider configuration). E.g. Cloud Projects can reference a secret in a secrets manager, which would be resolved to the secret value when validating / deploying. The prereq module seems to have a parameter for that but it's not exposed at the top level.
  • A new apikey for the identity used with the provider (current behavior)
@padraic-edwards
Copy link
Contributor

Will consider including additional variables to parameterize the creation of the API key for use in the pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants