terraform-aws-modules / terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/rds-aurora/aws
Apache License 2.0
385 stars 568 forks source link

aurora babelfish function activated but not able to login #366

Closed mladenilic100 closed 1 year ago

mladenilic100 commented 1 year ago

Description

during deployment aurora serverless with babelfish function noticed that login do not work. defined and added new db cluster parameter: under terraform-aws-rds-aurora module version 7.7.1 added new parameter: db_cluster_parameter_group_name = aws_rds_cluster_parameter_group.postgres_cluster_parameter_group_babelfish.name and created resource: resource "aws_rds_cluster_parameter_group" "postgres_cluster_parameter_group_babelfish" { name = "postgres-babelfish-parameter-group" family = "aurora-postgresql15" description = "Aurora-postgres14 with babelfish-cluster-parameter-group"

parameter { name = "rds.babelfish_status" value = "on" apply_method = "pending-reboot" } }

not able to login to SQL with error message: mssql: login error: "master" is not a Babelfish user login to postgre is ok.

Versions

Reproduction Code [Required]

module "db" {

source = "terraform-aws-modules/rds-aurora/aws" version = "7.7.1"

name = "${local.product_name}-cluster" engine = "aurora-postgresql" engine_version = "15.2" engine_mode = "provisioned"

serverlessv2_scaling_configuration = { min_capacity = 0.5 max_capacity = 8 }

Authentication

master_username = local.master_user_name random_password_length = 24

Database

database_name = local.database_name

Instances

instance_class = "db.serverless"

instances = {

one = { promotion_tier = 2 }

one = {}

}

Parameter group

db_cluster_parameter_group_name = aws_rds_cluster_parameter_group.postgres_cluster_parameter_group_babelfish.name

Networking

vpc_id = module.vpc.vpc_id subnets = module.vpc.private_subnets create_db_subnet_group = true allowed_security_groups = concat([ module.bastion_host.security_group_id, ])

Encryption

storage_encrypted = true

} ##################################################

Enable Babelfish function

##################################################

resource "aws_rds_cluster_parameter_group" "postgres_cluster_parameter_group_babelfish" { name = "postgres-babelfish-parameter-group" family = "aurora-postgresql15" description = "Aurora-postgres14 with babelfish-cluster-parameter-group"

parameter { name = "rds.babelfish_status" value = "on" apply_method = "pending-reboot" } }

Steps to reproduce the behavior:

yes, prod initial deployment by terraform of aurora serverless with babelfish support. ## Expected behavior

login to DB by sql client on port 1433 by username and password

Actual behavior

cant login with this error mssql: login error: "master" is not a Babelfish user

Terminal Output Screenshot(s)

Additional context

mladenilic100 commented 1 year ago

found cause of problem, database name created must not be named master.

mladenilic100 commented 1 year ago

closing

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.