You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document provides guidelines for contributing to the module.
4
+
5
+
## Dependencies
6
+
7
+
The following dependencies must be installed on the development system:
8
+
9
+
-[Docker Engine][docker-engine]
10
+
-[Google Cloud SDK][google-cloud-sdk]
11
+
-[make]
12
+
13
+
## Generating Documentation for Inputs and Outputs
14
+
15
+
The Inputs and Outputs tables in the READMEs of the root module,
16
+
submodules, and example modules are automatically generated based on
17
+
the `variables` and `outputs` of the respective modules. These tables
18
+
must be refreshed if the module interfaces are changed.
19
+
20
+
### Execution
21
+
22
+
Run `make generate_docs` to generate new Inputs and Outputs tables.
23
+
24
+
## Integration Testing
25
+
26
+
Integration tests are used to verify the behaviour of the root module,
27
+
submodules, and example modules. Additions, changes, and fixes should
28
+
be accompanied with tests.
29
+
30
+
The integration tests are run using [Kitchen][kitchen],
31
+
[Kitchen-Terraform][kitchen-terraform], and [InSpec][inspec]. These
32
+
tools are packaged within a Docker image for convenience.
33
+
34
+
The general strategy for these tests is to verify the behaviour of the
35
+
[example modules](./examples/), thus ensuring that the root module,
36
+
submodules, and example modules are all functionally correct.
37
+
38
+
### Test Environment
39
+
The easiest way to test the module is in an isolated test project. The setup for such a project is defined in [test/setup](./test/setup/) directory.
40
+
41
+
To use this setup, you need a service account with Project Creator access on a folder. Export the Service Account credentials to your environment like so:
42
+
43
+
```
44
+
export SERVICE_ACCOUNT_JSON=$(< credentials.json)
45
+
```
46
+
47
+
You will also need to set a few environment variables:
These sections describe requirements for using this module.
74
+
75
+
### Software
76
+
77
+
The following dependencies must be available:
78
+
79
+
-[Terraform][terraform] v0.12
80
+
-[Terraform Provider for GCP][terraform-provider-gcp] plugin v2.14
75
81
76
82
### App Engine
77
83
Note that this module requires App Engine being configured in the specified project/region.
78
84
This is because Google Cloud Scheduler is dependent on the project being configured with App Engine.
79
-
Refer to the [Google Cloud Scheduler documentation](https://cloud.google.com/scheduler/docs/) for more
85
+
Refer to the [Google Cloud Scheduler documentation][cloud-scheduler-documentation]
80
86
information on the App Engine dependency.
81
87
82
88
The recommended way to create projects with App Engine enabled is via the [Project Factory module](https://github.com/terraform-google-modules/terraform-google-project-factory).
83
89
There is an example of how to create the project [within that module](https://github.com/terraform-google-modules/terraform-google-project-factory/tree/master/examples/app_engine)
84
90
85
-
### Configure a Service Account
86
-
In order to execute this module you must have a Service Account with the following roles.
87
-
88
-
- roles/storage.admin
89
-
- roles/pubsub.editor
90
-
- roles/cloudscheduler.admin
91
-
- roles/cloudfunctions.developer
92
-
- roles/iam.serviceAccountUser
93
-
94
-
95
-
### Enable API's
96
-
In order to operate with the Service Account you must activate the following API on the project where the Service Account was created:
97
-
98
-
- Cloud Scheduler API - cloudscheduler.googleapis.com
99
-
- Cloud PubSub API - pubsub.googleapis.com
100
-
- Cloud Functions API - cloudfunctions.googleapis.com
91
+
### Service Account
101
92
102
-
## Install
93
+
A service account with the following roles must be used to provision
94
+
the resources of this module:
103
95
104
-
### Terraform
105
-
Be sure you have the correct Terraform version (0.12.x), you can choose the binary here:
Copy file name to clipboardExpand all lines: examples/logs-slack-alerts/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Disclaimer (8/1/2019): Test Coverage has currently not been added to this exampl
4
4
5
5
This logging slack alerts example module schedules a job to run hourly queries of any errors which have occurred in logs which have been ingested into BigQuery. If any errors are found, the errors are sent as alerts to a slack webhook.
6
6
7
-
Running this module requires log exports into BigQuery in the specified project/region, which is not handled by this example.
7
+
Running this module requires log exports into BigQuery in the specified project/region, which is not handled by this example.
8
8
A good example of exported logging in BigQuery can be found in [Stackdriver Logging](https://cloud.google.com/logging/docs/export/).
0 commit comments