CMDB-Server/ec2-user/mysql/rds.tf

31 lines
949 B
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ---------------------------
# RDS
# ---------------------------
# RDSインスタンスの作成
resource "aws_db_instance" "ansible_rds" {
identifier = "ansible-rds"
# インスタンスクラス、ストレージサイズの指定
instance_class = "db.t3.micro"
allocated_storage = 20
# DBサブネットグループの指定
db_subnet_group_name = "jenkins-db-subnet-group"
# セキュリティグループの指定
vpc_security_group_ids = [
"sg-007ef3c5be8c5e086"
]
# DBエンジンの指定
engine = "mysql"
engine_version = "8.0.35"
# DB情報の設定
db_name = "mysql"
username = "admin"
password = "passw0rd!"
# 設定変更の即時反映
apply_immediately = true
# DB削除時にスナップショットを作成しない
skip_final_snapshot = true
# バックアップ保持期間0に設定すると自動バックアップ無効
backup_retention_period = "10"
}