Skip to content

Commit

Permalink
AWS BigAnimal module - 'cloud_account: true' can be used with biganim…
Browse files Browse the repository at this point in the history
…al pre-connected cloud service accounts. To use biganimal hosted resources use 'cloud_account: false'
  • Loading branch information
bryan-bar committed Aug 17, 2023
1 parent 1084e6d commit 672e341
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions edbterraform/data/templates/aws/biganimal.tf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ variable "spec" {
project = object({
id = optional(string)
})
cloud_account = optional(bool, false)
region = string
node_count = number
engine = string
Expand Down
1 change: 1 addition & 0 deletions infrastructure-examples/aws/biganimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ aws:
mydb2:
project:
id: prj_ziJPLQw3XxpR7nxV
cloud_account: true
region: us-east-1
type: ha
node_count: 3
Expand Down

0 comments on commit 672e341

Please sign in to comment.