mozilla-it / sumo-infra

Infrastructure for support.mozilla.org
1 stars 3 forks source link

Enable AWS Performance Insights for the SUMO database #74

Closed smarnach closed 3 years ago

smarnach commented 3 years ago

The first commit in this PR makes the Terraform code match the reality of currently deployed RDS and Redis instances. This means I needed to remove the Redis instance called "sumo-redis-shared", which does not exist in the account, and only keep the instance named "sumo-redis-test", which for some reason appears to be the Redis instance used both in prod and the (mostly unused) dev environment, but not in stage. Of course this is a royal mess, but for now my goal is to make the code match the reality.

The second commit then enables Performance Insights. Since I already did that manually in the AWS console, running terraform plan shows no diff. I used Terraform version 0.13.7.

Note that the variable mysql_prod_password is undefined, so I had to run terraform state pull to retrieve the current value and use export TF_VAR_mysql_prod_password="…" to pass that value back to Terraform.

In related notes, the format generated by terraform fmt creates stupid diffs. I could add an empty line to make the diff less stupid, but I don't want to add an empty line. I want terraform fmt to be less stupid, though I know it's too late now.

smarnach commented 3 years ago

it costs a little $$$, but not very much

Performance Insights has a free tier that keeps data for seven days. This PR only enables the free tier, so it shouldn't cost any money at all.