INT 21h

Hi, I am Vladimir Smagin, SysAdmin and Kaptain. Telegram Email / GIT / Микроблог / Thingiverse / RSS / GPG

Starting MSSQL in Amazon RDS with Terraform

№ 10191 В разделе "Sysadmin" от August 9th, 2019,
В подшивках: , ,

resource "aws_db_instance" "default_mssql" {
  identifier = "test-mssql"
  final_snapshot_identifier = "test-mssql"
  license_model             = "license-included"
  instance_class = "db.m4.large"
  storage_type              = "gp2"
  engine                    = "sqlserver-se"
  engine_version = "12.00.4422.0.v1"
  vpc_security_group_ids = ["${aws_security_group.mssql_security_group.id}"]
  username         = "master_chief"
  password         = "MueQuopdsdSDFG%45esdfgsdf"
  allocated_storage = 50 // not less than 50 Gb
  publicly_accessible = true // if you want to connect remotely
  storage_encrypted = true 
  skip_final_snapshot = true
}

resource "aws_security_group" "mssql_security_group" {
  name        = "test_mssql_group"
  description = "Allow all inbound traffic"

  ingress {
    from_port   = 1433
    to_port     = 1433
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  egress {
    from_port   = 0
    to_port     = 0
    protocol    = "-1"
    cidr_blocks = ["0.0.0.0/0"]
  }

}

// Identifier of the mssql DB instance.
output "mssql_id" {
  value = "${aws_db_instance.default_mssql.id}"
}

// Address of the mssql DB instance.
output "mssql_address" {
  value = "${aws_db_instance.default_mssql.address}"
}

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Яндекс.Метрика

Fortune cookie: Today's spam: Are you happy with the size of your penis?