Skip to content

Commit

Permalink
Alignment across repositories (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcurtis authored Mar 30, 2024
1 parent 46bfbac commit 800a005
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:

jobs:
kitchen_terraform:
name: "Tests"
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'

Expand Down
12 changes: 0 additions & 12 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Terraform Docs
# https://github.com/terraform-docs/terraform-docs

formatter: markdown table
sections:
hide-all: true
show:
- providers
- inputs
- outputs
- resources
sort:
enabled: true
by: required
settings:
escape: false
indent: 3
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,19 @@ bundle exec kitchen destroy
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 their parent.

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

No requirements.

### Providers

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

### Modules

No modules.

### Resources

Expand All @@ -88,21 +96,20 @@ A child module automatically inherits its parent's default (un-aliased) provider

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <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_location"></a> [location](#input_location) | The location the storage bucket will be created in | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input_name) | The name of the storage bucket | `any` | n/a | yes |
| <a name="input_project"></a> [project](#input_project) | The ID of the project in which the resource belongs | `string` | n/a | yes |
| <a name="input_default_kms_key_name"></a> [default_kms_key_name](#input_default_kms_key_name) | The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket | `string` | `null` | no |
| <a name="input_force_destroy"></a> [force_destroy](#input_force_destroy) | When deleting a bucket, this boolean option will delete all contained objects | `bool` | `false` | no |
| <a name="input_labels"></a> [labels](#input_labels) | A map of key/value pairs to assign to the resources being created | `map(string)` | `{}` | no |
| <a name="input_storage_class"></a> [storage_class](#input_storage_class) | The Storage Class of the new bucket. Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE | `string` | `"STANDARD"` | no |
| <a name="input_versioning"></a> [versioning](#input_versioning) | The bucket's Versioning configuration | `bool` | `true` | no |
| <a name="input_default_kms_key_name"></a> [default\_kms\_key\_name](#input\_default\_kms\_key\_name) | The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket | `string` | `null` | no |
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | When deleting a bucket, this boolean option will delete all contained objects | `bool` | `false` | no |
| <a name="input_labels"></a> [labels](#input\_labels) | A map of key/value pairs to assign to the resources being created | `map(string)` | `{}` | no |
| <a name="input_location"></a> [location](#input\_location) | The location the storage bucket will be created in | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | The name of the storage bucket | `any` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The ID of the project in which the resource belongs | `string` | n/a | yes |
| <a name="input_storage_class"></a> [storage\_class](#input\_storage\_class) | The Storage Class of the new bucket. Supported values include: STANDARD, MULTI\_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE | `string` | `"STANDARD"` | no |
| <a name="input_versioning"></a> [versioning](#input\_versioning) | The bucket's Versioning configuration | `bool` | `true` | no |

### Outputs

| Name | Description |
|------|-------------|
| <a name="output_name"></a> [name](#output_name) | Bucket name |
| <a name="output_project"></a> [project](#output_project) | The ID of the project in which the resource belongs |
| <a name="output_url"></a> [url](#output_url) | Bucket URL |
| <a name="output_name"></a> [name](#output\_name) | Bucket name |
| <a name="output_project"></a> [project](#output\_project) | The ID of the project in which the resource belongs |
| <a name="output_url"></a> [url](#output\_url) | Bucket URL |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
11 changes: 0 additions & 11 deletions locals.tf

This file was deleted.

2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "google_storage_bucket" "this" {
}

force_destroy = var.force_destroy
labels = local.labels
labels = var.labels
location = var.location
name = var.name
project = var.project
Expand Down
9 changes: 4 additions & 5 deletions test/fixtures/default_bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ module "storage_bucket" {

source = "../../../"

cost_center = "x000"

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

location = "US"
Expand Down
4 changes: 3 additions & 1 deletion test/integration/default_bucket/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
5 changes: 0 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Input Variables
# https://www.terraform.io/language/values/variables

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

variable "default_kms_key_name" {
description = "The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket"
type = string
Expand Down

0 comments on commit 800a005

Please sign in to comment.