unity-sds / unity-cs

Unity Common Services
Apache License 2.0
0 stars 2 forks source link

Enable versioning on shared venue buckets #418

Closed LucaCinquini closed 2 months ago

LucaCinquini commented 4 months ago

Note: this ticket should be transferred by @galenatjpl to one of the CS GitHub repositories.

When storing the Terraform state of the systems on S3, it is recommended that the S3 bucket be enabled with versioning: this is to be able to recover the state in case of accidental deletion.

See warning in instructions: https://developer.hashicorp.com/terraform/language/settings/backends/s3

"Warning! It is highly recommended that you enable Bucket Versioning on the S3 bucket to allow for state recovery in the case of accidental deletions and human error."

So can we please enable versioning on the bucket "unity-unity-dev-bucket" and all the similar buckets in each venue?

mike-gangl commented 4 months ago

💯good catch @LucaCinquini and team. Galen, is this aprt of management console? or the cloudfront? We should transfer this issue to that location.

galenatjpl commented 4 months ago

@LucaCinquini @mike-gangl , This bucket gets created by the management console as part of the bootstrap process. Please assign this ticket to me, and move it to the unity-cs repository. Thanks

galenatjpl commented 4 months ago

@jdrodjpl the s3.go code needs to be updated so that new Management Console deployments enable versioning on the bucket. Also, for the "blessed" instances/buckets that already exist in unity-venue-dev, unity-venue-test, (and unity-venue-ops?), we may need to go in an manually set this setting in the AWS web console, unless we plan on destroying and re-deploying. I'm actually in favor of doing the latter (destroy, release a new MC version, and re-deploy).

LucaCinquini commented 4 months ago

Please let us know what you decide. We are already using the unity-unity-dev-bucket to store S3 states. If you decide to destroy it, we first need to undeploy SPS, then wait for you to enable versioning. A manual upgrade in the console might be preferable to us, but we can go either way.

galenatjpl commented 4 months ago

@jdrodjpl please note @LucaCinquini 's comment above.

jdrodjpl commented 4 months ago

@LucaCinquini I went ahead and just enabled the versioning option for both unity-venue-dev and unity-venue-test, no need to do anything.

jdrodjpl commented 4 months ago

@galenatjpl this has been added to the latest MC tag and is done.

LucaCinquini commented 4 months ago

Great, thanks guys.

galenatjpl commented 4 months ago

thanks @jdrodjpl !