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

Enable null api_token provider configuration #1798

Open
1 task
Conflit-de-Bus opened this issue Jul 31, 2024 · 1 comment
Open
1 task

Enable null api_token provider configuration #1798

Conflit-de-Bus opened this issue Jul 31, 2024 · 1 comment
Labels
customer request Reported by a customer, but opened by Aiven staff enhancement New feature or request

Comments

@Conflit-de-Bus
Copy link

What is currently missing?

The Aiven provider can not be initialized with null values for the api_token value.

This can cause problems, especially since the addition of application users to Aiven in april.

In our Terraform stacks, we can get application user credentials from another in-house provider. However, because these are created with a resource, they are evaluated after the initialization phase of the provider. Not being able to initialize the provider with a null api_token means a Terraform stack using this principle needs to have its configuration changed after the credentials are generated, to add the Aiven resources after the fact.

If such an operation is attempted now, the following message is returned by the Aiven provider during the terraform plan:

│ Error: token is required for Aiven client
│ 
│   with provider["registry.terraform.io/aiven/aiven"],

Which I guess comes from this part:

return nil, fmt.Errorf("token is required for Aiven client")

How could this be improved?

This could be improved if the provider accepted null (or placeholder) values in its initialization phase.

Is this a feature you would work on yourself?

  • I plan to open a pull request for this feature.
@byashimov byashimov added enhancement New feature or request customer request Reported by a customer, but opened by Aiven staff labels Nov 8, 2024
@byashimov
Copy link
Contributor

Hey!
Could you share a bit more about how you’re using (or planning to use) the Aiven provider? And how would you like to handle passing the token to the provider within your workflow?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer request Reported by a customer, but opened by Aiven staff enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants