Terraform Data

  • Terraform can read data about resources in your environment
  • This is good for hooking a new component into an existing system
  • Can also be used for importing secrets and dynamic values
resource "aws_rds_cluster" "xsrt-main" {
    engine = "aurora-postgresql"
    engine_mode = "serverless"
    engine_version = "10.7"
    database_name = "xyz"
    master_username = "postgres"
    master_password = data.aws_ssm_parameter.db-master-pass.value
}

15 / 18