Terraform 使用自我管理的 Active Directory 创建 SQL Server 实例

问题描述 投票:0回答:1

我需要您的帮助:我们有一个简单的 Terraform 代码来创建 SQL Server 实例,但我要求将其添加到 Active Directory。

我已经在AWS控制台中进行了测试,并且能够将数据库加入到AD,现在我需要修改Terraform代码来创建SQL Server RDS实例并使用自我管理的Active Directory启用Microsoft SQL Server Windows身份验证。

这是我们创建 SQL Server 实例的代码:

resource "aws_db_instance" "new_sql_server_instance" {
  identifier                 = var.cluster_name
  engine                     = var.engine
  engine_version             = var.engine_version
  instance_class             = var.instance_class
  username                   = var.master_username
  password                   = var.master_password
  port                       = var.port
  license_model              = "license-included"
  storage_encrypted          = true
  storage_type               = "gp2"
  allocated_storage          = 100
  final_snapshot_identifier  = "final-snapshot-sqlserver"
  db_subnet_group_name       = aws_db_subnet_group.db_subnet_group.name
  multi_az                   = true
  vpc_security_group_ids     = [aws_security_group.dba_security_group_ip.id, aws_security_group.app_security_group_ip.id]
  skip_final_snapshot        = true
  backup_retention_period    = 7
  backup_window              = "03:00-04:00"
  maintenance_window         = "sun:05:00-sun:06:00"
  apply_immediately          = true
  parameter_group_name       = aws_db_parameter_group.rds_instance_parameter_group.name 
}

我认为前 2 个(FQDN 和域组织单位)是等效的

# Windows Authentication with Active Directory
  domain_fqdn                     = "xxxxx"
  domain_ou                       = "xxxxxxxxxxxxxx"

但我不知道如何将其他3个待处理的:S

知道如何让它发挥作用吗?

谢谢!

Enable Microsoft SQL Server Windows authentication

sql-server terraform active-directory
1个回答
0
投票

应该有一种方法来添加这些,只是某些参数是特定组合所必需的。由于您选择使用

domain_fqdn
domain_ou
,因此需要以下参数:

正如文档中对两者的说明:

(可选,但如果提供

domain_fqdn
则为必填)

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.