Skip to content

Commit 4e933ac

Browse files
committed
Initial template commit
0 parents  commit 4e933ac

37 files changed

+1806
-0
lines changed

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# OSX leaves these everywhere on SMB shares
2+
._*
3+
4+
# OSX trash
5+
.DS_Store
6+
7+
# Python
8+
*.pyc
9+
10+
# Emacs save files
11+
*~
12+
\#*\#
13+
.\#*
14+
15+
# Vim-related files
16+
[._]*.s[a-w][a-z]
17+
[._]s[a-w][a-z]
18+
*.un~
19+
Session.vim
20+
.netrwhist
21+
22+
### https://raw.github.com/github/gitignore/90f149de451a5433aebd94d02d11b0e28843a1af/Terraform.gitignore
23+
24+
# Local .terraform directories
25+
**/.terraform/*
26+
27+
# .tfstate files
28+
*.tfstate
29+
*.tfstate.*
30+
31+
# Crash log files
32+
crash.log
33+
34+
# Kitchen files
35+
**/inspec.lock
36+
**/.kitchen
37+
**/kitchen.local.yml
38+
**/Gemfile.lock
39+
40+
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
41+
# .tfvars files are managed as part of configuration and so should be included in
42+
# version control.
43+
**/*.tfvars
44+
45+
credentials.json

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.5.3

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on
6+
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7+
and this project adheres to
8+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9+
10+
## [Unreleased]
11+
12+
## [0.1.0] - 20XX-YY-ZZ
13+
14+
### Added
15+
16+
- Initial release
17+
18+
[Unreleased]: https://github.com/terraform-google-modules/terraform-google-service-accounts/compare/v0.1.0...HEAD
19+
[0.1.0]: https://github.com/terraform-google-modules/terraform-google-service-accounts/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Contributing
2+
3+
This document provides guidelines for contributing to the module.
4+
5+
## Generating Documentation for Inputs and Outputs
6+
7+
The Inputs and Outputs tables in the READMEs of the root module,
8+
submodules, and example modules are automatically generated based on
9+
the `variables` and `outputs` of the respective modules. These tables
10+
must be refreshed if the module interfaces are changed.
11+
12+
### Dependencies
13+
14+
The following dependencies must be installed on the development system:
15+
16+
- [make]
17+
- [terraform-docs] v0.6.0
18+
19+
### Execution
20+
21+
Run `make generate_docs` to generate new Inputs and Outputs tables.
22+
23+
## Integration Testing
24+
25+
Integration tests are used to verify the behaviour of the root module,
26+
submodules, and example modules. Additions, changes, and fixes should
27+
be accompanied with tests.
28+
29+
The integration tests are run using [Kitchen][kitchen],
30+
[Kitchen-Terraform][kitchen-terraform], and [InSpec][inspec]. These
31+
tools are packaged within a Docker image for convenience.
32+
33+
The general strategy for these tests is to verify the behaviour of the
34+
[example modules](./examples), thus ensuring that the root module,
35+
submodules, and example modules are all functionally correct.
36+
37+
### Dependencies
38+
39+
The following dependencies must be installed on the development system:
40+
41+
- [Docker Engine][docker-engine]
42+
- [Google Cloud SDK][google-cloud-sdk]
43+
- [make]
44+
45+
### Inputs
46+
47+
Test instances are defined in the
48+
[Kitchen configuration file](./kitchen.yml). The inputs of each Kitchen
49+
instance may be configured with the `driver.variables` key in a
50+
local Kitchen configuration file located at `./kitchen.local.yml` or in
51+
a Terraform variables file located at
52+
`./test/fixtures/<instance>/variables.tfvars`.
53+
54+
### Credentials
55+
56+
Download the key of a Service Account with the
57+
[required roles][required-roles] to `./credentials.json`.
58+
59+
### Interactive Execution
60+
61+
1. Run `make docker_run` to start the testing Docker container in
62+
interactive mode.
63+
64+
1. Run `kitchen create <EXAMPLE_NAME>` to initialize the working
65+
directory for an example module.
66+
67+
1. Run `kitchen converge <EXAMPLE_NAME>` to apply the example module.
68+
69+
1. Run `kitchen verify <EXAMPLE_NAME>` to test the example module.
70+
71+
1. Run `kitchen destroy <EXAMPLE_NAME>` to destroy the example module
72+
state.
73+
74+
### Noninteractive Execution
75+
76+
Run `make test_integration_docker` to test all of the example modules
77+
noninteractively.
78+
79+
## Linting and Formatting
80+
81+
Many of the files in the repository can be linted or formatted to
82+
maintain a standard of quality.
83+
84+
### Dependencies
85+
86+
The following dependencies must be installed on the development system:
87+
88+
- [flake8]
89+
- [gofmt]
90+
- [hadolint]
91+
- [make]
92+
- [shellcheck]
93+
- [Terraform][terraform] v0.11
94+
95+
### Execution
96+
97+
Run `make check`.
98+
99+
[docker-engine]: https://www.docker.com/products/docker-engine
100+
[flake8]: http://flake8.pycqa.org/en/latest/
101+
[gofmt]: https://golang.org/cmd/gofmt/
102+
[google-cloud-sdk]: https://cloud.google.com/sdk/install
103+
[hadolint]: https://github.com/hadolint/hadolint
104+
[inspec]: https://inspec.io/
105+
[kitchen-terraform]: https://github.com/newcontext-oss/kitchen-terraform
106+
[kitchen]: https://kitchen.ci/
107+
[make]: https://en.wikipedia.org/wiki/Make_(software)
108+
[shellcheck]: https://www.shellcheck.net/
109+
[terraform-docs]: https://github.com/segmentio/terraform-docs
110+
[terraform]: https://terraform.io/

Gemfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
ruby '2.5.3'
16+
17+
source 'https://rubygems.org/' do
18+
gem 'kitchen-terraform', '~> 4.8'
19+
end

0 commit comments

Comments
 (0)