Skip to content

Commit 78e3559

Browse files
authored
Merge pull request #36 from averbuks/averbuks-remove-hardcoded-net
Remove hardcoded network from example
2 parents 0e83864 + 5365d00 commit 78e3559

File tree

28 files changed

+148
-812
lines changed

28 files changed

+148
-812
lines changed

Gemfile

Lines changed: 0 additions & 19 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.1.0
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.4.3
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,36 @@ The
2626
is a tested reference of how to use the root module with the
2727
[event-project-log-entry submodule][event-project-log-entry-submodule].
2828

29-
[^]: (autogen_docs_start)
30-
29+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
3130
## Inputs
3231

3332
| Name | Description | Type | Default | Required |
3433
|------|-------------|:----:|:-----:|:-----:|
35-
| available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. | string | `"256"` | no |
34+
| available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. | number | `"256"` | no |
35+
| bucket\_force\_destroy | When deleting the GCS bucket containing the cloud function, delete all objects in the bucket first. | bool | `"false"` | no |
36+
| bucket\_labels | A set of key/value label pairs to assign to the function source archive bucket. | map(string) | `<map>` | no |
37+
| bucket\_name | The name to apply to the bucket. Will default to a string of the function name. | string | `""` | no |
3638
| description | The description of the function. | string | `"Processes events."` | no |
3739
| entry\_point | The name of a method in the function source which will be invoked when the function is executed. | string | n/a | yes |
38-
| environment\_variables | A set of key/value environment variable pairs to assign to the function. | map | `<map>` | no |
39-
| event\_trigger | A source that fires events in response to a condition in another service. | map | n/a | yes |
40-
| labels | A set of key/value label pairs to assign to any lableable resources. | map | `<map>` | no |
40+
| environment\_variables | A set of key/value environment variable pairs to assign to the function. | map(string) | `<map>` | no |
41+
| event\_trigger | A source that fires events in response to a condition in another service. | map(string) | n/a | yes |
42+
| event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | bool | `"false"` | no |
43+
| labels | A set of key/value label pairs to assign to the Cloud Function. | map(string) | `<map>` | no |
4144
| name | The name to apply to any nameable resources. | string | n/a | yes |
4245
| project\_id | The ID of the project to which resources will be applied. | string | n/a | yes |
4346
| region | The region in which resources will be applied. | string | n/a | yes |
44-
| runtime | The runtime in which the function will be executed. | string | `"nodejs6"` | no |
47+
| runtime | The runtime in which the function will be executed. | string | n/a | yes |
48+
| service\_account\_email | The service account to run the function as. | string | `""` | no |
4549
| source\_directory | The pathname of the directory which contains the function source code. | string | n/a | yes |
46-
| timeout\_s | The amount of time in seconds allotted for the execution of the function. | string | `"60"` | no |
50+
| timeout\_s | The amount of time in seconds allotted for the execution of the function. | number | `"60"` | no |
4751

4852
## Outputs
4953

5054
| Name | Description |
5155
|------|-------------|
5256
| name | The name of the function. |
5357

54-
[^]: (autogen_docs_end)
58+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
5559

5660
## Requirements
5761

@@ -63,11 +67,10 @@ order to invoke this module.
6367
The following software dependencies must be installed on the system
6468
from which this module will be invoked:
6569

66-
- [Terraform][terraform-site] v0.12.Z
70+
- [Terraform][terraform-site] v0.12
6771
- [Terraform Provider for Archive][terraform-provider-archive-site]
68-
v1.2.Z
69-
- [Terraform Provider for Google Cloud Platform][terraform-provider-gcp-site]
70-
v2.5.Z
72+
v1.2
73+
- [Terraform Provider for Google Cloud Platform][terraform-provider-gcp-site] v2.5
7174

7275
### IAM Roles
7376

@@ -87,3 +90,15 @@ following APIs enabled:
8790

