Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: TDE for PG clusters #561

Merged
merged 47 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d77e2ab
feat: migrate faraway replica to terraform framework
wai-wong-edb Jun 5, 2024
566f85b
fix: examples refactored removed bah and combined with cloud provider…
wai-wong-edb May 21, 2024
b49d05c
feat: migrate faraway replica update to terraform framework
wai-wong-edb Jun 5, 2024
9fc2676
feat: examples and import state and delete
wai-wong-edb Jun 5, 2024
a25ea13
fix: migration blocks to attributes
wai-wong-edb Jun 11, 2024
f21dac5
fix: removed wrong checkin
wai-wong-edb Jun 11, 2024
8c134af
Merge branch 'ww-v1-migrate-faraway-replica' into ww-v1-migrate-block…
wai-wong-edb Jun 11, 2024
d63368b
fix: examples fix
wai-wong-edb Jun 11, 2024
4f0b11a
refactor: refactor bah
wai-wong-edb Jun 13, 2024
037c5ef
fix: examples
wai-wong-edb Jun 13, 2024
790fb90
fix: examples
wai-wong-edb Jun 13, 2024
8525388
fix: examples bah fix
wai-wong-edb Jun 13, 2024
e4acd80
Merge branch 'ww-v1-refactor-examples' into ww-v1-refactor
wai-wong-edb Jun 13, 2024
4d16f67
fix: examples
wai-wong-edb Jun 13, 2024
ea8e7ca
fix: cluster datasource fix
wai-wong-edb Jun 16, 2024
fffed99
fix: datasource fix
wai-wong-edb Jun 17, 2024
3952093
fix: lint fix
wai-wong-edb Jun 19, 2024
5f29309
Merge branch 'main' into ww-v1-refactor-examples
wai-wong-edb Jun 24, 2024
2ae0f85
Merge branch 'ww-v1-refactor-examples' into ww-v1-migrate-faraway-rep…
wai-wong-edb Jun 24, 2024
946b364
Merge branch 'ww-v1-refactor-examples' into ww-v1-migrate-blocks-to-a…
wai-wong-edb Jun 24, 2024
bf024e1
fix: lint
wai-wong-edb Jun 24, 2024
a73eb49
feat: TDE for pg clusters
wai-wong-edb Jun 28, 2024
9befbad
fix: tde in examples
wai-wong-edb Jun 28, 2024
97eaf61
Merge branch 'ww-v1-migrate-faraway-replica' into ww-v1-migrate-block…
wai-wong-edb Jul 3, 2024
8b8c3e5
Merge branch 'ww-v1-migrate-blocks-to-attributes' into ww-v1-refactor…
wai-wong-edb Jul 3, 2024
a095df7
Merge branch 'ww-v1-refactor-cluster' into ww-tde-pg-clusters
wai-wong-edb Jul 3, 2024
53215f5
feat: tde for faraway-replica
wai-wong-edb Jul 3, 2024
e1c6226
feat: datasource fix
wai-wong-edb Jul 3, 2024
f19a5c1
feat: tde pgidentity
wai-wong-edb Jul 19, 2024
2ea6b5b
Merge branch 'ww-tde-pg-clusters' into ww-tde-faraway-replica
wai-wong-edb Jul 19, 2024
76db336
feat: pgidentity
wai-wong-edb Jul 19, 2024
f756a1f
feat: faraway-replica datasource/resource missing fields fix
wai-wong-edb Jul 23, 2024
6d2453a
fix: change requests for PgIdentity
wai-wong-edb Jul 25, 2024
f4057f8
fix: PgIdentity change requests
wai-wong-edb Jul 25, 2024
2b1c762
Merge branch 'ww-v1-refactor-cluster' into ww-tde-pg-clusters
wai-wong-edb Jul 26, 2024
9cdff6e
Merge branch 'ww-tde-pg-clusters' into ww-tde-faraway-replica
wai-wong-edb Jul 26, 2024
b69bef4
fix: PgIdentity bug
wai-wong-edb Jul 26, 2024
5d04385
fix: PgIdentity bug
wai-wong-edb Jul 26, 2024
ea1ecca
Merge branch 'main' into ww-tde-pg-clusters
wai-wong-edb Jul 29, 2024
1b152cf
fix: pgIdentity action
wai-wong-edb Jul 29, 2024
3b1a96f
fix: lint errors
wai-wong-edb Jul 31, 2024
bed6588
fix: phase fix
wai-wong-edb Jul 31, 2024
23b78fa
fix: import and update fix
wai-wong-edb Jul 31, 2024
306a502
fix: tde status and plan modifier
wai-wong-edb Aug 1, 2024
0d10fd5
Merge branch 'ww-tde-pg-clusters' into ww-tde-faraway-replica
wai-wong-edb Aug 1, 2024
d8ae409
fix: faraway replica tde fix
wai-wong-edb Aug 1, 2024
8ec54b1
fix: tde plan fix and minor fixes
wai-wong-edb Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -97,6 +99,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 @@ -98,6 +100,14 @@ resource "biganimal_cluster" "single_node_cluster" {
# },
# ]
}

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

# transparent_data_encryption = {
# key_id = <example_value>
# }
wai-wong-edb marked this conversation as resolved.
Show resolved Hide resolved
}

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 @@ -98,6 +100,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
108 changes: 0 additions & 108 deletions examples/resources/biganimal_cluster/single_node/bah_aws/resource.tf

This file was deleted.

Loading
Loading