How to store mysql password secret in terraform using aws_kms_secrets

I am following this doc https://www.terraform.io/docs/providers/aws/d/kms_secrets.html As I want to store mysql password in encrypted format This looks good $ aws kms encrypt –key-id arn:aws:kms:us-west-2:>id>:key/7e791977-123456 –plaintext fileb:///tmp/dbpass –output text –query CiphertextBlob Now when I am trying to use in my code based on above doc data “aws_kms_secret” “rds” { secret { name = “db-password” payload…

Slow initial connection to database (php / mssql)

Our webserver and database server are on a local network and the webserver uses an IP address to connect to the database. $con = new \PDO(‘sqlsrv:Server=10.200.2.1\sql2017;Database=dbname, $user, $pass); $con->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); The first page that calls this code will take about 4 seconds to run just the above code. Then I can refresh the page as…