Create Geo replication events for Terraform state deletions
What does this MR do and why?
Replicates Terraform state deletions to Geo secondaries, so that files aren't left orphaned in object storage.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
-
Enable object storage
-
Configure a Geo secondary (also with object storage enabled)
-
Create a basic Terraform project that uses GitLab managed state, for example with the following
main.tf
:terraform { backend "http" { } } resource "local_file" "test" { content = "test" filename = "${path.module}/test.txt" }
-
Modify the
content
value and runterraform apply
a few times, to generate a version history -
Verify files are replicated to the secondary's object storage
-
Visit http://path/to/your/project/-/terraform and select "Remove state and versions"
-
Verify files are removed from both primary and secondary object storage
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #349011 (closed)