diff --git a/modules/dns-bucket/README.md b/modules/dns-bucket/README.md
index 5e5aa59..2442ec3 100644
--- a/modules/dns-bucket/README.md
+++ b/modules/dns-bucket/README.md
@@ -43,6 +43,7 @@ No modules.
| [aws_route53_record.delegate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_route53_zone.zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |
| [aws_s3_bucket.loki](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
+| [aws_s3_bucket.sqlworkspace](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket.tiered_storage](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket.velero](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket_server_side_encryption_configuration.velero](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource |
@@ -56,6 +57,7 @@ No modules.
| [custom\_dns\_zone\_id](#input\_custom\_dns\_zone\_id) | if specified, then a streamnative zone will not be created, and this zone will be used instead. Otherwise, we will provision a new zone and delegate access | `string` | `""` | no |
| [custom\_dns\_zone\_name](#input\_custom\_dns\_zone\_name) | must be passed if custom\_dns\_zone\_id is passed, this is the zone name to use | `string` | `""` | no |
| [enable\_loki](#input\_enable\_loki) | Enable loki storage bucket creation | `bool` | `false` | no |
+| [enable\_sqlworkspace](#input\_enable\_sqlworkspace) | Enable sqlworkspace storage bucket creation | `bool` | `false` | no |
| [enable\_velero](#input\_enable\_velero) | Enable velero for backups. If set to false, no velero resources will be created. | `bool` | `false` | no |
| [extra\_aws\_tags](#input\_extra\_aws\_tags) | Additional to apply to the resources. Note that this module sets the tags Name, Type, and Vendor by default. They can be overwritten, but it is not recommended. | `map(string)` | `{}` | no |
| [loki\_bucket\_name](#input\_loki\_bucket\_name) | Override the generated name if specified | `string` | `""` | no |
@@ -63,6 +65,7 @@ No modules.
| [pm\_name](#input\_pm\_name) | The name of the poolmember, for new clusters, this should be like `pm-` | `string` | n/a | yes |
| [pm\_namespace](#input\_pm\_namespace) | The namespace of the poolmember | `string` | n/a | yes |
| [s3\_encryption\_kms\_key\_arn](#input\_s3\_encryption\_kms\_key\_arn) | KMS key ARN to use for S3 encryption. If not set, the default AWS S3 key will be used. | `string` | `""` | no |
+| [sqlworkspace\_bucket\_name](#input\_sqlworkspace\_bucket\_name) | Override the generated name if specified | `string` | `""` | no |
| [tiered\_storage\_bucket\_name](#input\_tiered\_storage\_bucket\_name) | Override the generated name if specified | `string` | `""` | no |
| [velero\_bucket\_name](#input\_velero\_bucket\_name) | Override the generated name if specified | `string` | `""` | no |
@@ -73,6 +76,7 @@ No modules.
| [backup\_bucket](#output\_backup\_bucket) | n/a |
| [backup\_bucket\_kms\_key\_id](#output\_backup\_bucket\_kms\_key\_id) | n/a |
| [loki\_bucket](#output\_loki\_bucket) | n/a |
+| [sqlworkspace\_bucket](#output\_sqlworkspace\_bucket) | n/a |
| [tiered\_storage\_bucket](#output\_tiered\_storage\_bucket) | n/a |
| [zone\_id](#output\_zone\_id) | n/a |
| [zone\_name](#output\_zone\_name) | n/a |
diff --git a/modules/dns-bucket/bucket.tf b/modules/dns-bucket/bucket.tf
index 57e7179..9288764 100644
--- a/modules/dns-bucket/bucket.tf
+++ b/modules/dns-bucket/bucket.tf
@@ -35,6 +35,14 @@ resource "aws_s3_bucket" "loki" {
force_destroy = true
}
+resource "aws_s3_bucket" "sqlworkspace" {
+ count = var.enable_sqlworkspace ? 1 : 0
+ provider = aws.target
+ bucket = coalesce(var.sqlworkspace_bucket_name, format("%s-sqlworkspace-snc", var.pm_name))
+ tags = merge({ "Attributes" = "sqlworkspace" }, local.tags)
+ force_destroy = true
+}
+
data "aws_kms_key" "s3_default" {
key_id = "alias/aws/s3"
}
diff --git a/modules/dns-bucket/outputs.tf b/modules/dns-bucket/outputs.tf
index e6d9bf6..bed51ec 100644
--- a/modules/dns-bucket/outputs.tf
+++ b/modules/dns-bucket/outputs.tf
@@ -34,4 +34,8 @@ output "tiered_storage_bucket" {
output "loki_bucket" {
value = var.enable_loki ? aws_s3_bucket.loki[0].bucket : ""
-}
\ No newline at end of file
+}
+
+output "sqlworkspace_bucket" {
+ value = var.enable_sqlworkspace ? aws_s3_bucket.sqlworkspace[0].bucket : ""
+}
diff --git a/modules/dns-bucket/variables.tf b/modules/dns-bucket/variables.tf
index 6d839dc..c977f6d 100644
--- a/modules/dns-bucket/variables.tf
+++ b/modules/dns-bucket/variables.tf
@@ -75,6 +75,12 @@ variable "enable_velero" {
description = "Enable velero for backups. If set to false, no velero resources will be created."
}
+variable "enable_sqlworkspace" {
+ type = bool
+ default = false
+ description = "Enable sqlworkspace storage bucket creation"
+}
+
variable "velero_bucket_name" {
type = string
default = ""
@@ -92,3 +98,9 @@ variable "loki_bucket_name" {
default = ""
description = "Override the generated name if specified"
}
+
+variable "sqlworkspace_bucket_name" {
+ type = string
+ default = ""
+ description = "Override the generated name if specified"
+}