- Notifications
You must be signed in to change notification settings - Fork0
Creates a Cloud SQL database instance
License
joovalst/terraform-google-sql-db
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
terraform-google-sql makes it easy to create Google CloudSQL instance and implement high availability settings.This module consists of the following submodules:
See more details in each module's README.
This module is meant for use with Terraform 1.3+ and tested using Terraform 1.6+.If you find incompatibilities using Terraform>=1.13, please open an issue.
The current version is 26.X. The following guides are available to assist with upgrades:
- 1.X -> 2.0
- 2.X -> 3.0
- 3.X -> 4.0
- 10.X -> 11.0
- 11.X -> 12.0
- 13.X -> 14.0
- 14.X -> 15.0
- 16.X -> 17.0
- 19.X -> 20.0
- 20.X -> 21.0
- 21.X -> 22.0
- 22.X -> 23.0
- 23.X -> 24.0
- 25.X -> 26.0
The root module has been deprecated. Please switch to using one of the submodules.
- Terraform >= 1.3.0
- terraform-provider-google plugin v5.12+
- Terraform Provider Beta for GCP plugin v5.12+
In order to execute this module you must have a Service Account with the following:
- Cloud SQL Admin:
roles/cloudsql.admin - Compute Network Admin:
roles/compute.networkAdmin
In order to operate with the Service Account you must activate the following APIs on the project where the Service Account was created:
- Cloud SQL Admin API:
sqladmin.googleapis.com
In order to use Private Service Access, required for using Private IPs, you must activatethe following APIs on the project where your VPC resides:
- Cloud SQL Admin API:
sqladmin.googleapis.com - Compute Engine API:
compute.googleapis.com - Service Networking API:
servicenetworking.googleapis.com - Cloud Resource Manager API:
cloudresourcemanager.googleapis.com
You can pass the service account credentials into this module by setting the following environment variables:
GOOGLE_CREDENTIALSGOOGLE_CLOUD_KEYFILE_JSONGCLOUD_KEYFILE_JSON
See moredetails.
This module has no root configuration. A module with no root configuration cannot be used directly.
Copy and paste into your Terraform configuration, insert the variables, and run terraform init :
For MySQL :
module "sql-db" { source = "GoogleCloudPlatform/sql-db/google//modules/mysql" version = "~> 26.2"}or for PostgreSQL :
module "sql-db" { source = "GoogleCloudPlatform/sql-db/google//modules/postgresql" version = "~> 22.0"}or for MSSQL Server :
module "sql-db" { source = "GoogleCloudPlatform/sql-db/google//modules/mssql" version = "~> 22.0"}Refer to thecontribution guidelines forinformation on contributing to this module.
About
Creates a Cloud SQL database instance
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- HCL68.4%
- Go26.0%
- Python4.5%
- Makefile1.1%