Skip to content

Commit

Permalink
Alignment across repositories (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcurtis authored Mar 30, 2024
1 parent ef540f5 commit 04b3bf2
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ permissions:

jobs:
kitchen_terraform:
name: "Tests"
uses: osinfra-io/github-terraform-gcp-called-workflows/.github/workflows/kitchen-terraform.yml@v0.2.0
name: Tests
uses: osinfra-io/github-terraform-gcp-called-workflows/.github/workflows/kitchen-terraform.yml@v0.2.1
if: github.actor != 'dependabot[bot]' && github.actor != 'osinfra-sa'

with:
Expand Down
17 changes: 0 additions & 17 deletions .terraform-docs.yml

This file was deleted.

3 changes: 1 addition & 2 deletions regional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ No requirements.

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | 5.8.0 |
| <a name="provider_google"></a> [google](#provider\_google) | 5.22.0 |
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.0 |

## Modules
Expand All @@ -33,7 +33,6 @@ No modules.
| <a name="input_availability_type"></a> [availability\_type](#input\_availability\_type) | The availability type of the Cloud SQL instance | `string` | `"REGIONAL"` | no |
| <a name="input_backup_start_time"></a> [backup\_start\_time](#input\_backup\_start\_time) | Time indicating when backup configuration starts | `string` | `"04:00"` | no |
| <a name="input_client_certs"></a> [client\_certs](#input\_client\_certs) | A set of client cert names, note: 10 max per instance | `set(string)` | `[]` | no |
| <a name="input_cost_center"></a> [cost\_center](#input\_cost\_center) | The cost center to use for resource labels | `string` | n/a | yes |
| <a name="input_database_version"></a> [database\_version](#input\_database\_version) | The MySQL, PostgreSQL or SQL Server version to use. | `string` | `"POSTGRES_15"` | no |
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | Whether or not to allow Terraform to destroy the instance | `bool` | `true` | no |
| <a name="input_host_project_id"></a> [host\_project\_id](#input\_host\_project\_id) | Host project ID for the shared VPC | `string` | `""` | no |
Expand Down
7 changes: 0 additions & 7 deletions regional/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
# https://www.terraform.io/docs/language/values/locals.html

locals {
labels = merge(
{
cost-center = var.cost_center
},
var.labels
)

network = "projects/${var.host_project_id}/global/networks/${var.network}"

# These flags are required for CIS GCP v1.3.0 compliance
Expand Down
2 changes: 1 addition & 1 deletion regional/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ resource "google_sql_database_instance" "this" {
update_track = var.update_track
}

user_labels = local.labels
user_labels = var.labels
}


Expand Down
5 changes: 0 additions & 5 deletions regional/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ variable "client_certs" {
default = []
}

variable "cost_center" {
description = "The cost center to use for resource labels"
type = string
}

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({
Expand Down
8 changes: 4 additions & 4 deletions test/fixtures/default_cloud_sql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module "test" {
source = "../../../regional"

client_certs = var.client_certs
cost_center = "x000"

postgres_database_flags = [
{
Expand All @@ -20,9 +19,10 @@ module "test" {
instance_name = var.instance_name

labels = {
env = "sb"
repository = "terraform-google-cloud-sql"
team = "testing"
cost-center = "x000"
env = "sb"
repository = "terraform-google-cloud-sql"
team = "testing"
}

network = "kitchen-vpc"
Expand Down
4 changes: 3 additions & 1 deletion test/integration/default_cloud_sql/controls/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ name: InSpec GCP (Google Cloud Platform) Resource Pack

# Before a profile can use controls from another profile, the to-be-included profile needs to be specified:

# InSpec GCP (Google Cloud Platform) Resource Pack
# https://github.com/inspec/inspec-gcp
depends:
- name: inspec_gcp
url: https://github.com/inspec/inspec-gcp/archive/v1.11.93.tar.gz
url: https://github.com/inspec/inspec-gcp/archive/v1.11.98.tar.gz

0 comments on commit 04b3bf2

Please sign in to comment.