diff --git a/modules/mssql/README.md b/modules/mssql/README.md index 52e81c9c..c8064516 100644 --- a/modules/mssql/README.md +++ b/modules/mssql/README.md @@ -87,6 +87,7 @@ module "mssql" { | Name | Description | |------|-------------| | additional\_users | List of maps of additional users and passwords | +| apphub\_service\_uri | Service URI in CAIS style to be used by Apphub. | | generated\_user\_password | The auto generated default user password if not input password was provided | | instance\_address | The IPv4 addesses assigned for the master instance | | instance\_connection\_name | The connection name of the master instance to be used in connection strings | diff --git a/modules/mssql/metadata.display.yaml b/modules/mssql/metadata.display.yaml index 31afb41c..c6b6ba6e 100644 --- a/modules/mssql/metadata.display.yaml +++ b/modules/mssql/metadata.display.yaml @@ -52,6 +52,9 @@ spec: create_timeout: name: create_timeout title: Create Timeout + data_cache_enabled: + name: data_cache_enabled + title: Data Cache Enabled database_flags: name: database_flags title: Database Flags diff --git a/modules/mssql/metadata.yaml b/modules/mssql/metadata.yaml index 516e7119..4d694f5d 100644 --- a/modules/mssql/metadata.yaml +++ b/modules/mssql/metadata.yaml @@ -304,6 +304,12 @@ spec: type: - tuple - [] + - name: apphub_service_uri + description: Service URI in CAIS style to be used by Apphub. + type: + - object + - service_id: string + service_uri: string - name: generated_user_password description: The auto generated default user password if not input password was provided type: string @@ -564,3 +570,12 @@ spec: - serviceusage.googleapis.com - sqladmin.googleapis.com - workflows.googleapis.com + providerVersions: + - source: hashicorp/google + version: ">= 5.12, < 7" + - source: hashicorp/google-beta + version: ">= 5.12, < 7" + - source: hashicorp/null + version: ~> 3.2 + - source: hashicorp/random + version: ~> 3.4 diff --git a/modules/mssql/outputs.tf b/modules/mssql/outputs.tf index ca491a20..e44e6e96 100644 --- a/modules/mssql/outputs.tf +++ b/modules/mssql/outputs.tf @@ -85,3 +85,11 @@ output "primary" { description = "The `google_sql_database_instance` resource representing the primary instance" sensitive = true } + +output "apphub_service_uri" { + value = { + service_uri = "//cloudsql.googleapis.com/projects${element(split("/projects", google_sql_database_instance.default.self_link), 1)}" + service_id = substr(format("%s-%s", var.name, md5(var.project_id)), 0, 63) + } + description = "Service URI in CAIS style to be used by Apphub." +} diff --git a/modules/mysql/README.md b/modules/mysql/README.md index 9d982795..50532852 100644 --- a/modules/mysql/README.md +++ b/modules/mysql/README.md @@ -72,6 +72,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq | Name | Description | |------|-------------| | additional\_users | List of maps of additional users and passwords | +| apphub\_service\_uri | Service URI in CAIS style to be used by Apphub. | | env\_vars | Exported environment variables | | generated\_user\_password | The auto generated default user password if not input password was provided | | iam\_users | The list of the IAM users with access to the CloudSQL instance | diff --git a/modules/mysql/metadata.yaml b/modules/mysql/metadata.yaml index 45a71e52..30cf72df 100644 --- a/modules/mysql/metadata.yaml +++ b/modules/mysql/metadata.yaml @@ -221,7 +221,7 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-network//modules/vpc - version: "~> 9.1.0" + version: ~> 9.1.0 spec: outputExpr: network_id inputPath: private_network @@ -339,12 +339,12 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-service-accounts//modules/simple-sa - version: "~> 4.3.0" + version: ~> 4.3.0 spec: outputExpr: id - source: source: github.com/GoogleCloudPlatform/terraform-google-cloud-run//modules/v2 - version: "~> 0.13.0" + version: ~> 0.13.0 spec: outputExpr: service_account_id - name: create_timeout @@ -407,6 +407,12 @@ spec: type: - tuple - [] + - name: apphub_service_uri + description: Service URI in CAIS style to be used by Apphub. + type: + - object + - service_id: string + service_uri: string - name: env_vars description: Exported environment variables type: @@ -914,3 +920,12 @@ spec: - serviceusage.googleapis.com - sqladmin.googleapis.com - workflows.googleapis.com + providerVersions: + - source: hashicorp/google + version: ">= 5.25, < 7" + - source: hashicorp/google-beta + version: ">= 5.25, < 7" + - source: hashicorp/null + version: ~> 3.1 + - source: hashicorp/random + version: ~> 3.1 diff --git a/modules/mysql/outputs.tf b/modules/mysql/outputs.tf index 85f19065..3f10fa8e 100644 --- a/modules/mysql/outputs.tf +++ b/modules/mysql/outputs.tf @@ -154,3 +154,11 @@ output "env_vars" { "CLOUD_SQL_DATABASE_NAME" : local.database_name } } + +output "apphub_service_uri" { + value = { + service_uri = "//cloudsql.googleapis.com/projects${element(split("/projects", google_sql_database_instance.default.self_link), 1)}" + service_id = substr(format("%s-%s", var.name, md5(var.project_id)), 0, 63) + } + description = "Service URI in CAIS style to be used by Apphub." +} diff --git a/modules/postgresql/README.md b/modules/postgresql/README.md index 6d5e0b03..5bd1eab7 100644 --- a/modules/postgresql/README.md +++ b/modules/postgresql/README.md @@ -180,6 +180,7 @@ module "pg" { | Name | Description | |------|-------------| | additional\_users | List of maps of additional users and passwords | +| apphub\_service\_uri | Service URI in CAIS style to be used by Apphub. | | dns\_name | DNS name of the instance endpoint | | env\_vars | Exported environment variables | | generated\_user\_password | The auto generated default user password if not input password was provided | diff --git a/modules/postgresql/metadata.yaml b/modules/postgresql/metadata.yaml index 44db0443..cfc74ebf 100644 --- a/modules/postgresql/metadata.yaml +++ b/modules/postgresql/metadata.yaml @@ -223,7 +223,7 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-network//modules/vpc - version: "~> 9.1.0" + version: ~> 9.1.0 spec: outputExpr: network_id inputPath: private_network @@ -319,12 +319,12 @@ spec: connections: - source: source: github.com/terraform-google-modules/terraform-google-service-accounts//modules/simple-sa - version: "~> 4.3.0" + version: ~> 4.3.0 spec: outputExpr: id - source: source: github.com/GoogleCloudPlatform/terraform-google-cloud-run//modules/v2 - version: "~> 0.13.0" + version: ~> 0.13.0 spec: outputExpr: service_account_id - name: create_timeout @@ -397,6 +397,12 @@ spec: type: - tuple - [] + - name: apphub_service_uri + description: Service URI in CAIS style to be used by Apphub. + type: + - object + - service_id: string + service_uri: string - name: dns_name description: DNS name of the instance endpoint type: string @@ -904,3 +910,12 @@ spec: - serviceusage.googleapis.com - sqladmin.googleapis.com - workflows.googleapis.com + providerVersions: + - source: hashicorp/google + version: ">= 5.25, < 7" + - source: hashicorp/google-beta + version: ">= 5.25, < 7" + - source: hashicorp/null + version: ~> 3.1 + - source: hashicorp/random + version: ~> 3.1 diff --git a/modules/postgresql/outputs.tf b/modules/postgresql/outputs.tf index 4874c5af..020570b1 100644 --- a/modules/postgresql/outputs.tf +++ b/modules/postgresql/outputs.tf @@ -152,3 +152,11 @@ output "env_vars" { "CLOUD_SQL_DATABASE_NAME" : local.database_name } } + +output "apphub_service_uri" { + value = { + service_uri = "//cloudsql.googleapis.com/projects${element(split("/projects", google_sql_database_instance.default.self_link), 1)}" + service_id = substr(format("%s-%s", var.name, md5(var.project_id)), 0, 63) + } + description = "Service URI in CAIS style to be used by Apphub." +}