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

Add support for minio_cacert_file (as seen in the code, but not used) #244

Closed
lowlevl opened this issue May 24, 2022 · 5 comments · Fixed by #433
Closed

Add support for minio_cacert_file (as seen in the code, but not used) #244

lowlevl opened this issue May 24, 2022 · 5 comments · Fixed by #433
Assignees
Labels
bug Something isn't working

Comments

@lowlevl
Copy link

lowlevl commented May 24, 2022

Description

I'd like to be able to connect to my MinIO instance which is hosted with a self-signed CA, and I've seen that it was set up in the provider.go file, so arguments are accepted but not interpreted.

Steps to Reproduce

  1. Add minio_cacert_file to your provider "minio" { ... } block
  2. Use terraform apply

Expected behavior:

  • Either an error should pop out
  • or the parameter should be interpreted

Actual behavior:

Nothing, no error, and no effect.

Reproduces how often: 100%

Versions

Latest (1.5.2)

Additional information

If you want, I can look into this to make it work and document it.

@lowlevl
Copy link
Author

lowlevl commented May 24, 2022

Update: from what I see in https://github.com/aminueza/terraform-provider-minio/blob/master/minio/check_config.go#L43, there is a misconfiguration and it does not use the minio_cacert_file variable and uses minio_cert_file instead.

A patch like this will fix the issue in my opinion but will be a breaking change

-		S3SSLCACertFile: d.Get("minio_cert_file").(string),
+ 		S3SSLCACertFile: d.Get("minio_cacert_file").(string),

@BuJo
Copy link
Collaborator

BuJo commented May 26, 2022

Oh, I might have misimplemented something there... Unsure why I hadn't found that in my testing.. it may have collided with something at work..
The feature is quite new, I'm quite sure no people are depending on that exact behaviour. Go ahead and make a pull request with that change, I'll take care of merging it.

@lowlevl
Copy link
Author

lowlevl commented May 31, 2022

Hello again @BuJo, I did not find cool documentation on how to test a provider locally to confirm that what I did worked, do you have any resource/advice on how to do it easily ?

Thanks.

@BuJo
Copy link
Collaborator

BuJo commented Jun 1, 2022

@nuRRL Sorry for the delay. Well, you can install the terraform module locally and use that one. See

for the right task command.
I found that manually setting the version beforehand to something slightly higher each time before installing the module locally leads to a quite ok testing workflow.

The "premium" test would of course be to add a self-signed certificate to the minio started via docker compose. But I shied away from that due to having not enough time to properly integrate that. I don't have a self-signed instance anymore at work, so I simply failed to test it properly. So you testing that manually is ok for me!

@lowlevl
Copy link
Author

lowlevl commented Jun 1, 2022

Thanks :) No worries for the delay.

I have one with a locally-signed certificate (with a CA) to test this, so I'll try it out :)
Thanks for the advices on installing the provider locally, that's what I was missing !

@BuJo BuJo added the bug Something isn't working label Aug 10, 2022
BuJo added a commit that referenced this issue Aug 11, 2022
BuJo added a commit that referenced this issue Aug 11, 2022
BuJo added a commit that referenced this issue Aug 11, 2022
BuJo added a commit that referenced this issue Aug 19, 2022
BuJo added a commit that referenced this issue Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants