Hi.
I am relatively new to Terraform.
Can someone advise how I create a multi-tenant Oracle database in an AWS RDS using Terraform?
The code below results in the creation of a single-tenant Oracle CDB in AWS:
resource “aws_db_instance” “webui-ins1” {
identifier = “nonprod-waae-webui-database”
engine = “oracle-ee-cdb”
engine_version = “21”
instance_class = “db.t3.medium”
allocated_storage = “20”
db_name = “WEBUINP”
username = “user”
password = “pass”
multi_az = “false”
backup_retention_period = 7
skip_final_snapshot = true
publicly_accessible = false
storage_encrypted = true
apply_immediately = true
db_subnet_group_name = “jt-db-subnet-group”
vpc_security_group_ids = [“sg-0f6a23f5e7fcb0c65”]
license_model = “bring-your-own-license”
}
I cannot determine what parameter/s I need to specify to create a database that is multitenant using Terraform.
The AWS API documentation (CreateDBInstance - Amazon Relational Database Service) refers to a request parameter ‘MultiTenant’ with the following description:
“Specifies whether to use the multi-tenant configuration or the single-tenant configuration (default).
This parameter only applies to RDS for Oracle container database (CDB) engines.
Type: Boolean”
I have tried adding a line “multitenant = true” or “multi_tenant = true” to the above code but this fails.
eg.
terraform validate
╷
│ Error: Unsupported argument
│
│ on rds.tf line 16, in resource “aws_db_instance” “webui-ins1”:
│ 16: multi-tenant = “true”
│
│ An argument named “multi-tenant” is not expected here.
Has anyone done this? I cannot find anything in the Terraform documentation that advises how to do this.
I would welcome any advice on what I have to code to achieve in Terraform the equivalent of performing the following actions in the AWS Console:
RDS > Create Database > Oracle > Oracle multitenant architecture > Multi-tenant configuration.
Thanks,
James.