amazon-web-services - 如何通过 Terraform 减少 RDS 实例的部署时间?
问题描述
resource "aws_db_instance" "mydb1_mishal2" {
allocated_storage = 20 # gigabytes
backup_retention_period = 7 # in days
db_subnet_group_name = "${var.rds_public_subnet_group}"
engine = "mysql"
engine_version = "5.7"
identifier = "dbmishalsecond"
instance_class = "db.t2.micro"
multi_az = false
name = "mydbmishalsecond"
parameter_group_name = "default.mysql5.7" # if you have tuned it
password = "mishal12345" #"${trimspace(file("${path.module}/secrets/mydb1-password.txt"))}"
port = 3306
publicly_accessible = true
storage_encrypted = false # you should always do this
storage_type = "gp2"
username = "mydb1"
#vpc_security_group_ids = ["${aws_security_group.mydb1.id}"]
}
我正在使用上面的代码在 AWS 中部署 RDS 实例。但是部署需要很长时间。下面的日志:
我怎样才能减少部署时间或是否有必要邪恶?
解决方案
除了多可用数据库确实需要更长的时间才能启动之外,您实际上无法更改 RDS 需要多长时间才能可用。但这并不是您真正要考虑的启动时间。您应该考虑对该参数的可用性要求。
推荐阅读
- progressive-web-apps - 渐进式 Web 应用和应用内购买/计费
- python - Facebook Oauth 有效,但 Google Oauth2 错误:Django 中的 redirect_uri_mismatch
- php - 渴望加载不拉关系模型
- javascript - 在获取请求时自动设置输入值
- ios - 即使满足要求,可失败的初始化程序也总是返回 nil
- react-native - 如何将 useQuery 作为异步任务调用
- django - Django 关系级别
- c# - 更新面板 - 下拉选择的索引更改事件未触发
- groovy - 从 groovy 列表中提取对
- css - 如何为材料表(React)设置样式(添加css)?