Skip to content

Commit

Permalink
feat: Add new output called env_vars for postgresql (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
q2w authored Jul 5, 2024
1 parent 0c3ba89 commit f02e3fd
Show file tree
Hide file tree
Showing 15 changed files with 2,030 additions and 1,701 deletions.
1 change: 1 addition & 0 deletions examples/postgresql-public/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ terraform destroy

| Name | Description |
|------|-------------|
| env\_vars | Exported environment variables |
| name | The name for Cloud SQL instance |
| project\_id | The project to run tests against |
| psql\_conn | The connection name of the master instance to be used in connection strings |
Expand Down
5 changes: 5 additions & 0 deletions examples/postgresql-public/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ output "public_ip_address" {
description = "The first public (PRIMARY) IPv4 address assigned for the master instance"
value = module.postgresql-db.public_ip_address
}

output "env_vars" {
value = module.postgresql-db.env_vars
description = "Exported environment variables"
}
135 changes: 77 additions & 58 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,61 +19,80 @@ metadata:
annotations:
config.kubernetes.io/local-config: "true"
spec:
title: terraform-google-sql
source:
repo: https://github.com/terraform-google-modules/terraform-google-sql-db
sourceType: git
description: {}
subBlueprints:
- name: backup
location: modules/backup
- name: mssql
location: modules/mssql
- name: mysql
location: modules/mysql
- name: postgresql
location: modules/postgresql
- name: private_service_access
location: modules/private_service_access
- name: restore
location: modules/restore
- name: safer_mysql
location: modules/safer_mysql
examples:
- name: mssql-public
location: examples/mssql-public
- name: mysql-backup-create-service-account
location: examples/mysql-backup-create-service-account
- name: mysql-ha
location: examples/mysql-ha
- name: mysql-private
location: examples/mysql-private
- name: mysql-public
location: examples/mysql-public
- name: postgresql-backup-provided-service-account
location: examples/postgresql-backup-provided-service-account
- name: postgresql-ha
location: examples/postgresql-ha
- name: postgresql-public
location: examples/postgresql-public
- name: postgresql-public-iam
location: examples/postgresql-public-iam
roles:
- level: Project
info:
title: terraform-google-sql
source:
repo: https://github.com/terraform-google-modules/terraform-google-sql-db.git
sourceType: git
description: {}
content:
subBlueprints:
- name: backup
location: modules/backup
- name: mssql
location: modules/mssql
- name: mysql
location: modules/mysql
- name: postgresql
location: modules/postgresql
- name: private_service_access
location: modules/private_service_access
- name: restore
location: modules/restore
- name: safer_mysql
location: modules/safer_mysql
examples:
- name: mssql-failover-replica
location: examples/mssql-failover-replica
- name: mssql-public
location: examples/mssql-public
- name: mysql-backup-create-service-account
location: examples/mysql-backup-create-service-account
- name: mysql-ha
location: examples/mysql-ha
- name: mysql-private
location: examples/mysql-private
- name: mysql-psc
location: examples/mysql-psc
- name: mysql-public
location: examples/mysql-public
- name: postgresql-backup-provided-service-account
location: examples/postgresql-backup-provided-service-account
- name: postgresql-ha
location: examples/postgresql-ha
- name: postgresql-psc
location: examples/postgresql-psc
- name: postgresql-public
location: examples/postgresql-public
- name: postgresql-public-iam
location: examples/postgresql-public-iam
- name: postgresql-with-cross-region-failover
location: examples/postgresql-with-cross-region-failover
interfaces: {}
requirements:
roles:
- roles/cloudsql.admin
- roles/compute.networkAdmin
- roles/iam.serviceAccountAdmin
- roles/resourcemanager.projectIamAdmin
- roles/storage.admin
- roles/workflows.admin
- roles/cloudscheduler.admin
- roles/iam.serviceAccountUser
services:
- cloudresourcemanager.googleapis.com
- compute.googleapis.com
- servicenetworking.googleapis.com
- sqladmin.googleapis.com
- iam.googleapis.com
- workflows.googleapis.com
- cloudscheduler.googleapis.com
- level: Project
roles:
- roles/cloudkms.admin
- roles/cloudkms.cryptoKeyEncrypterDecrypter
- roles/cloudscheduler.admin
- roles/cloudsql.admin
- roles/compute.admin
- roles/compute.networkAdmin
- roles/iam.serviceAccountAdmin
- roles/iam.serviceAccountUser
- roles/monitoring.editor
- roles/resourcemanager.projectIamAdmin
- roles/storage.admin
- roles/workflows.admin
services:
- cloudkms.googleapis.com
- cloudresourcemanager.googleapis.com
- cloudscheduler.googleapis.com
- compute.googleapis.com
- iam.googleapis.com
- monitoring.googleapis.com
- servicenetworking.googleapis.com
- serviceusage.googleapis.com
- sqladmin.googleapis.com
- workflows.googleapis.com
Loading

0 comments on commit f02e3fd

Please sign in to comment.