8891
The [Project Factory module][project-factory-module-site] can be used to
8992
provision projects with specific APIs activated.
93+
94+
## Contributing
95+
96+
Refer to the [contribution guidelines](./CONTRIBUTING.md) for
97+
information on contributing to this module.
98+
99+
[automatic-labelling-from-localhost-example]: examples/automatic-labelling-from-localhost
100+
[event-project-log-entry-submodule]: modules/event-project-log-entry
101+
[repository-function-submodule]: modules/repository-function
102+
[project-factory-module-site]: https://github.com/terraform-google-modules/terraform-google-project-factory/
103+
[terraform-provider-gcp-site]: https://github.com/terraform-providers/terraform-provider-google/
104+
[terraform-site]: https://www.terraform.io/

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ tags:
3838
- 'integration'
3939
substitutions:
4040
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
41-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.1.0'
41+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.4.3'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ tags:
2121
- 'lint'
2222
substitutions:
2323
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
24-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.1.0'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.4.3'

examples/automatic-labelling-folder/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ this directory:
2525
| project\_id | The ID of the project to which resources will be applied. | string | n/a | yes |
2626
| region | The region in which resources will be applied. | string | n/a | yes |
2727

28+
## Outputs
29+
30+
| Name | Description |
31+
|------|-------------|
32+
| project\_id | The ID of the project to which resources are applied. |
33+
| region | The region in which resources are applied. |
34+
| test\_project\_id | The ID of the project to test. |
35+
2836
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2937

3038
## Requirements
@@ -40,7 +48,7 @@ must also be met.
4048
The following software dependencies must be installed on the system
4149
from which this module will be invoked:
4250

43-
- [Terraform][terraform-site] v0.12.Z
51+
- [Terraform][terraform-site] v0.12
4452

4553
### IAM Roles
4654

examples/automatic-labelling-folder/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ resource "google_project_iam_member" "test_project_iam" {
104104
project = google_project.test.project_id
105105
role = "roles/owner"
106106
member = "serviceAccount:${var.project_id}@appspot.gserviceaccount.com"
107-
}
107+
}

examples/automatic-labelling-from-localhost/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,23 @@ this directory:
1717
- `terraform apply` to apply the execution plan
1818
- `terraform destroy` to destroy the infrastructure
1919

20-
[^]: (autogen_docs_start)
21-
20+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2221
## Inputs
2322

2423
| Name | Description | Type | Default | Required |
2524
|------|-------------|:----:|:-----:|:-----:|
2625
| project\_id | The ID of the project to which resources will be applied. | string | n/a | yes |
2726
| region | The region in which resources will be applied. | string | n/a | yes |
27+
| subnetwork | The name or self_link of the subnetwork to create compute instance in. | string | `"default"` | no |
2828
| zone | The zone in which resources will be applied. | string | n/a | yes |
2929

30-
[^]: (autogen_docs_end)
30+
## Outputs
31+
32+
| Name | Description |
33+
|------|-------------|
34+
| compute\_instance\_name | The name of the unlabelled Compute instance. |
35+
36+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
3137

3238
## Requirements
3339

@@ -42,7 +48,7 @@ must also be met.
4248
The following software dependencies must be installed on the system
4349
from which this module will be invoked:
4450

45-
- [Terraform][terraform-site] v0.11.Z
51+
- [Terraform][terraform-site] v0.12
4652

4753
### IAM Roles
4854

examples/automatic-labelling-from-localhost/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ resource "google_compute_instance" "main" {
9090
}
9191

9292
network_interface {
93-
network = "default"
93+
subnetwork = var.subnetwork
9494
}
9595

9696
project = var.project_id

examples/automatic-labelling-from-localhost/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ variable "zone" {
2828
type = string
2929
description = "The zone in which resources will be applied."
3030
}
31+
32+
variable "subnetwork" {
33+
type = string
34+
description = "The name or self_link of the subnetwork to create compute instance in."
35+
default = "default"
36+
}

0 commit comments

Comments
 (0)