Skip to content

Commit

Permalink
Merge pull request #15 from glarizza/gl/refactor_into_modules
Browse files Browse the repository at this point in the history
Introduce separate modules for each destination
  • Loading branch information
aaron-lane committed Apr 5, 2019
2 parents 4f58d8f + 00830aa commit 87fafb5
Show file tree
Hide file tree
Showing 155 changed files with 5,133 additions and 1,042 deletions.
44 changes: 36 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# OSX leaves these everywhere on SMB shares
._*

# OSX trash
.DS_Store

# Python
*.pyc

# Emacs save files
*~
\#*\#
.\#*

# Vim-related files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist

### https://raw.github.com/github/gitignore/90f149de451a5433aebd94d02d11b0e28843a1af/Terraform.gitignore

# Local .terraform directories
**/.terraform/*

Expand All @@ -8,13 +31,18 @@
# Crash log files
crash.log

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json
# Kitchen files
**/inspec.lock
**/.kitchen
**/.kitchen.local.yml
**/Gemfile.lock

# Include override files you do wish to add to version control using negated pattern
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
# .tfvars files are managed as part of configuration and so should be included in
# version control.
#
# !example_override.tf
# example.tfvars
test/fixtures/shared/terraform.tfvars

credentials.json

148 changes: 148 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Copyright 2018 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.

---
driver:
name: "terraform"
command_timeout: 1800

verifier:
name: "terraform"
color: false

provisioner:
name: "terraform"

platforms:
- name: local

suites:
- name: "computed_values"
driver:
root_module_directory: test/fixtures/computed_values/
verifier:
systems:
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "storage/project"
driver:
root_module_directory: test/fixtures/storage/project/
verifier:
systems:
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "storage/folder"
driver:
root_module_directory: test/fixtures/storage/folder/
verifier:
systems:
- name: local
backend: local
controls:
- gcloud
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "storage/organization"
driver:
root_module_directory: test/fixtures/storage/organization/
verifier:
systems:
- name: local
backend: local
controls:
- gcloud
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "pubsub/project"
driver:
root_module_directory: test/fixtures/pubsub/project/
verifier:
systems:
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: local
backend: local
controls:
- gcloud
- name: "pubsub/folder"
driver:
root_module_directory: test/fixtures/pubsub/folder/
verifier:
systems:
- name: local
backend: local
controls:
- gcloud
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "pubsub/organization"
driver:
root_module_directory: test/fixtures/pubsub/organization/
verifier:
systems:
- name: local
backend: local
controls:
- gcloud
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "bigquery/project"
driver:
root_module_directory: test/fixtures/bigquery/project/
verifier:
systems:
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "bigquery/folder"
driver:
root_module_directory: test/fixtures/bigquery/folder/
verifier:
systems:
- name: local
backend: local
controls:
- gcloud
- name: inspec-gcp
backend: gcp
controls:
- gcp
- name: "bigquery/organization"
driver:
root_module_directory: test/fixtures/bigquery/organization/
verifier:
systems:
- name: local
backend: local
controls:
- gcloud
- name: inspec-gcp
backend: gcp
controls:
- gcp
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.3
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 1.0.0
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0] - 2019-04-04
### Added
- Kitchen-terraform tests for log exports at the project/folder/organization level and for storage/PubSub/BigQuery destinations
- Submodules for each destination (storage/PubSub/BigQuery)

### Changed
- Module structure from single monolithic module creating log exports and destinations to a root module for the log export and submodules for each destination
- There are now individual outputs for each module instead of a map of values
- Updated README with new module declaration format and added information on testing
- Pinned Google Terraform provider to version 2.0 in all examples

## [1.0.0] - 2018-09-26
### Added
- Initial release of log export module.

[Unreleased]: https://github.com/terraform-google-modules/terraform-google-log-export/compare/v2.0.0...HEAD
[2.0.0]: https://github.com/terraform-google-modules/terraform-google-log-export/releases/tag/v2.0.0
[1.0.0]: https://github.com/terraform-google-modules/terraform-google-log-export/releases/tag/v1.0.0
11 changes: 6 additions & 5 deletions examples/cleanup.sh → Gemfile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,7 +11,9 @@
# 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.
set -e
find . -name terraform.tfstate | xargs rm
find . -name terraform.tfstate.backup | xargs rm
find . -name .terraform | xargs rm -r

ruby '2.5.3'

source 'https://rubygems.org/' do
gem 'kitchen-terraform', '~> 4.0'
end
Loading

0 comments on commit 87fafb5

Please sign in to comment.