Skip to content

Commit

Permalink
feat: PGD BAH Azure (#356)
Browse files Browse the repository at this point in the history
* feat: PGD BAH Azure

* fix: azure bah examples

* docs: bah azure pgd

* fix: pgd bah azure examples

* docs: updated docs and removed BAH acronym
  • Loading branch information
wai-wong-edb authored Oct 10, 2023
1 parent 530948d commit 8dfa236
Show file tree
Hide file tree
Showing 4 changed files with 538 additions and 8 deletions.
274 changes: 270 additions & 4 deletions docs/resources/pgd.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,272 @@ resource "biganimal_pgd" "pgd_cluster" {
}
```

## PGD Azure BigAnimal's cloud account One Data Group Example
```terraform
terraform {
required_providers {
biganimal = {
source = "EnterpriseDB/biganimal"
version = "0.6.0"
}
random = {
source = "hashicorp/random"
version = "3.5.1"
}
}
}
resource "random_password" "password" {
length = 16
special = true
override_special = "!#$%&*()-_=+[]{}<>:?"
}
variable "cluster_name" {
type = string
description = "The name of the cluster."
}
variable "project_id" {
type = string
description = "BigAnimal Project ID"
}
resource "biganimal_pgd" "pgd_cluster" {
cluster_name = var.cluster_name
project_id = var.project_id
password = resource.random_password.password.result
data_groups = [
{
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 = "pgd"
nodes = 3
}
csp_auth = false
instance_type = {
instance_type_id = "azure:Standard_D2s_v3"
}
pg_config = [
{
name = "application_name"
value = "created through terraform"
},
{
name = "array_nulls"
value = "off"
},
]
storage = {
volume_type = "azurepremiumstorage"
volume_properties = "P2"
size = "8 Gi"
}
pg_type = {
pg_type_id = "epas"
}
pg_version = {
pg_version_id = "15"
}
private_networking = false
cloud_provider = {
cloud_provider_id = "bah:azure"
}
region = {
region_id = "northeurope"
}
maintenance_window = {
is_enabled = true
start_day = 1
start_time = "13:00"
}
# pe_allowed_principal_ids = [
# <example_value> # ex: "9334e5e6-7f47-aE61-5A4F-ee067daeEf4A"
# ]
},
]
}
```

## PGD Azure BigAnimal's cloud account Two Data Groups with One Witness Group Example
```terraform
terraform {
required_providers {
biganimal = {
source = "EnterpriseDB/biganimal"
version = "0.6.0"
}
random = {
source = "hashicorp/random"
version = "3.5.1"
}
}
}
resource "random_password" "password" {
length = 16
special = true
override_special = "!#$%&*()-_=+[]{}<>:?"
}
variable "cluster_name" {
type = string
description = "The name of the cluster."
}
variable "project_id" {
type = string
description = "BigAnimal Project ID"
}
resource "biganimal_pgd" "pgd_cluster" {
cluster_name = var.cluster_name
project_id = var.project_id
password = resource.random_password.password.result
data_groups = [
{
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 = "pgd"
nodes = 3
}
csp_auth = false
instance_type = {
instance_type_id = "azure:Standard_D2s_v3"
}
pg_config = [
{
name = "application_name"
value = "created through terraform"
},
{
name = "array_nulls"
value = "off"
},
]
storage = {
volume_type = "azurepremiumstorage"
volume_properties = "P2"
size = "8 Gi"
}
pg_type = {
pg_type_id = "epas"
}
pg_version = {
pg_version_id = "15"
}
private_networking = false
cloud_provider = {
cloud_provider_id = "bah:azure"
}
region = {
region_id = "northeurope"
}
maintenance_window = {
is_enabled = true
start_day = 1
start_time = "13:00"
}
# pe_allowed_principal_ids = [
# <example_value> # ex: "9334e5e6-7f47-aE61-5A4F-ee067daeEf4A"
# ]
},
{
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 = "pgd"
nodes = 3
}
csp_auth = false
instance_type = {
instance_type_id = "azure:Standard_D2s_v3"
}
pg_config = [
{
name = "application_name"
value = "created through terraform"
},
{
name = "array_nulls"
value = "off"
},
]
storage = {
volume_type = "azurepremiumstorage"
volume_properties = "P2"
size = "8 Gi"
}
pg_type = {
pg_type_id = "epas"
}
pg_version = {
pg_version_id = "15"
}
private_networking = false
cloud_provider = {
cloud_provider_id = "bah:azure"
}
region = {
region_id = "eastus"
}
maintenance_window = {
is_enabled = true
start_day = 2
start_time = "15:00"
}
# pe_allowed_principal_ids = [
# <example_value> # ex: "9334e5e6-7f47-aE61-5A4F-ee067daeEf4A"
# ]
}
]
witness_groups = [
{
region = {
region_id = "canadacentral"
}
cloud_provider = {
cloud_provider_id = "bah:azure"
}
maintenance_window = {
is_enabled = true
start_day = 3
start_time = "03:00"
}
}
]
}
```

## PGD AWS One Data Group Example
```terraform
terraform {
Expand Down Expand Up @@ -518,7 +784,7 @@ resource "biganimal_pgd" "pgd_cluster" {
}
```

## BigAnimal Hosted(BAH) PGD AWS One Data Group Example
## PGD AWS BigAnimal's cloud account One Data Group Example
```terraform
terraform {
required_providers {
Expand Down Expand Up @@ -615,7 +881,7 @@ resource "biganimal_pgd" "pgd_cluster" {
}
```

## BigAnimal Hosted(BAH) PGD AWS Two Data Groups with One Witness Group Example
## PGD AWS BigAnimal's cloud account Two Data Groups with One Witness Group Example
```terraform
terraform {
required_providers {
Expand Down Expand Up @@ -1041,7 +1307,7 @@ resource "biganimal_pgd" "pgd_cluster" {
}
```

## BigAnimal Hosted(BAH) PGD GCP One Data Group Example
## PGD GCP BigAnimal's cloud account One Data Group Example
```terraform
terraform {
required_providers {
Expand Down Expand Up @@ -1142,7 +1408,7 @@ resource "biganimal_pgd" "pgd_cluster" {
}
```

## BigAnimal Hosted(BAH) PGD GCP Two Data Groups with One Witness Group Example
## PGD GCP BigAnimal's cloud account Two Data Groups with One Witness Group Example
```terraform
terraform {
required_providers {
Expand Down
Loading

0 comments on commit 8dfa236

Please sign in to comment.