-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from terraform-google-modules/aaron-lane/submo…
…dules Redesign to use submodules
- Loading branch information
Showing
40 changed files
with
1,138 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Automatic Labelling from Localhost | ||
|
||
This example demonstrates how to use the | ||
[root module][root-module] and the | ||
[event-project-log-entry submodule][event-project-log-entry-submodule] | ||
to configure a system | ||
which responds to Compute VM creation events by labelling them with the | ||
principal email address of the account responsible for causing the events. | ||
|
||
## Usage | ||
|
||
To provision this example, populate `terraform.tfvars` with the [required variables][#inputs] and run the following commands within | ||
this directory: | ||
|
||
- `terraform init` to initialize the directory | ||
- `terraform plan` to generate the execution plan | ||
- `terraform apply` to apply the execution plan | ||
- `terraform destroy` to destroy the infrastructure | ||
|
||
[^]: (autogen_docs_start) | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| project\_id | The ID of the project to which resources will be applied. | string | n/a | yes | | ||
| region | The region in which resources will be applied. | string | n/a | yes | | ||
| zone | The zone in which resources will be applied. | string | n/a | yes | | ||
|
||
[^]: (autogen_docs_end) | ||
|
||
## Requirements | ||
|
||
The following sections describe the requirements which must be met in | ||
order to invoke this module. The requirements of the | ||
[root module][root-module-requirements] and the | ||
[event-project-log-entry submodule][event-project-log-entry-submodule-requirements] | ||
must also be met. | ||
|
||
### Software Dependencies | ||
|
||
The following software dependencies must be installed on the system | ||
from which this module will be invoked: | ||
|
||
- [Terraform][terraform-site] v0.11.Z | ||
|
||
### IAM Roles | ||
|
||
The Service Account which will be used to invoke this module must have | ||
the following IAM roles: | ||
|
||
- Compute Instance Admin (v1): `roles/compute.instanceAdmin.v1` | ||
|
||
### APIs | ||
|
||
The project against which this module will be invoked must have the | ||
following APIs enabled: | ||
|
||
- Compute Engine API: `compute.googleapis.com` | ||
|
||
[event-project-log-entry-submodule-requirements]: ../../modules/event-project-log-entry/README.md#requirements | ||
[event-project-log-entry-submodule]: ../../modules/event-project-log-entry | ||
[root-module-requirements]: ../../README.md#requirements | ||
[root-module]: ../.. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Copyright 2019 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. | ||
*/ | ||
|
||
output "compute_instance_name" { | ||
value = "${google_compute_instance.main.name}" | ||
description = "The name of the unlabelled Compute instance." | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Automatic Labelling from Repository | ||
|
||
This example demonstrates how to use the | ||
[repository-function submodule][repository-function-submodule] and the | ||
[event-project-log-entry submodule][event-project-log-entry-submodule] | ||
to configure a system | ||
which responds to Compute VM creation events by labelling them with the | ||
principal email address of the account responsible for causing the events. | ||
|
||
## Usage | ||
|
||
To provision this example, populate `terraform.tfvars` with the [required variables][#inputs] and run the following commands within | ||
this directory: | ||
|
||
- `terraform init` to initialize the directory | ||
- `terraform plan` to generate the execution plan | ||
- `terraform apply` to apply the execution plan | ||
- `terraform destroy` to destroy the infrastructure | ||
|
||
[^]: (autogen_docs_start) | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| project\_id | The ID of the project to which resources will be applied. | string | n/a | yes | | ||
| region | The region in which resources will be applied. | string | n/a | yes | | ||
| zone | The zone in which resources will be applied. | string | n/a | yes | | ||
|
||
[^]: (autogen_docs_end) | ||
|
||
## Requirements | ||
|
||
The following sections describe the requirements which must be met in | ||
order to invoke this module. The | ||
[repository-function submodule requirements][repository-function-submodule-requirements] | ||
and the | ||
[event-project-log-entry submodule requirements][event-project-log-entry-submodule-requirements] | ||
must also be met. | ||
|
||
### Software Dependencies | ||
|
||
The following software dependencies must be installed on the system | ||
from which this module will be invoked: | ||
|
||
- [Terraform][terraform-site] v0.11.Z | ||
|
||
### IAM Roles | ||
|
||
The Service Account which will be used to invoke this module must have | ||
the following IAM roles: | ||
|
||
- Compute Instance Admin (v1): `roles/compute.instanceAdmin.v1` | ||
- Source Repository Admin: `roles/source.admin` | ||
|
||
### APIs | ||
|
||
The project against which this module will be invoked must have the | ||
following APIs enabled: | ||
|
||
- Cloud Source Repositories API: `sourcerepo.googleapis.com` | ||
- Compute Engine API: `compute.googleapis.com` | ||
|
||
[event-project-log-entry-submodule-requirements]: ../../modules/event-project-log-entry/README.md#requirements | ||
[event-project-log-entry-submodule]: ../../modules/event-project-log-entry | ||
[repository-function-submodule-requirements]: ../../modules/repository-function/README.md#requirements | ||
[repository-function-submodule]: ../../modules/repository-function |
Oops, something went wrong.