Skip to content

Commit

Permalink
Merge branch 'main' into UPM-34585
Browse files Browse the repository at this point in the history
# Conflicts:
#	examples/resources/biganimal_cluster/ha/resource.tf
#	examples/resources/biganimal_cluster/single_node/aws/resource.tf
#	examples/resources/biganimal_cluster/single_node/azure/resource.tf
#	examples/resources/biganimal_cluster/single_node/bah_aws/resource.tf
#	examples/resources/biganimal_cluster/single_node/bah_azure/resource.tf
#	examples/resources/biganimal_cluster/single_node/bah_gcp/resource.tf
#	examples/resources/biganimal_cluster/single_node/gcp/resource.tf
#	examples/resources/biganimal_cluster/single_node/resource.tf
#	pkg/models/cluster.go
#	pkg/provider/data_source_cluster.go
#	pkg/provider/resource_cluster.go
  • Loading branch information
wai-wong-edb committed Aug 2, 2024
2 parents abc7267 + b48ae41 commit 14ca66f
Show file tree
Hide file tree
Showing 46 changed files with 2,154 additions and 2,917 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: v1.26.0
version: v1.26.2
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
Expand Down
16 changes: 4 additions & 12 deletions examples/data-sources/biganimal_cluster/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variable "cluster_name" {
variable "cluster_id" {
type = string
description = "The name of the cluster"
description = "The id of the cluster"
}

variable "project_id" {
Expand All @@ -9,8 +9,8 @@ variable "project_id" {
}

data "biganimal_cluster" "this" {
cluster_name = var.cluster_name
project_id = var.project_id
cluster_id = var.cluster_id
project_id = var.project_id
}

output "cluster_architecture" {
Expand All @@ -33,14 +33,6 @@ output "csp_auth" {
value = coalesce(data.biganimal_cluster.this.csp_auth, false)
}

output "deleted_at" {
value = data.biganimal_cluster.this.deleted_at
}

output "expired_at" {
value = data.biganimal_cluster.this.expired_at
}

output "instance_type" {
value = data.biganimal_cluster.this.instance_type
}
Expand Down
48 changes: 27 additions & 21 deletions examples/resources/biganimal_cluster/ha/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,37 @@ resource "biganimal_cluster" "ha_cluster" {
project_id = var.project_id
pause = false

allowed_ip_ranges {
cidr_block = "127.0.0.1/32"
description = "localhost"
}

allowed_ip_ranges {
cidr_block = "192.168.0.1/32"
description = "description!"
}
allowed_ip_ranges = [
{
cidr_block = "127.0.0.1/32"
description = "localhost"
},
{
cidr_block = "192.168.0.1/32"
description = "description!"
}
]

backup_retention_period = "6d"
cluster_architecture {
cluster_architecture = {
id = "ha"
nodes = 3
}

instance_type = "aws:c5.large"
password = resource.random_password.password.result
pg_config {
name = "application_name"
value = "created through terraform"
}

pg_config {
name = "array_nulls"
value = "off"
}
pg_config = [
{
name = "application_name"
value = "created through terraform"
},
{
name = "array_nulls"
value = "off"
}
]

storage {
storage = {
volume_type = "gp3"
volume_properties = "gp3"
size = "4 Gi"
Expand All @@ -75,7 +77,7 @@ resource "biganimal_cluster" "ha_cluster" {
pg_type = "epas"
pg_version = "15"
private_networking = false
cloud_provider = "aws"
cloud_provider = "bah:aws" // "bah:aws" uses BigAnimal's cloud account AWS, use "aws" for your cloud account
read_only_connections = true
region = "us-east-1"
superuser_access = true
Expand All @@ -98,6 +100,10 @@ resource "biganimal_cluster" "ha_cluster" {
# },
# ]
}

# transparent_data_encryption = {
# key_id = <example_value>
# }
}

output "password" {
Expand Down
52 changes: 31 additions & 21 deletions examples/resources/biganimal_cluster/single_node/aws/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,38 @@ resource "biganimal_cluster" "single_node_cluster" {
project_id = var.project_id
pause = false

allowed_ip_ranges {
cidr_block = "127.0.0.1/32"
description = "localhost"
}

allowed_ip_ranges {
cidr_block = "192.168.0.1/32"
description = "description!"
}
allowed_ip_ranges = [
{
cidr_block = "127.0.0.1/32"
description = "localhost"
},
{
cidr_block = "192.168.0.1/32"
description = "description!"
}
]

backup_retention_period = "6d"
cluster_architecture {
cluster_architecture = {
id = "single"
nodes = 1
}
csp_auth = true

instance_type = "aws:m5.large"
password = resource.random_password.password.result
pg_config {
name = "application_name"
value = "created through terraform"
}

pg_config {
name = "array_nulls"
value = "off"
}
pg_config = [
{
name = "application_name"
value = "created through terraform"
},
{
name = "array_nulls"
value = "off"
}
]

storage {
storage = {
volume_type = "gp3"
volume_properties = "gp3"
size = "4 Gi"
Expand All @@ -76,7 +78,7 @@ resource "biganimal_cluster" "single_node_cluster" {
pg_type = "epas"
pg_version = "15"
private_networking = false
cloud_provider = "aws"
cloud_provider = "bah:aws" // "bah:aws" uses BigAnimal's cloud account AWS, use "aws" for your cloud account
read_only_connections = false
region = "us-east-1"
superuser_access = true
Expand All @@ -99,6 +101,14 @@ resource "biganimal_cluster" "single_node_cluster" {
# },
# ]
}

# pe_allowed_principal_ids = [
# <example_value> # ex: 123456789012
# ]

# transparent_data_encryption = {
# key_id = <example_value>
# }
}

output "password" {
Expand Down
52 changes: 31 additions & 21 deletions examples/resources/biganimal_cluster/single_node/azure/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,38 @@ resource "biganimal_cluster" "single_node_cluster" {
project_id = var.project_id
pause = false

allowed_ip_ranges {
cidr_block = "127.0.0.1/32"
description = "localhost"
}

allowed_ip_ranges {
cidr_block = "192.168.0.1/32"
description = "description!"
}
allowed_ip_ranges = [
{
cidr_block = "127.0.0.1/32"
description = "localhost"
},
{
cidr_block = "192.168.0.1/32"
description = "description!"
}
]

backup_retention_period = "6d"
cluster_architecture {
cluster_architecture = {
id = "single"
nodes = 1
}
csp_auth = false

instance_type = "azure:Standard_D2s_v3"
password = resource.random_password.password.result
pg_config {
name = "application_name"
value = "created through terraform"
}

pg_config {
name = "array_nulls"
value = "off"
}
pg_config = [
{
name = "application_name"
value = "created through terraform"
},
{
name = "array_nulls"
value = "off"
}
]

storage {
storage = {
volume_type = "azurepremiumstorage"
volume_properties = "P1"
size = "4 Gi"
Expand All @@ -76,7 +78,7 @@ resource "biganimal_cluster" "single_node_cluster" {
pg_type = "epas"
pg_version = "15"
private_networking = false
cloud_provider = "azure"
cloud_provider = "bah:azure" // "bah:azure" uses BigAnimal's cloud account Azure, use "azure" for your cloud account
read_only_connections = false
region = "eastus2"
superuser_access = true
Expand All @@ -100,6 +102,14 @@ resource "biganimal_cluster" "single_node_cluster" {
# },
# ]
}

# pe_allowed_principal_ids = [
# <example_value> # ex: "9334e5e6-7f47-aE61-5A4F-ee067daeEf4A"
# ]

# transparent_data_encryption = {
# key_id = <example_value>
# }
}

output "password" {
Expand Down
109 changes: 0 additions & 109 deletions examples/resources/biganimal_cluster/single_node/bah_aws/resource.tf

This file was deleted.

Loading

0 comments on commit 14ca66f

Please sign in to comment.