-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
GCS Soft Delete Announcement / Terraform interaction #17127
GCS Soft Delete Announcement / Terraform interaction #17127
Comments
Thanks @joe-a-t for taking time to submit your questions and for opening this ticket. Seeing as this feature has not been launched officially, I will answer the questions I can with the knowledge I have now, and I will also be forwarding this ticket to the service team so they can provide their input.
With the soft-delete feature being launched for GCS, I do not think we anticipate any significant changes to how Terraform handles deletion of these resources. Terraform should still be able to delete an object or bucket with a soft-delete policy enabled (which is the default setting). This means that running
I think it depends heavily on how the API handles this scenario. Terraform will generate
This also depends heavily on the implementation details of the feature at the backend. Based on the information I have now, it seems that even with
No, we do not plan to set a client-side default for the soft delete retention period.
Once the feature has been rolled out, Terraform Google Provider will honor the service-side default for the retention period. Soft-delete period related fields will need to be implemented in the providers to support customizing soft delete settings via Terraform after the API supports it. |
I think there is some confusion here? As far as I understand it, all of the relevant service side APIs exist today and you can test the exact performance of the proposed change today by explicitly setting a retention policy of 7 days on a bucket via a retention_policy. The contents of the announcement is not as much a new feature as a change of the default value. |
My understanding is that the Soft Delete feature is different from the current The current one is to ensure that the objects cannot be deleted at all until they reach the retention period specified. Before that, attempts to delete the objects will result in a failed deletion with the The soft delete feature is, if enabled, after the object is deleted successfully, it goes into the soft-deleted state ("Soft-deleted objects are special non-readable objects that are hidden from object listings unless a specific option is specified"), with the capability to be restored until the retention ends, according to the soft delete announcement. The soft delete retention period means how long the object will be retained in the soft-deleted state before it's permanently deleted. |
Yeah, I think the normal retention policy is only for the "LIVE" version of an object since it's not compatible with object versioning. This new soft delete thing seems like it is basically a retention policy on "ARCHIVED" versions? It's definitely weird that it is disabled via reusing the existing retention policy arguments if it behaves differently than retention policy currently does. So I guess it is super unclear if these soft deleted objects will behave in the same way as "ARCHIVED" versions of objects when it comes to using Terraform to delete a bucket with
if you try to delete a bucket that does not have any "LIVE" objects but does have some "ARCHIVED" objects. And there are a couple of possible ways I could see this being handled like:
Of these options, And it sounds like for any information on how this would function, we are stuck waiting on the Google service team to provide feedback on how their changes will affect the relevant APIs and if those API changes result in any kinds of changes on the Terraform Provider side. |
Changed the label to Note to the service team: This particular ticket is not a bug but rather a question. We're classifying it as such to ensure proper forwarding, as our internal system does not have a corresponding ticket type. We’d like to invite the service team to provide insight on the upcoming soft deletion feature in GCS and its impact on current Terraform users, specifically whether it will affect the current Terraform deletion process. In Terraform Google Provider, bucket deletion method offers an option To better understand the potential impact for bucket deletion in Terraform, the more specific questions are:
Additionally, it seems that soft deletion will be enabled by default for both existing and new buckets/objects. Please be aware that this means users won't be able to turn off soft-deletion via Terraform until the feature is implemented into the terraform providers as well. |
Hi @joe-a-t , @shuyama1. In response to above discussion thread, I like to highlight some technical aspects of upcoming soft delete feature.
Let me know if it answer the questions or something is missing! |
@kautikdk Thank you. Can you please get this information clarified on https://cloud.google.com/resources/storage/soft-delete-announce?hl=en? In particular, Additionally, it would be helpful if the |
@joe-a-t Sure, These information will be clarified on documentation. More technical details will be available at launch time which is in near future. In the above documentation it refers to soft delete retention period. Generally Soft delete terraform support will be implemented as a new block as new terraform fields should mirror the API’s structure to ease predictability and maintenance. Inside that block there will be one field which can be used to specify soft delete duration in seconds. I will redirect your feedback regarding naming to appropriate team. Regarding Thank you for your valuable feedback and views! |
So in the announcement, March was mentioned as the launch. @kautikdk any status update on this feature, and when this feature is coming to terraform would be great. |
Hi @NissesSenap, Terraform support will be provided after full GA of the feature but It will be before promotional time ends mentioned in the announcement which is May 31, 2024. |
To be honest, @kautikdk , that don't sit too good with me and I will reach out to our sales contacts to discuss this. GCP are doing a big change in its API and you are giving us very limited timeframe to adjust to that. In short, the quicker this can be implemented so we as your customers can start to try this the better. And we would be very grateful if this can be solved as quickly as possible. |
Backport hashicorp/terraform-provider-google-beta#7119 Adds support for Soft Delete feature, which allows setting soft delete policy on 'google_storage_bucket' resource. This fixes hashicorp/terraform-provider-google#17127 storage: added 'soft_delete_policy' to 'google_storage_bucket' resource Derived from GoogleCloudPlatform/magic-modules#10171
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
I just saw https://cloud.google.com/resources/storage/soft-delete-announce?hl=en and this raised a lot of questions about how Terraform will interact with deleting both objects and buckets once soft delete is enabled by default by GCP. Can provider maintainers please weigh in on how you plan to interact with GCS once this goes into effect?
force_destroy
continue to work? Looks like no based on my understanding.Feel free to modify this at will or replace with your own issue/post covering these issues, just trying to throw these out a starting point.
b/326044671
The text was updated successfully, but these errors were encountered: