diff --git a/README.md b/README.md index 441f300..1b97771 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Here is an example of how you can use this module in your inventory structure: module "documentdb" { source = "clouddrove/terraform-aws-documentdb/aws" vpc_id = module.vpc.vpc_id - subnet_list = data.aws_subnet_ids.all.ids + subnet_list = module.subnets.private_subnet_id database_name = "rds" environment = "test" label_order = ["environment", "name"] diff --git a/README.yaml b/README.yaml index e3d9c00..32e47b4 100644 --- a/README.yaml +++ b/README.yaml @@ -46,7 +46,7 @@ usage: |- module "documentdb" { source = "clouddrove/terraform-aws-documentdb/aws" vpc_id = module.vpc.vpc_id - subnet_list = data.aws_subnet_ids.all.ids + subnet_list = module.subnets.private_subnet_id database_name = "rds" environment = "test" label_order = ["environment", "name"] diff --git a/example/secured/main.tf b/example/secured/main.tf index cf08417..c157314 100644 --- a/example/secured/main.tf +++ b/example/secured/main.tf @@ -101,4 +101,5 @@ module "documentdb" { tls_enabled = var.tls_enabled instance_class = var.instance_class cluster_size = var.cluster_size + deletion_protection = true } \ No newline at end of file diff --git a/main.tf b/main.tf index 390462d..3d1cfdd 100644 --- a/main.tf +++ b/main.tf @@ -49,6 +49,7 @@ resource "aws_docdb_cluster" "this" { final_snapshot_identifier = lower(var.database_name) skip_final_snapshot = var.skip_final_snapshot apply_immediately = var.apply_immediately + deletion_protection = var.deletion_protection storage_encrypted = var.storage_encrypted kms_key_id = var.kms_key_id snapshot_identifier = var.snapshot_identifier