Skip to content

Latest commit

 

History

History
94 lines (72 loc) · 4.62 KB

File metadata and controls

94 lines (72 loc) · 4.62 KB

Description

terraform-google-sql makes it easy to create a Google CloudSQL instance and implement high availability settings. This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+.

The cloudsql created here is used to integrate with the slurm cluster to enable accounting data storage.

Example

- id: project
  source: community/modules/database/cloudsql-federation
  use: [network1]
  settings:
    sql_instance_name: slurm-sql6-demo
    tier: "db-f1-micro"

This creates a cloud sql instance, including a database, user that would allow the slurm cluster to use as an external DB. In addition, it will allow BigQuery to run federated query through it.

License

Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Requirements

Name Version
terraform >= 0.13.0
google >= 3.83
google-beta >= 3.83
random ~> 3.0

Providers

Name Version
google >= 3.83
google-beta >= 3.83
random ~> 3.0

Modules

No modules.

Resources

Name Type
google-beta_google_bigquery_connection.connection resource
google_sql_database.database resource
google_sql_database_instance.instance resource
google_sql_user.users resource
random_id.resource_name_suffix resource
random_password.password resource

Inputs

Name Description Type Default Required
deletion_protection Whether or not to allow Terraform to destroy the instance. string false no
deployment_name The name of the current deployment string n/a yes
labels Labels to add to the instances. List key, value pairs. any n/a yes
nat_ips a list of NAT ips to be allow listed for the slurm cluster communication list(any) n/a yes
project_id Project in which the HPC deployment will be created string n/a yes
region The region where SQL instance will be configured string n/a yes
sql_instance_name name given to the sql instance for ease of identificaion string n/a yes
sql_password Password for the SQL database. any null no
sql_username Username for the SQL database string "slurm" no
tier The machine type to use for the SQL instance string n/a yes

Outputs

Name Description
cloudsql Describes the cloudsql instance.