Skip to content

Commit

Permalink
Align to coding conventions (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcurtis authored Sep 15, 2024
1 parent cd1f1fa commit 0165e11
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: check-symlinks

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.92.1
rev: v1.95.0
hooks:
- id: terraform_fmt

Expand All @@ -29,7 +29,7 @@ repos:
- id: terraform_docs

- repo: https://github.com/bridgecrewio/checkov.git
rev: 3.2.219
rev: 3.2.254
hooks:
- id: checkov
verbose: true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ terraform test

> A child module automatically inherits default (un-aliased) provider configurations from its parent. The provider versions below are informational only and do **not** need to align with the provider configurations from its parent.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.
Expand All @@ -95,7 +95,7 @@ No inputs.
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->

## 📓 Terraform Regional Documentation

Expand Down
11 changes: 5 additions & 6 deletions regional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A child module automatically inherits its parent's default (un-aliased) provider configurations. The provider versions below are informational only and do **not** need to align with the provider configurations from its parent.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.
Expand All @@ -11,8 +11,8 @@ No requirements.

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | 5.40.0 |
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.2 |
| <a name="provider_google"></a> [google](#provider\_google) | 6.2.0 |
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.3 |

## Modules

Expand Down Expand Up @@ -58,9 +58,8 @@ No modules.
| Name | Description |
|------|-------------|
| <a name="output_client_cert"></a> [client\_cert](#output\_client\_cert) | The client certificate |
| <a name="output_instance"></a> [instance](#output\_instance) | SQL instance name |
| <a name="output_instance_server_ca_cert"></a> [instance\_server\_ca\_cert](#output\_instance\_server\_ca\_cert) | The SQL instance server CA certificate |
| <a name="output_private_ip_address"></a> [private\_ip\_address](#output\_private\_ip\_address) | SQL instance private IP address |
| <a name="output_private_key"></a> [private\_key](#output\_private\_key) | The client private key |
| <a name="output_project_id"></a> [project\_id](#output\_project\_id) | The ID of the project in which the resource belongs |
| <a name="output_sql_instance"></a> [sql\_instance](#output\_sql\_instance) | SQL instance name |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
1 change: 0 additions & 1 deletion regional/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ resource "google_sql_database_instance" "this" {
user_labels = var.labels
}


timeouts {
create = "60m"
delete = "60m"
Expand Down
20 changes: 9 additions & 11 deletions regional/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Output Values
# https://www.terraform.io/docs/language/values/outputs.html

output "client_cert" {
description = "The client certificate"
value = {
Expand All @@ -12,6 +15,11 @@ output "instance_server_ca_cert" {
sensitive = true
}

output "private_ip_address" {
description = "SQL instance private IP address"
value = google_sql_database_instance.this.private_ip_address
}

output "private_key" {
description = "The client private key"
value = {
Expand All @@ -20,17 +28,7 @@ output "private_key" {
sensitive = true
}

output "private_ip_address" {
description = "SQL instance private IP address"
value = google_sql_database_instance.this.private_ip_address
}

output "project_id" {
description = "The ID of the project in which the resource belongs"
value = var.project
}

output "sql_instance" {
output "instance" {
description = "SQL instance name"
value = google_sql_database_instance.this.name
}
21 changes: 12 additions & 9 deletions regional/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Input Variables
# https://www.terraform.io/language/values/variables

variable "availability_type" {
description = "The availability type of the Cloud SQL instance"
type = string
Expand All @@ -16,15 +19,6 @@ variable "client_certs" {
default = []
}

variable "postgres_database_flags" {
description = "The database flags for Cloud SQL. See [PostgreSQL Flags](https://cloud.google.com/sql/docs/postgres/flags)"
type = list(object({
name = string
value = string
}))
default = []
}

variable "database_version" {
description = "The MySQL, PostgreSQL or SQL Server version to use."
type = string
Expand Down Expand Up @@ -83,6 +77,15 @@ variable "point_in_time_recovery_enabled" {
default = false
}

variable "postgres_database_flags" {
description = "The database flags for Cloud SQL. See [PostgreSQL Flags](https://cloud.google.com/sql/docs/postgres/flags)"
type = list(object({
name = string
value = string
}))
default = []
}

variable "project" {
description = "The ID of the project in which the resource belongs"
type = string
Expand Down

0 comments on commit 0165e11

Please sign in to comment.