fullstaq-ruby / fullstaq-ruby/infra

Enable blob versioning on Terraform state storage

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
10
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Problem

The Azure storage account `fsruby2terraform` (defined in `terraform-hisec/tfstate_maintainers_storage.tf`) holds Terraform state but has no blob versioning or soft-delete retention. If state is corrupted or accidentally deleted, recovery is not possible.

Terraform state is the source of truth for all managed infrastructure — losing it would require manual re-import of every resource.

> **Note on scope:** The other state account, `fsrubyterraformhisec`, is referenced in this repo only as a `data` source (`terraform-hisec/tfstate_owners_storage.tf`). It is provisioned and managed manually outside of Terraform, so the change below applies only to `fsruby2terraform`. Hardening of `fsrubyterraformhisec` should be handled out-of-band by an Infra Owner and documented in the bootstrapping guide.

## Proposed Changes

Add blob versioning and soft-delete retention to `fsruby2terraform`:

```hcl
blob_properties {
versioning_enabled = true
delete_retention_policy {
days = 30
}
}

lifecycle {
prevent_destroy = true
}
```

## Additional Consideration

Document the state recovery procedure once versioning is in place. Confirm or apply equivalent settings on `fsrubyterraformhisec` manually and capture the steps in `infrastructure-bootstrapping.md`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.