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!: adds availability_type for read_replicas #329

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 28 additions & 28 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,35 @@ steps:
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run all --stage init --verbose']

# - id: apply mssql-ha-local
# waitFor: ["init-all", "wait for api activation"]
# name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
# args: ['/bin/bash', '-c', 'cft test run TestMsSqlHaModule --stage apply --verbose']
# - id: verify mssql-ha-local
# waitFor:
# - apply mssql-ha-local
# name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
# args: ['/bin/bash', '-c', 'cft test run TestMsSqlHaModule --stage verify --verbose']
# - id: teardown mssql-ha-local
# waitFor:
# - verify mssql-ha-local
# name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
# args: ['/bin/bash', '-c', 'cft test run TestMsSqlHaModule --stage teardown --verbose']
- id: apply mssql-ha-local
waitFor: ["init-all", "wait for api activation"]
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run TestMsSqlHaModule --stage apply --verbose']
- id: verify mssql-ha-local
waitFor:
- apply mssql-ha-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run TestMsSqlHaModule --stage verify --verbose']
- id: teardown mssql-ha-local
waitFor:
- verify mssql-ha-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run TestMsSqlHaModule --stage teardown --verbose']

# - id: apply mssql-public-local
# waitFor: ["init-all", "wait for api activation"]
# name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
# args: ['/bin/bash', '-c', 'cft test run TestMsSqlPublicModule --stage apply --verbose']
# - id: verify mssql-public-local
# waitFor:
# - apply mssql-public-local
# name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
# args: ['/bin/bash', '-c', 'cft test run TestMsSqlPublicModule --stage verify --verbose']
# - id: teardown mssql-public-local
# waitFor:
# - verify mssql-public-local
# name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
# args: ['/bin/bash', '-c', 'cft test run TestMsSqlPublicModule --stage teardown --verbose']
- id: apply mssql-public-local
waitFor: ["init-all", "wait for api activation"]
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run TestMsSqlPublicModule --stage apply --verbose']
- id: verify mssql-public-local
waitFor:
- apply mssql-public-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run TestMsSqlPublicModule --stage verify --verbose']
- id: teardown mssql-public-local
waitFor:
- verify mssql-public-local
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run TestMsSqlPublicModule --stage teardown --verbose']

- id: apply mysql-ha-local
waitFor: ["init-all", "wait for api activation"]
Expand Down
6 changes: 3 additions & 3 deletions examples/postgresql-ha/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module "pg" {
{
name = "0"
zone = "us-central1-a"
availability_type = "ZONAL"
availability_type = "REGIONAL"
tier = "db-custom-1-3840"
ip_configuration = local.read_replica_ip_configuration
database_flags = [{ name = "autovacuum", value = "off" }]
Expand All @@ -97,7 +97,7 @@ module "pg" {
{
name = "1"
zone = "us-central1-b"
availability_type = "ZONAL"
availability_type = "REGIONAL"
tier = "db-custom-1-3840"
ip_configuration = local.read_replica_ip_configuration
database_flags = [{ name = "autovacuum", value = "off" }]
Expand All @@ -111,7 +111,7 @@ module "pg" {
{
name = "2"
zone = "us-central1-c"
availability_type = "ZONAL"
availability_type = "REGIONAL"
tier = "db-custom-1-3840"
ip_configuration = local.read_replica_ip_configuration
database_flags = [{ name = "autovacuum", value = "off" }]
Expand Down
2 changes: 1 addition & 1 deletion modules/mssql/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ terraform {

google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.22.0, < 5.0"
version = "4.24.0"
g-awmalik marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/postgresql-ha/postgresql_ha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestPostgreSqlHaModule(t *testing.T) {
// replica specific validation
} else {
// assert general database settings
assert.Equal("ZONAL", op.Get("settings.availabilityType").String(), "Expected ZONAL availabilityType")
assert.Equal("REGIONAL", op.Get("settings.availabilityType").String(), "Expected REGIONAL availabilityType")
assert.Equal("PD_HDD", op.Get("settings.dataDiskType").String(), "Expected PD_HDD dataDiskType")
assert.False(op.Get("settings.ipConfiguration.requireSsl").Bool(), "Expected FALSE SSL")

Expand Down