diff --git a/edbterraform/data/templates/aws/biganimal.tf.j2 b/edbterraform/data/templates/aws/biganimal.tf.j2 index 9b123548..a613af78 100644 --- a/edbterraform/data/templates/aws/biganimal.tf.j2 +++ b/edbterraform/data/templates/aws/biganimal.tf.j2 @@ -10,6 +10,7 @@ module "biganimal_{{ region_ }}" { name = each.value.name name_id = module.spec.hex_id + cloud_account = each.value.spec.cloud_account cluster_name = module.spec.base.tags.cluster_name cluster_type = each.value.spec.type node_count = each.value.spec.node_count diff --git a/edbterraform/data/terraform/aws/modules/biganimal/variables.tf b/edbterraform/data/terraform/aws/modules/biganimal/variables.tf index 5a659b1e..d389f698 100644 --- a/edbterraform/data/terraform/aws/modules/biganimal/variables.tf +++ b/edbterraform/data/terraform/aws/modules/biganimal/variables.tf @@ -6,6 +6,10 @@ variable "project" { variable "name" {} variable "name_id" {} +variable "cloud_account" { + type = bool + description = "Option for selecting if biganimal should host the resources with your own cloud account instead of biganimal hosted resources" +} variable "cluster_name" {} variable "cluster_type" { type = string @@ -72,6 +76,6 @@ locals { volume_size = "${var.volume.size_gb} Gi" - cloud_provider = "aws" + cloud_provider = var.cloud_account ? "aws" : "bah:aws" cluster_name = format("%s-%s", var.name, var.name_id) } diff --git a/edbterraform/data/terraform/aws/modules/specification/variables.tf b/edbterraform/data/terraform/aws/modules/specification/variables.tf index 36e75997..8ee98244 100644 --- a/edbterraform/data/terraform/aws/modules/specification/variables.tf +++ b/edbterraform/data/terraform/aws/modules/specification/variables.tf @@ -136,6 +136,7 @@ variable "spec" { project = object({ id = optional(string) }) + cloud_account = optional(bool, false) region = string node_count = number engine = string diff --git a/infrastructure-examples/aws/biganimal.yml b/infrastructure-examples/aws/biganimal.yml index 9f5adf12..78e7be1f 100644 --- a/infrastructure-examples/aws/biganimal.yml +++ b/infrastructure-examples/aws/biganimal.yml @@ -9,6 +9,7 @@ aws: mydb2: project: id: prj_ziJPLQw3XxpR7nxV + cloud_account: true region: us-east-1 type: ha node_count: 3