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 get bucket versioning #1266

Merged
merged 3 commits into from
Apr 14, 2020
Merged

Conversation

clook
Copy link
Contributor

@clook clook commented Apr 8, 2020

Implement GetBucketVersioning

Implement GetBucketVersioning returning a GetBucketVersioningConfiguration structure.
Add example for GetBucketVersioning
Add doc for GetBucketVersioning
@harshavardhana
Copy link
Member

what is the purpose of just adding GetBucketVersioning? @clook

@clook clook force-pushed the add-get-bucket-versioning branch from d9505b8 to b838ab0 Compare April 8, 2020 20:07
@clook
Copy link
Contributor Author

clook commented Apr 8, 2020

Hi @harshavardhana, the goal is to be able to get the versioning status of bucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).

Currently, I'm using https://github.com/aminueza/terraform-provider-minio which relies on minio-go but am unable to provision a bucket with versioning configuration. I could easily make a PR for https://github.com/aminueza/terraform-provider-minio if GetBucketVersioning is supported.

@harshavardhana
Copy link
Member

Currently, I'm using https://github.com/aminueza/terraform-provider-minio which relies on minio-go but am unable to provision a bucket with versioning configuration. I could easily make a PR for https://github.com/aminueza/terraform-provider-minio if GetBucketVersioning is supported.

@clook thanks for the explanation - it makes sense, but what is the pre-requisite of using bucket versioning with Terraform?

@clook
Copy link
Contributor Author

clook commented Apr 8, 2020

@clook thanks for the explanation - it makes sense, but what is the pre-requisite of using bucket versioning with Terraform?

@harshavardhana The pre-requesite for the Terrraform provider is to be able to compare the Terraform current known state with the real resource state and then guess if it has to apply DisableVersioning or EnableVersioning or not.
Without knowing the real resource state, we would be forced to update the resource even if no change is necessary.

@clook
Copy link
Contributor Author

clook commented Apr 8, 2020

Also tell me if you want some unit tests to be performed. Right now, I mostly templated over GetBucketEncryption and tested my branch with a PR on the actual Terraform provider.

@harshavardhana harshavardhana merged commit dea5375 into minio:master Apr 14, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants